Skip to content

Autocrop

Tristan Dubos edited this page Oct 12, 2020 · 12 revisions

Table of content

[[TOC]]

Description

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 rely on a simple Otsu threshold method applied to the wide-field image. bounding box surrounding the 3D nuclei are defined to crop the nuclei from the wide-field image. To avoid to select to 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 can be modified prior to the analysis through a configuration file (config file).

Running autocrop (default parameters)

First click on Autocrop NucleusJ 2 in NucleusJ2.0 plugin menu :

NUCLEUSJ2-PLUGIN-MENU_CUT

Then chose folder containing 1 or several images to crop as input and an output folder in the following window :

Autocrop_window

Autocrop results

After cropping you will obtain in 3 folders and 1 results file :

![results_folder](uploads/f69d015113141929e74858f872927df1/results_folder.png)
  • coordinates folder contain 1 text file per image analyzed. It contains 3D crop position relative to input image and a summarize of the analyze :
![Coordinates_file_exemple_PPT](uploads/26ead7b220c2d54e0a3ea63de99a59bc/Coordinates_file_exemple_PPT.png)
  • nuclei folder contain 1 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 name InputImageName_projection. We draw on this projection crop boxes and numbers corresponding, exemple :

![zprojection_exemple_PPT](uploads/0885509e6053b661a4728a2e8cf0e589/zprojection_exemple_PPT.png)
  • result_Autocrop_Analyse.csv contain a summarize of analyzed images (number of crop per image , OTSU threshold used ...) exemple :
![result_autocrop_analyse_PPT](uploads/e330482c549ec5cf568fb35b451926d8/result_autocrop_analyse_PPT.png)

List of available parameters

By default there is a list of parameters defined (see next table). You can modify this parameter in graphical interface :

Autocrop_parameters_interface_PPT

In the new window you can modify parameters :

AUTOCROP-PARAMETERS-WINDOW

Description of different parameters you can modify :

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 10 boolean 10 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 you are using a special parameter configuration you can use a config file. You can select you config file before analyze :

![Autocrop_config_file_selection_window_PTT](uploads/7d1e1f2b533940b4f28994e548a515dd/Autocrop_config_file_selection_window_PTT.png)

Config file is text file containing 1 parameter per line composed of ParameterName:ParameterValue. In this example here we want to modify the x y boxes size of crop and the minimal OTSU threshold to detect object :

![config_file_exemple](uploads/f7ce033026b4470df64bc02393e28f1f/config_file_exemple.png)

Back home

Clone this wiki locally