Skip to content

Commit 1ad29de

Browse files
committed
BUG corrected in facade mixture of gaussian
1 parent 8e1836c commit 1ad29de

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

LABelsToolkit/agents/segmenter.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def simple_intensities_thresholding(self, path_to_input_image, path_to_output_se
3535
pfi_output_segm = connect_path_tail_head(self.pfo_out, path_to_output_segmentation)
3636
nib.save(output_im, pfi_output_segm)
3737

38-
3938
def otsu_thresholding(self, path_to_input_image, path_to_output_segmentation, side='above', return_as_mask=True):
4039
"""
4140
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
5655
pfi_output_segm = connect_path_tail_head(self.pfo_out, path_to_output_segmentation)
5756
nib.save(output_im, pfi_output_segm)
5857

59-
6058
def mixture_of_gaussians(self, path_to_input_image, path_to_output_segmentation_crisp,
6159
path_to_output_segmentation_prob, K=None, mask_im=None, pre_process_median_filter=False,
6260
pre_process_only_interquartile=False, see_histogram=None, reorder_mus=True,
6361
output_dtype_crisp=np.uint16, output_dtype_prob=np.float32):
6462
"""
6563
Wrap of MoG_array for nibabel images.
6664
-----
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
6868
:param K: number of classes, if None, it is estimated with a BIC criterion (may take a while)
6969
:param mask_im: nibabel mask if you want to consider only a subset of the masked data.
7070
: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_
9696
im_prob = set_new_data(input_im, prob, new_dtype=output_dtype_prob)
9797

9898
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)
100100

101101
nib.save(im_crisp, pfi_im_crisp)
102102
nib.save(im_prob, pfi_im_prob)

0 commit comments

Comments
 (0)