diff --git a/skullTo3d/nodes/skull.py b/skullTo3d/nodes/skull.py index 0e8377e..f5a8d2d 100644 --- a/skullTo3d/nodes/skull.py +++ b/skullTo3d/nodes/skull.py @@ -1,115 +1,50 @@ -def mask_auto_threshold(img_file, operation, index): +def mask_auto_img(img_file, operation, index, sample_bins=30, num_clusters=3): + + import os import numpy as np import nibabel as nib + import matplotlib.pyplot as plt + from sklearn.cluster import KMeans - # Mean function - def calculate_mean(data): - total = sum(data) - count = len(data) - mean = total / count - return mean + from nipype.utils.filemanip import split_filename as split_f img_nii = nib.load(img_file) img_arr = np.array(img_nii.dataobj) + print("nb nan: ", np.sum(np.isnan(img_arr))) + img_arr[np.isnan(img_arr)] = 0 + # Reshape data to a 1D array (required by k-means) X = np.copy(img_arr).flatten().reshape(-1, 1) + print("X: ", X) print("X shape : ", X.shape) + print("X max : ", np.max(X)) - # Create a k-means clustering model with 3 clusters - # using k-means++ initialization - - num_clusters = 3 - - kmeans = KMeans(n_clusters=num_clusters, random_state=0) - - # Fit the model to the data and predict cluster labels - cluster_labels = kmeans.fit_predict(X) - - # Split data into groups based on cluster labels - groups = [X[cluster_labels == i].flatten() for i in range(num_clusters)] - - avail_operations = ["min", "mean", "max"] - - assert operation in avail_operations, "Error, \ - {} is not in {}".format(operation, avail_operations) - - assert 0 <= index and index < num_clusters, "Error \ - with index {}".format(index) - - # We must define : the minimum of the second group for the headmask - # we create minimums array, we sort and then take the middle value - minimums_array = np.array([np.amin(group) for group in groups]) - min_sorted = np.sort(minimums_array) - - print("Min : {}".format(" ".join(str(val) for val in min_sorted))) - - # We must define : mean of the second group for the skull extraction - # we create means array, we sort and then take the middle value - means_array = np.array([calculate_mean(group) for group in groups]) - mean_sorted = np.sort(means_array) - - index_sorted = np.argsort(means_array) - - print("Mean : {}".format(" ".join(str(int(val)) for val in mean_sorted))) - - print("Index = {}".format(" ".join(str(int(val)) for val in index_sorted))) - - print("Index mid group : ", index_sorted[index]) - print("Min/max mid group : ", np.amin(groups[index_sorted[index]]), - np.amax(groups[index_sorted[index]])) - - maximums_array = np.array([np.amax(group) for group in groups]) - max_sorted = np.sort(maximums_array) - - print("Max : {}".format(" ".join(str(val) for val in max_sorted))) - - if operation == "min": # for head mask - mask_threshold = min_sorted[index] - print("headmask_threshold : ", mask_threshold) - - elif operation == "mean": # for skull mask - - mask_threshold = mean_sorted[index] - print("skull_extraction_threshold : ", mask_threshold) - - elif operation == "max": # unused - - mask_threshold = max_sorted[index] - print("max threshold : ", mask_threshold) - - return mask_threshold - - -def mask_auto_img(img_file, operation, index, - sample_bins, distance, kmeans): - - import os - import numpy as np - import nibabel as nib - import matplotlib.pyplot as plt + print("Round X max : ", np.round(np.max(X))) + nb_bins = (np.rint((np.max(X) - np.min(X))/sample_bins)).astype(int) + print("Nb bins: ", nb_bins) - from scipy.signal import find_peaks + # Create a histogram + hist, bins, _ = plt.hist(X, bins=nb_bins, + alpha=0.5, color='b', label='Histogram') - from nipype.utils.filemanip import split_filename as split_f + # Add labels and a legend + plt.xlabel('Value') + plt.ylabel('Probability') - def compute_Kmeans(img_arr, operation, index=1, num_clusters=3): - import os - import numpy as np - from sklearn.cluster import KMeans - # Mean function + # Save the figure as a PNG file + plt.savefig(os.path.abspath('histogram.png')) + plt.clf() - def calculate_mean(data): - total = sum(data) - count = len(data) - mean = total / count - return mean + # filtering + new_mask_data = np.zeros(img_arr.shape, dtype=img_arr.dtype) - g = open(os.path.abspath("kmeans.log"), "w+") + assert operation in ["higher", "interval", "lower"], \ + "Error in operation {}".format(operation) - print("Running Kmeans with : ", operation, index, num_clusters) + with open(os.path.abspath("kmeans.log"), "w+") as g: g.write("Running Kmeans with : {} {} {}\n".format( operation, index, num_clusters)) @@ -139,8 +74,6 @@ def calculate_mean(data): minimums_array = np.array([np.amin(group) for group in groups]) min_sorted = np.sort(minimums_array) - print("Cluster Min : {}".format( - " ".join(str(val) for val in min_sorted))) g.write("Cluster Min : {}\n".format( " ".join(str(val) for val in min_sorted))) @@ -149,55 +82,40 @@ def calculate_mean(data): maximums_array = np.array([np.amax(group) for group in groups]) max_sorted = np.sort(maximums_array) - print("Cluster Max : {}".format( - " ".join(str(val) for val in max_sorted))) g.write("Cluster Max : {}\n".format( " ".join(str(val) for val in max_sorted))) # We must define : mean of the second group for the skull extraction # we create means array, we sort and then take the middle value - means_array = np.array([calculate_mean(group) for group in groups]) + means_array = np.array([sum(group)/len(group) for group in groups]) mean_sorted = np.sort(means_array) index_sorted = np.argsort(means_array) - print("Cluster Mean : {}".format( - " ".join(str(int(val)) for val in mean_sorted))) g.write("Cluster Mean : {}\n".format( " ".join(str(int(val)) for val in mean_sorted))) - print("Cluster Indexes = {}".format( - " ".join(str(int(val)) for val in index_sorted))) g.write("Cluster Indexes = {}\n".format( " ".join(str(int(val)) for val in index_sorted))) - print("Indexed cluster ({}): {}".format( - index, index_sorted[index])) g.write("Indexed cluster ({}): {}\n".format( index, index_sorted[index])) min_thresh = np.amin(groups[index_sorted[index]]) max_thresh = np.amax(groups[index_sorted[index]]) - print("Min/max mid group : {} {}".format(min_thresh, - max_thresh)) - g.write("Min/max mid group : {} {}\n".format(min_thresh, - max_thresh)) + g.write("Min/max mid group : {} {}\n".format( + min_thresh, max_thresh)) if operation == "lower": - print("Filtering with lower threshold {}".format(min_thresh)) g.write("Filtering with lower threshold {}\n".format(min_thresh)) fiter_array = min_thresh < img_arr elif operation == "higher": - print("Filtering with higher threshold {}".format(max_thresh)) g.write("Filtering with higher threshold {}\n".format(max_thresh)) fiter_array = img_arr < max_thresh elif operation == "interval": - print( - "Filtering between lower {} and higher {}".format( - min_thresh, max_thresh)) g.write( "Filtering between lower {} and higher {}\n".format( min_thresh, max_thresh)) @@ -205,183 +123,12 @@ def calculate_mean(data): fiter_array = np.logical_and(min_thresh < img_arr, img_arr < max_thresh) - g.close() - - return fiter_array - - log_file = os.path.abspath("local_minima.log") - - f = open(log_file, "w+") - - print("Running local minimas with : kmeans=", - kmeans, operation, index, sample_bins, distance) - - f.write("Running local minimas with : kmeans={} {} {} {} {}\n".format( - kmeans, operation, index, sample_bins, distance)) - - img_nii = nib.load(img_file) - img_arr = np.array(img_nii.dataobj) - - print("nb nan: ", np.sum(np.isnan(img_arr))) - img_arr[np.isnan(img_arr)] = 0 - - # Reshape data to a 1D array (required by k-means) - X = np.copy(img_arr).flatten().reshape(-1, 1) - - print("X: ", X) - print("X shape : ", X.shape) - print("X max : ", np.max(X)) - - print("Round X max : ", np.round(np.max(X))) - nb_bins = (np.rint((np.max(X) - np.min(X))/sample_bins)).astype(int) - print("Nb bins: ", nb_bins) - - f.write("X shape : {}\n".format(X.shape)) - f.write("X max : {}\n".format(np.round(np.max(X)))) - f.write("Nb bins: {}\n".format(nb_bins)) - - # Create a histogram - hist, bins, _ = plt.hist(X, bins=nb_bins, - alpha=0.5, color='b', label='Histogram') - - # Add labels and a legend - plt.xlabel('Value') - plt.ylabel('Probability') - - # Save the figure as a PNG file - plt.savefig(os.path.abspath('histogram.png')) - plt.clf() - - # Find local minima in the histogram - peaks, _ = find_peaks(-hist, distance=distance) - # Use negative histogram for minima - - print("peaks indexes :", peaks) - - print("peak_hist :", hist[peaks]) - print("peak_bins :", bins[peaks]) - - f.write("peaks indexes : {}\n".format(peaks)) - f.write("peak_hist : {}\n".format(hist[peaks])) - f.write("peak_bins : {}\n".format(bins[peaks])) - - # filtering - new_mask_data = np.zeros(img_arr.shape, dtype=img_arr.dtype) - - assert operation in ["higher", "interval", "lower"], \ - "Error in operation {}".format(operation) - - if kmeans: - print("kmeans=True, Skipping local minima") - f.write("kmeans=True, Skipping local minima\n") - - proceed = False - else: - - print("Running local minima, then Kmeans if failing") - f.write("Running local minima, then Kmeans if failing\n") - proceed = True - - if operation == "interval": - if not (isinstance(index, list) and len(index) == 2): - print("Error, index {} should be a list for interval".format( - index)) - proceed = False - - if not (peaks.shape[0] > 1): - print("Error, could not find at least two local minima") - proceed = False - - if index[0] < 0 or len(bins[peaks]) <= index[0]: - print("Error, index 0 {} out of peak indexes ".format(index[0])) - proceed = False - - if index[1] < index[0] or len(bins[peaks]) <= index[1]: - print("Error, index 1 {} out of peak indexes ".format(index[1])) - proceed = False - - if proceed: - index_peak_min = bins[peaks][index[0]] - index_peak_max = bins[peaks][index[1]] - - print("Keeping interval between {} and {}".format( - index_peak_min, - index_peak_max)) - - f.write("Keeping interval between {} and {}\n".format( - index_peak_min, index_peak_max)) - - filter_arr = np.logical_and( - index_peak_min < img_arr, - img_arr < index_peak_max) - - else: - - print("Running Kmeans with interval index {}\n".format(index)) - f.write("Running Kmeans with interval index {}\n".format(index)) - filter_arr = compute_Kmeans(img_arr, operation="interval", index=1) - - elif operation == "higher": - if not isinstance(index, int): - print("Error, index {} should be a integer for higher".format( - index)) - proceed = False - - if index < 0 or len(bins[peaks]) <= index: - - print("Error, {} out of peak indexes ".format(index)) - proceed = False - - if proceed: - index_peak_max = bins[peaks][index] - - f.write("Filtering with higher threshold {}\n".format( - index_peak_max)) - print("Filtering with higher threshold {}\n".format( - index_peak_max)) - - filter_arr = img_arr < index_peak_max - - else: - - print("Running Kmeans with higher index {}\n".format(index)) - f.write("Running Kmeans with higher index {}\n".format(index)) - filter_arr = compute_Kmeans( - img_arr, operation="higher", index=index) - - elif operation == "lower": - if not isinstance(index, int): - print("Error, index {} should be a integer for lower".format( - index)) - proceed = False - - if index < 0 or len(bins[peaks]) <= index: - - print("Error, {} out of peak indexes ".format(index)) - proceed = False - - if proceed: - index_peak_min = bins[peaks][index] - - f.write("Filtering with lower threshold {}\n".format( - index_peak_min)) - print("Filtering with lower threshold {}\n".format( - index_peak_min)) - - filter_arr = index_peak_min < img_arr - else: - print("Running Kmeans with lower index {}\n".format(index)) - f.write("Running Kmeans with lower index {}\n".format(index)) - filter_arr = compute_Kmeans( - img_arr, operation="lower", index=index) - - new_mask_data[filter_arr] = img_arr[filter_arr] + new_mask_data[fiter_array] = img_arr[fiter_array] print("Before filter: ", np.sum(img_arr != 0.0), "After filter: ", np.sum(new_mask_data != 0.0)) # saving mask as nii - path, fname, ext = split_f(img_file) mask_img_file = os.path.abspath(fname + "_autothresh" + ext) @@ -391,6 +138,4 @@ def calculate_mean(data): affine=img_nii.affine) nib.save(mask_img, mask_img_file) - f.close() - return mask_img_file diff --git a/skullTo3d/pipelines/skull_pipe.py b/skullTo3d/pipelines/skull_pipe.py index 296d84b..4056a43 100644 --- a/skullTo3d/pipelines/skull_pipe.py +++ b/skullTo3d/pipelines/skull_pipe.py @@ -117,7 +117,7 @@ def _create_head_mask(name="headmask_pipe", params={}, prefix=""): head_auto_mask = NodeParams( interface=niu.Function( input_names=["img_file", "operation", - "index", "sample_bins", "distance", "kmeans"], + "index"], output_names=["mask_img_file"], function=mask_auto_img), params=parse_key(params, prefix + "head_auto_mask"), @@ -658,7 +658,7 @@ def _create_skullmask_ct_pipe(name="skullmask_ct_pipe", params={}): ct_skull_auto_mask = NodeParams( interface=niu.Function( input_names=["img_file", "operation", - "index", "sample_bins", "distance", "kmeans"], + "index"], output_names=["mask_img_file"], function=mask_auto_img), params=parse_key(params, "ct_skull_auto_mask"), diff --git a/workflows/params_segment_macaque_0p5_ants_4animal_skull.json b/workflows/params_segment_macaque_0p5_ants_4animal_skull.json index 5bdf91f..ce03c46 100644 --- a/workflows/params_segment_macaque_0p5_ants_4animal_skull.json +++ b/workflows/params_segment_macaque_0p5_ants_4animal_skull.json @@ -89,11 +89,8 @@ { "t1_head_auto_mask": { - "kmeans": true, "operation": "lower", - "index": 2, - "sample_bins": 30, - "distance": 10 + "index": 2 }, "t1_head_dilate": { @@ -341,9 +338,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, @@ -367,9 +361,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, diff --git a/workflows/params_segment_macaque_0p5_ants_4animal_skullnoisypetra.json b/workflows/params_segment_macaque_0p5_ants_4animal_skullnoisypetra.json index 2bc0b05..cdfd8fe 100644 --- a/workflows/params_segment_macaque_0p5_ants_4animal_skullnoisypetra.json +++ b/workflows/params_segment_macaque_0p5_ants_4animal_skullnoisypetra.json @@ -89,11 +89,8 @@ { "t1_head_auto_mask": { - "kmeans": true, "operation": "lower", - "index": 2, - "sample_bins": 30, - "distance": 10 + "index": 2 }, "t1_head_dilate": { @@ -356,9 +353,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, @@ -382,9 +376,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, diff --git a/workflows/params_segment_macaque_0p5_ants_quick_skull.json b/workflows/params_segment_macaque_0p5_ants_quick_skull.json index 3e9b5db..7984992 100644 --- a/workflows/params_segment_macaque_0p5_ants_quick_skull.json +++ b/workflows/params_segment_macaque_0p5_ants_quick_skull.json @@ -88,11 +88,8 @@ { "t1_head_auto_mask": { - "kmeans": true, "operation": "lower", - "index": 2, - "sample_bins": 30, - "distance": 10 + "index": 2 }, "t1_head_dilate": { @@ -340,9 +337,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, @@ -366,9 +360,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, diff --git a/workflows/params_segment_macaque_0p5_ants_quick_skullnoisypetra.json b/workflows/params_segment_macaque_0p5_ants_quick_skullnoisypetra.json index feee966..00d4e3b 100644 --- a/workflows/params_segment_macaque_0p5_ants_quick_skullnoisypetra.json +++ b/workflows/params_segment_macaque_0p5_ants_quick_skullnoisypetra.json @@ -88,11 +88,8 @@ { "t1_head_auto_mask": { - "kmeans": true, "operation": "lower", - "index": 2, - "sample_bins": 30, - "distance": 10 + "index": 2 }, "t1_head_dilate": { @@ -355,9 +352,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, @@ -381,9 +375,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, diff --git a/workflows/params_segment_macaque_0p5_ants_skull.json b/workflows/params_segment_macaque_0p5_ants_skull.json index ad5e562..82cf11f 100644 --- a/workflows/params_segment_macaque_0p5_ants_skull.json +++ b/workflows/params_segment_macaque_0p5_ants_skull.json @@ -94,11 +94,8 @@ { "t1_head_auto_mask": { - "kmeans": true, "operation": "lower", - "index": 2, - "sample_bins": 30, - "distance": 10 + "index": 2 }, "t1_head_dilate": { @@ -346,9 +343,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, @@ -372,9 +366,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, diff --git a/workflows/params_segment_macaque_0p5_ants_skullnoisypetra.json b/workflows/params_segment_macaque_0p5_ants_skullnoisypetra.json index a9ebce1..856acef 100644 --- a/workflows/params_segment_macaque_0p5_ants_skullnoisypetra.json +++ b/workflows/params_segment_macaque_0p5_ants_skullnoisypetra.json @@ -94,11 +94,8 @@ { "t1_head_auto_mask": { - "kmeans": true, "operation": "lower", - "index": 2, - "sample_bins": 30, - "distance": 10 + "index": 2 }, "t1_head_dilate": { @@ -361,9 +358,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, @@ -387,9 +381,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, diff --git a/workflows/params_segment_macaque_ants_4animal_skull.json b/workflows/params_segment_macaque_ants_4animal_skull.json index bcce5cc..7c872ef 100644 --- a/workflows/params_segment_macaque_ants_4animal_skull.json +++ b/workflows/params_segment_macaque_ants_4animal_skull.json @@ -347,9 +347,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, diff --git a/workflows/params_segment_macaque_ants_4animal_skullnoisypetra.json b/workflows/params_segment_macaque_ants_4animal_skullnoisypetra.json index 02fdf92..73be5ad 100644 --- a/workflows/params_segment_macaque_ants_4animal_skullnoisypetra.json +++ b/workflows/params_segment_macaque_ants_4animal_skullnoisypetra.json @@ -358,9 +358,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, diff --git a/workflows/params_segment_macaque_ants_quick_skull.json b/workflows/params_segment_macaque_ants_quick_skull.json index c31e14e..9948809 100644 --- a/workflows/params_segment_macaque_ants_quick_skull.json +++ b/workflows/params_segment_macaque_ants_quick_skull.json @@ -345,9 +345,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, diff --git a/workflows/params_segment_macaque_ants_quick_skullnoisypetra.json b/workflows/params_segment_macaque_ants_quick_skullnoisypetra.json index 2667dca..fc82eb5 100644 --- a/workflows/params_segment_macaque_ants_quick_skullnoisypetra.json +++ b/workflows/params_segment_macaque_ants_quick_skullnoisypetra.json @@ -357,9 +357,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, diff --git a/workflows/params_segment_macaque_ants_skull.json b/workflows/params_segment_macaque_ants_skull.json index 8bc6482..5a9a4f5 100755 --- a/workflows/params_segment_macaque_ants_skull.json +++ b/workflows/params_segment_macaque_ants_skull.json @@ -351,9 +351,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, diff --git a/workflows/params_segment_macaque_ants_skullnoisypetra.json b/workflows/params_segment_macaque_ants_skullnoisypetra.json index 80ff68a..9a9d481 100644 --- a/workflows/params_segment_macaque_ants_skullnoisypetra.json +++ b/workflows/params_segment_macaque_ants_skullnoisypetra.json @@ -363,9 +363,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, diff --git a/workflows/params_segment_macaque_skull.json b/workflows/params_segment_macaque_skull.json index 1d1e8ce..feefd4c 100644 --- a/workflows/params_segment_macaque_skull.json +++ b/workflows/params_segment_macaque_skull.json @@ -130,9 +130,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, diff --git a/workflows/params_segment_macaque_spm_skull.json b/workflows/params_segment_macaque_spm_skull.json index 6f00bdb..086f85e 100644 --- a/workflows/params_segment_macaque_spm_skull.json +++ b/workflows/params_segment_macaque_spm_skull.json @@ -206,9 +206,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, diff --git a/workflows/params_segment_macaque_spm_skullnoisypetra.json b/workflows/params_segment_macaque_spm_skullnoisypetra.json index 4d6ab02..abfee68 100644 --- a/workflows/params_segment_macaque_spm_skullnoisypetra.json +++ b/workflows/params_segment_macaque_spm_skullnoisypetra.json @@ -221,9 +221,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, diff --git a/workflows/params_segment_marmo_ants_4animal_skull.json b/workflows/params_segment_marmo_ants_4animal_skull.json index b470049..c752c9a 100644 --- a/workflows/params_segment_marmo_ants_4animal_skull.json +++ b/workflows/params_segment_marmo_ants_4animal_skull.json @@ -308,9 +308,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, diff --git a/workflows/params_segment_marmo_ants_quick_skull.json b/workflows/params_segment_marmo_ants_quick_skull.json index a076f96..8ace002 100644 --- a/workflows/params_segment_marmo_ants_quick_skull.json +++ b/workflows/params_segment_marmo_ants_quick_skull.json @@ -306,9 +306,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, diff --git a/workflows/params_segment_marmo_ants_skull.json b/workflows/params_segment_marmo_ants_skull.json index a733db0..3c9ffec 100644 --- a/workflows/params_segment_marmo_ants_skull.json +++ b/workflows/params_segment_marmo_ants_skull.json @@ -311,9 +311,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, diff --git a/workflows/params_segment_marmo_ants_skullnoisypetra.json b/workflows/params_segment_marmo_ants_skullnoisypetra.json index bf2395e..4356a7d 100644 --- a/workflows/params_segment_marmo_ants_skullnoisypetra.json +++ b/workflows/params_segment_marmo_ants_skullnoisypetra.json @@ -361,9 +361,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, diff --git a/workflows/params_segment_marmo_spm_skull.json b/workflows/params_segment_marmo_spm_skull.json index a58b2ce..797fd56 100644 --- a/workflows/params_segment_marmo_spm_skull.json +++ b/workflows/params_segment_marmo_spm_skull.json @@ -306,9 +306,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, diff --git a/workflows/params_segment_marmot2_ants_4animal_skull.json b/workflows/params_segment_marmot2_ants_4animal_skull.json index 1a8500a..ae382c6 100644 --- a/workflows/params_segment_marmot2_ants_4animal_skull.json +++ b/workflows/params_segment_marmot2_ants_4animal_skull.json @@ -309,9 +309,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, diff --git a/workflows/params_segment_marmot2_ants_skull.json b/workflows/params_segment_marmot2_ants_skull.json index 292dde1..f3144f1 100755 --- a/workflows/params_segment_marmot2_ants_skull.json +++ b/workflows/params_segment_marmot2_ants_skull.json @@ -307,9 +307,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 }, diff --git a/workflows/params_segment_marmot2_spm_skull.json b/workflows/params_segment_marmot2_spm_skull.json index 1ab52a0..1eb30b6 100644 --- a/workflows/params_segment_marmot2_spm_skull.json +++ b/workflows/params_segment_marmot2_spm_skull.json @@ -311,9 +311,6 @@ { "ct_skull_auto_mask": { - "kmeans": true, - "sample_bins": 30, - "distance": 10, "operation": "lower", "index": 2 },