- Feb 13, 2025
-
-
Pierre Tocquin authored
Updated internode_analysis.ijm to version 1.2 with improvements in handling image inputs, enhanced morphological measurement processes, and added user interactions for dynamic validation. Additionally, introduced a new ImageJ macro script manual_editing.ijm for annotating nodes and internodes, which assists users in manually selecting and modifying ROIs. Also changed logging level from debug to info in process_pipeline.py for better visibility of the image splitting process.
-
- Feb 04, 2025
-
-
Pierre Tocquin authored
The modification addresses the issue of handling excessively large images by splitting them into two parts if they exceed 2 billion pixels. This change prevents memory issues during processing and ensures successful saving by storing each part separately. Logging has been updated to reflect the new paths where the image parts are saved.
-
- Jan 08, 2025
-
-
Pierre Tocquin authored
Replaced the condition to check for any non-zero elements at the edges of the cluster mask using np.any(). This fixes a bug where clusters on the edge were incorrectly identified due to improper zero checks, potentially improving segmentation accuracy.
-
Pierre Tocquin authored
Added 'segment_size' and 'max_image_size' as required config keys to allow dynamic configuration of image processing constraints. This change enables customizing subsample size and maximum image size directly through the configuration, improving flexibility and control over processing large segmented images.
-
- Jan 07, 2025
-
-
Pierre Tocquin authored
Add the imagecodecs library to the list of dependencies in requirements.txt for improved image processing support. This addition may enhance performance or enable new functionality when dealing with various image formats. It's important to ensure compatibility with existing libraries and test the application for any potential integration issues arising from this change.
-
- Dec 24, 2024
-
-
Pierre Tocquin authored
Added functionality to subsample large segmented images for processing in memory-constrained environments. The script now checks image size and subsamples if necessary, processes each segment, and reassembles the final corrected image. This change prevents memory overflow issues with very large images. Additionally, edge cluster handling was improved by skipping clusters that touch the image border to ensure cleaner segmentation results.
-
- Dec 15, 2024
-
-
Pierre Tocquin authored
Updated the logging level from debug to info for better visibility of label evaluation in the image segmentation process. This adjustment helps ensure that key processing steps are logged with a prominence suitable for regular monitoring, rather than being hidden in debug-level logs.
-
- Dec 14, 2024
-
-
Pierre Tocquin authored
The parameter `closing_kernel_size` was removed from the `correct_segmentation_issues` function as it was not being used in the function logic. Additionally, the default value for `area_threshold` was increased from 50 to 750, and the range for `aspect_ratio_min` was adjusted from 1.5 to 1 to better filter true nodes of Ranvier based on empirical observations.
-
Pierre Tocquin authored
The `closing_kernel_size` parameter was removed from the list of required configuration keys in the `load_config` function. This change might be necessary if the parameter is optional or deprecated, ensuring that config validation aligns with actual usage or expected defaults.
-
Pierre Tocquin authored
Removed outdated code sections related to contour handling and closing_kernel_size, streamlining the segmentation correction function. Implemented a median blur filter at the beginning of the function to enhance image smoothing. These changes simplify the pipeline and focus on preserving large red clusters with valid aspect ratios without additional complex operations.
-
Pierre Tocquin authored
Change the initialization of `cluster_mask` from zeros to a full 255 value image in `correct_segmentation_issues()` function. This modification ensures that the mask used for contour extraction is fully white, which is necessary for accurate segmentation and contour operations. The previous zero-initialized mask led to incorrect contour identifications.
-
- Dec 13, 2024
-
-
Pierre Tocquin authored
The added 'continue' statement within the else block ensures that the function skips over any cluster that does not match predefined criteria, preventing potential fall-through logic errors. This change improves the clarity and correctness of control flow in the segmentation correction process.
-
Pierre Tocquin authored
-
- Dec 12, 2024
-
-
Pierre Tocquin authored
Removed the `bad_cluster` flag and simplified the logic for handling clusters in the segmentation correction process. Small clusters below the area threshold are now directly ignored, streamlining the flow and reducing unnecessary checks. This change improves code readability without altering functionality.
-
Pierre Tocquin authored
Move the initialization of the bad_cluster variable inside the loop to ensure it is reset for each label evaluation. This resolves a logic error where bad_cluster might incorrectly retain a previous state, affecting segmentation issue correction.
-
Pierre Tocquin authored
Updated the condition to explicitly compare `bad_cluster` with `True` for improved readability and clarity, ensuring the logic is easily understandable.
-
Pierre Tocquin authored
The variable 'bad_cluster' was commented out and not utilized in the logic flow. This commit eliminates the redundancy by removing the unnecessary assignments and aligning code execution with intended functionality.
-
Pierre Tocquin authored
Removed the set `true_red_clusters` and replaced conditional checks with a boolean flag `bad_cluster` to streamline the decision process for handling small or invalid clusters. This change ensures that any cluster not meeting criteria is consistently processed by modifying pixel values based on contour presence, improving code clarity and maintainability.
-
Pierre Tocquin authored
Add logic to process clusters failing the aspect ratio test in the segmentation correction function. This change involves executing additional code for creating a binary mask of contours when clusters do not meet the defined aspect ratio criteria. This ensures better handling and processing of image segmentation anomalies.
-
Pierre Tocquin authored
Changed the segmentation process by updating the connected components function to use a specific labeling algorithm. Enhanced handling of red clusters by adding a method to modify pixels based on contour analysis and adjacency. Removed small red cluster processing and blue region filling logic, which were not used in this context, potentially preparing for future reimplementation or optimization.
-
- Dec 11, 2024
-
-
Pierre Tocquin authored
Replaced contour-based fusion with a distance transform approach for filling interruptions in nerve segments, improving code simplicity and potentially performance. The redundant function for calculating minimum distances between contours was removed, and morphological operations were added to clean up the fused mask.
-
Pierre Tocquin authored
Replaced the use of cv2.pointPolygonTest with a new custom function min_distance_between_contours to accurately calculate the minimum distance between two contours. This change removes dependency on point-polygon testing and ensures correct contour merging under the specified threshold distance.
-
Pierre Tocquin authored
Replaced the commented-out morphological closing method with a new approach based on contour detection and merging for blue regions (nerve segments). This method identifies and merges close contours, improving segmentation by filling interruptions more accurately. Removed unused code to clean up the function.
-
Pierre Tocquin authored
The `internode_filtering.ijm` script has been deleted. This file performed image processing tasks related to internode analysis, including segmenting and analyzing images, user validation of regions, morphological transformations, and measurement extraction. The removal suggests that the script is either obsolete or replaced by another process or tool. Ensure any dependencies on this script are updated or removed accordingly.
-
Pierre Tocquin authored
Introduce a script for the Teasing Analysis Tool that processes segmented images to analyze and curate internode regions. This tool supports user interaction for validation, applies morphological transformations to improve accuracy, extracts skeleton traces, and computes morphological measurements. Outputs include cleaned ROIs and measurement data saved in specified formats. The script requires ImageJ version 1.54f or later.
-
Pierre Tocquin authored
Adjusted the condition to convert small red clusters to blue if any blue pixels are present in the neighborhood, instead of comparing the count to white pixels. This ensures more consistent identification of node areas in images.
-
- Dec 10, 2024
-
-
Pierre Tocquin authored
Introduce a new ImageJ macro script for analyzing and tracing internode regions in segmented images. The tool performs morphological transformations and allows user validation to refine regions of interest, ultimately outputting cleaned ROIs and measurement data. This script is designed to enhance image processing workflows by providing automated internode identification and trace extraction, improving the accuracy and efficiency of data analysis for relevant biological research applications.
-
- Dec 05, 2024
-
-
Pierre Tocquin authored
The `process_pipeline.py` script now includes a logging system configured to provide timestamps and log levels, replacing print statements for better visibility and traceability in processing steps. The function `configure_logging` has been added to set up logging based on the log level specified in the configuration file. This change enhances the ability to monitor and debug the automated processing of CZI images, with log levels adjustable via configuration to suit different verbosity needs.
-
Pierre Tocquin authored
The deletion of masks, garbage collection, and logging has been commented out in the correct_segmentation_issues function. This change may have been made to debug or test other parts of the code without interference from these operations. Consider potential impacts on memory usage and performance, especially in large-scale processing tasks.
-
Pierre Tocquin authored
The code segment responsible for filling interruptions in nerve segments (blue regions) has been commented out. This includes the creation of a mask, applying morphological operations, and updating pixel values. These changes suggest that the functionality was either obsolete or no longer needed, which can help in maintaining cleaner and more efficient code.
-
Pierre Tocquin authored
Added print statements throughout the `correct_segmentation_issues` function to provide detailed tracing of label evaluation, removal of small red clusters, filling interruptions in blue regions, and application of a blur filter. This aids in debugging by making it easier to follow the execution flow and understand which parts of the image processing pipeline are being executed.
-
- Dec 04, 2024
-
-
Pierre Tocquin authored
Introduce a utility function to log memory usage at various stages of processing, improving the ability to monitor and manage resource consumption. Add calls to garbage collection and log memory usage after critical operations in segmentation correction to optimize performance and prevent memory leaks.
-
Pierre Tocquin authored
The commit rectifies a bug in the `save_image` function where the incorrect variable `image` was used instead of `image_path` when deleting the original image, ensuring the removal operation targets the correct file. This prevents errors and ensures proper cleanup of files during the image processing workflow.
-
Pierre Tocquin authored
Removed the resizing step and its associated code comments for TIFF images in favor of a new `save_image` function that saves images with LZW compression. This change includes skipping the deletion of intermediate TIFF files, now calling `os.remove` only after saving. Additionally, added print statements in `correct_segmentation_issues` for better debugging and status updates.
-
Pierre Tocquin authored
Modified the `resize_image` function to process images in smaller patches, preventing memory overflow when resizing large images. Added an optional `patch_size` parameter, defaulting to 1024, to specify the size of these patches. This approach allows for controlled memory usage and efficient resizing of very large images without sacrificing performance.
-
Pierre Tocquin authored
Changed the image saving functionality from using OpenCV's `cv2.imwrite` to TIFF's `tiff.imwrite` function without compression. This modification is aimed at enhancing compatibility with TIFF image format features. Ensure that the TIFF library is available in your environment to avoid runtime errors.
-
Pierre Tocquin authored
The change ensures that the segmented TIFF file is deleted after processing, freeing up disk space and preventing potential storage issues. This aligns with the existing logic for removing other intermediate TIFF files.
-
- Dec 03, 2024
-
-
Pierre Tocquin authored
The newly added README provides a comprehensive overview of the automated pipeline for processing microscopy images from CZI format to TIFF, including segmentation using Ilastik. It details features, setup instructions, dependencies, usage guidelines, and troubleshooting tips, significantly improving documentation and aiding user understanding and implementation of the process.
-
Pierre Tocquin authored
Added new configuration options (`area_threshold`, `closing_kernel_size`, `aspect_ratio_min`, `aspect_ratio_max`) for improved segmentation correction in processing pipeline. These changes preserve true nodes of Ranvier by filtering based on cluster size and aspect ratio, and fill interruptions in nerve segments using morphological operations. Updated the function and documentation to reflect these enhancements. This improves accuracy and reliability of image segmentation results.
-
- Dec 02, 2024
-
-
Pierre Tocquin authored
This change extracts the base file name without its extension when creating TIFF output files. Previously, the full file path with an extension was used, which could lead to redundant extensions in output filenames. This update ensures clearer and more concise naming conventions for generated files.
-