Utilities đź› #
Here you will find a range of tools for image processing and analysis. See Usage section for instructions on launching the plugin.
Note
The utility selection menu is found at the bottom of the plugin window.
You may specify the results directory for saving; afterwards you can run each action on a folder or on the currently selected layer.
Default Paths for Saving Results#
Each utility saves results to a default directory under the user’s home directory. The default paths are as follows:
Artifact Removal:
~/cellseg3d/artifact_removed
Fragmentation:
~/cellseg3d/fragmented
Anisotropy Correction:
~/cellseg3d/anisotropy
Small Object Removal:
~/cellseg3d/small_removed
Semantic Label Conversion:
~/cellseg3d/semantic_labels
Instance Label Conversion:
~/cellseg3d/instance_labels
Thresholding:
~/cellseg3d/threshold
Statistics:
~/cellseg3d/stats
Threshold Grid Search:
~/cellseg3d/threshold_grid_search
Available actions#
1. Crop 3D volumes#
Please refer to Cropping✂️ for a guide on using the cropping utility.
2. Convert to instance labels#
This will convert semantic (binary) labels to instance labels (with a unique ID for each object). The available methods for this are:
Connected Components : simple method that will assign a unique ID to each connected component. Does not work well for touching objects (objects will often be fused).
Watershed : method based on topographic maps. Works well for clumped objects and anisotropic volumes depending on the quality of topography; clumed objects may be fused if this is not true.
Voronoi-Otsu : method based on Voronoi diagrams and Otsu thresholding. Works well for clumped objects but only for “round” objects.
3. Convert to semantic labels#
Transforms instance labels into 0/1 semantic labels, useful for training purposes.
4. Remove small objects#
Input a size threshold (in pixels) to eliminate objects below this size.
5. Resize anisotropic images#
Input your microscope’s resolution to remove anisotropy in images.
6. Threshold images#
Removes values beneath a certain threshold.
7. Fragment image#
Break down large images into smaller cubes, optimal for training.
8. Conditional Random Field (CRF)#
Note
This utility is only available if you have installed the pydensecrf package.
You may install it by using the command pip install pydensecrf@git+https://github.com/lucasb-eyer/pydensecrf.git#egg=master
.
9. Labels statistics#
Note
Images that are not only integer labels will be ignored.
The available statistics are:
For each object :
Object volume (pixels)
\(X,Y,Z\) coordinates of the centroid
Sphericity
Global metrics :
Image size
Total image volume (pixels)
Total object (labeled) volume (pixels)
Filling ratio (fraction of the volume that is labeled)
The number of labeled objects
Hint
Check the notebooks
folder for examples of plots using the statistics CSV file.
10. Clear large labels#
11. Find the best threshold#
Caution
If the input prediction is not from the plugin, it will be remapped to the 0-1 range.