@@ -35,7 +35,6 @@ def simple_intensities_thresholding(self, path_to_input_image, path_to_output_se
35
35
pfi_output_segm = connect_path_tail_head (self .pfo_out , path_to_output_segmentation )
36
36
nib .save (output_im , pfi_output_segm )
37
37
38
-
39
38
def otsu_thresholding (self , path_to_input_image , path_to_output_segmentation , side = 'above' , return_as_mask = True ):
40
39
"""
41
40
Binary segmentation with Otsu thresholding parameters from skimage filters.
@@ -56,15 +55,16 @@ def otsu_thresholding(self, path_to_input_image, path_to_output_segmentation, si
56
55
pfi_output_segm = connect_path_tail_head (self .pfo_out , path_to_output_segmentation )
57
56
nib .save (output_im , pfi_output_segm )
58
57
59
-
60
58
def mixture_of_gaussians (self , path_to_input_image , path_to_output_segmentation_crisp ,
61
59
path_to_output_segmentation_prob , K = None , mask_im = None , pre_process_median_filter = False ,
62
60
pre_process_only_interquartile = False , see_histogram = None , reorder_mus = True ,
63
61
output_dtype_crisp = np .uint16 , output_dtype_prob = np .float32 ):
64
62
"""
65
63
Wrap of MoG_array for nibabel images.
66
64
-----
67
- :param input_im: nibabel input image format to be segmented with a MOG method.
65
+ :param path_to_input_image: path to input image format to be segmented with a MOG method.
66
+ :param path_to_output_segmentation_crisp: path to output crisp segmentation
67
+ :param path_to_output_segmentation_prob: path to probabilistic output segmentation
68
68
:param K: number of classes, if None, it is estimated with a BIC criterion (may take a while)
69
69
:param mask_im: nibabel mask if you want to consider only a subset of the masked data.
70
70
:param pre_process_median_filter: apply a median filter before pre-processing (reduce salt and pepper noise).
@@ -96,7 +96,7 @@ def mixture_of_gaussians(self, path_to_input_image, path_to_output_segmentation_
96
96
im_prob = set_new_data (input_im , prob , new_dtype = output_dtype_prob )
97
97
98
98
pfi_im_crisp = connect_path_tail_head (self .pfo_out , path_to_output_segmentation_crisp )
99
- pfi_im_prob = connect_path_tail_head (self .pfo_out , path_to_output_segmentation_crisp )
99
+ pfi_im_prob = connect_path_tail_head (self .pfo_out , path_to_output_segmentation_prob )
100
100
101
101
nib .save (im_crisp , pfi_im_crisp )
102
102
nib .save (im_prob , pfi_im_prob )
0 commit comments