@@ -122,7 +122,7 @@ def marker_detection(
122122 mask_path : str ,
123123 output_folder : str ,
124124 model_path : str ,
125- mask_key : str = "s4" ,
125+ mask_input_key : str = "s4" ,
126126 max_distance : float = 20 ,
127127 resolution : float = 0.38 ,
128128):
@@ -134,7 +134,7 @@ def marker_detection(
134134 mask_path: Path to IHC segmentation used to mask input.
135135 output_folder: Output folder for synapse segmentation and marker detection.
136136 model_path: Path to model for synapse detection.
137- mask_key : Key to undersampled IHC segmentation for masking input for synapse detection.
137+ mask_input_key : Key to undersampled IHC segmentation for masking input for synapse detection.
138138 max_distance: The maximal distance for a valid match of synapse markers to IHCs.
139139 resolution: The resolution / voxel size of the data in micrometer.
140140 """
@@ -146,20 +146,20 @@ def marker_detection(
146146
147147 skip_masking = False
148148
149- mask_key = "mask"
149+ mask_preprocess_key = "mask"
150150 output_file = os .path .join (output_folder , "mask.zarr" )
151151
152- if os .path .exists (output_file ) and mask_key in zarr .open (output_file , "r" ):
152+ if os .path .exists (output_file ) and mask_preprocess_key in zarr .open (output_file , "r" ):
153153 skip_masking = True
154154
155155 if not skip_masking :
156- mask_ = read_image_data (mask_path , mask_key )
156+ mask_ = read_image_data (mask_path , mask_input_key )
157157 new_mask = np .zeros (mask_ .shape )
158158 new_mask [mask_ != 0 ] = 1
159159 arr_bin = binary_dilation (mask_ , structure = np .ones ((9 , 9 , 9 ))).astype (int )
160160
161161 with zarr .open (output_file , mode = "w" ) as f_out :
162- f_out .create_dataset (mask_key , data = arr_bin , compression = "gzip" )
162+ f_out .create_dataset (mask_preprocess_key , data = arr_bin , compression = "gzip" )
163163
164164 # 2.) Run inference and detection of maxima.
165165 # This can be taken from 'scripts/synapse_marker_detection/run_prediction.py'
0 commit comments