@@ -57,25 +57,25 @@ def imgplus_to_population3d(imp):
5757
5858
5959def segment_3D_image (imp , title = None , min_thresh = 1 , min_vol = None , max_vol = None ):
60- """Segment a 3D binary image to get a labelled stack
60+ """Segment a 3D binary image to get a labelled stack.
6161
6262 Parameters
6363 ----------
6464 imp : ImagePlus
65- Binary 3D stack
65+ Binary 3D stack.
6666 title : str, optional
67- Title of the new image
67+ Title of the new image.
6868 min_thresh : int, optional
69- Threshold to do segmentation, also allows for label filtering by default 1
69+ Threshold to do segmentation, also allows for label filtering, by default 1.
7070 min_vol : int, optional
71- Volume (voxels) under which to filter objects, by default None
71+ Volume (voxels) under which to filter objects, by default None.
7272 max_vol : int, optional
73- Volume above which to filter objects, by default None
73+ Volume above which to filter objects, by default None.
7474
7575 Returns
7676 -------
7777 ImagePlus
78- Segmented 3D labelled ImagePlus
78+ Segmented 3D labelled ImagePlus.
7979 """
8080 cal = imp .getCalibration ()
8181 img = ImageHandler .wrap (imp )
@@ -85,14 +85,14 @@ def segment_3D_image(imp, title=None, min_thresh=1, min_vol=None, max_vol=None):
8585 if min_vol :
8686 labeler .setMinSizeCalibrated (min_vol , img )
8787 if max_vol :
88- labeler .setMaxSizeCalibrated (max_vol , img ) # Issue with typo an
89- # TODO: this method might not work on older Fiji deployments, needs testing on newer versions
90- # (deprecated .setMaxsize, it's .setMaxSizeCalibrated)
88+ labeler .setMaxSizeCalibrated (max_vol , img ) # Issue with typo an
89+ # TODO: this method might not work on older Fiji deployments, needs testing
90+ # on newer versions (deprecated .setMaxsize, it's .setMaxSizeCalibrated)
9191 # TODO Keep it in mind for next Fiji deployment
9292 # labeler.setMaxsize(max_vol)
9393
9494 seg = labeler .getLabels (img )
9595 seg .setScale (cal .pixelWidth , cal .pixelDepth , cal .getUnits ())
9696 seg .setTitle (title )
9797
98- return seg .getImagePlus ()
98+ return seg .getImagePlus ()
0 commit comments