-
Notifications
You must be signed in to change notification settings - Fork 2
Autocrop
[[TOC]]
To extract large numbers of nuclei from a wide-field image, we have designed a process called autocrop here performed in 3D although this can also be achieved for 2D images. The basic principles of the autocrop process relies on a simple Otsu threshold method applied to the wide-field image. A bounding box surrounding the 3D nuclei are defined to crop the nuclei from the wide-field image. To avoid to select too many objects which are not nuclei, a simple and scalable size filter was introduced. A second scalable filter allow to limit the number of multiple boxes for a given nucleus especially for large nuclei. Autocrop parameters are set by default but can be modified prior to the analysis through a configuration file (config file).
First click on Autocrop NucleusJ 2 in NucleusJ2.0 plugin menu :

Then choose a folder containing one or several images to crop as input and an output folder in the following window :

After cropping you will obtain in tree folders and one results file :
- coordinates folder contain one text file per image analyzed. It contains a 3D crop position relative to input image and a summary of the analysis :
-
nuclei folder contain one file per crop obtain with the structure name InputImageName_CropNumber_ChannelNumber. Exemple : RawImage_0_C0.tif
-
zprojection folder contain 1 voxel max projection per input image with the structure named InputImageName_projection. We draw on this projection crop boxes and corresponding numbers, example :
- result_Autocrop_Analyse.csv contains a summarize of analyzed images (number of crop per image , used Otsu threshold ...) exemple :
By default there is a list of parameters defined (see next table). You can modify these parameters in graphical interface :

Parameters can be modified in the new window :

Description of the editable parameters :
| Parameter name | Default value | Value type | Corresponding number in user interface | Description |
|---|---|---|---|---|
| xCropBoxSize | 40 | Int | 1 | Number of voxels added to xmin and xmax of the connected component defining the final box size in x |
| yCropBoxSize | 40 | Int | 2 | Number of voxels added to ymin and ymax of the connected component defining the final box size in y |
| zCropBoxSize | 20 | Int | 3 | Number of voxels added to zmin and zmax of the connected component defining the final box size in z |
| minVolumeNucleus | 1 | Int | 4 | Minimum volume of detected object |
| maxVolumeNucleus | 2147483647 | Int | 5 | Maximum volume of detected object |
| thresholdOSTUcomputing | 20 | Int | 6 | Minimal default OTSU threshold |
| channelToComputeThreshold | 0 | Int | 7 | Channel number used to compute OTSU threshold (Channel 1 is 0 etc) |
| slicesOTSUcomputing | 0 | Int | 8 | Slice start used to compute OTSU threshold |
| boxesPercentSurfaceToFilter | 50 | Int | 9 | Surface percent of boxes to groups them |
| boxesRegroupement | true | boolean | true/false | Activation of boxes regroupement |
| xcal | 1 | Double | 11 | X calibration value |
| ycal | 1 | Double | 12 | Y calibration value |
| zcal | 1 | Double | 13 | Z calibration value |
If a special parameter configuration is needed/necessary, a config file can be used. A config file can be selected before analyzing :
The config file is text file containing one parameter per line composed of ParameterName:ParameterValue. “In this example, the x and y sizes of the cropping boxes and the minimal OTSU threshold are modified: