@@ -105,25 +105,162 @@ threshold_otsu_func(const Device::Pointer & device, const Array::Pointer & src,
105
105
106
106
107
107
/* *
108
- * @name filter_label_by_size
109
- * @brief Filter labelled objects outside of the min/max size range value.
108
+ * @name label_pixel_count_map
109
+ * @brief Takes a label map, determines the number of pixels per label and replaces every label with the that number.
110
+ * This results in a parametric image expressing area or volume.
111
+ *
112
+ * @param device Device to perform the operation on. [const Device::Pointer &]
113
+ * @param src Label image to measure [const Array::Pointer &]
114
+ * @param dst Parametric image computed[Array::Pointer ( = None )]
115
+ * @return Array::Pointer
116
+ *
117
+ * @note 'label measurement', 'map', 'in assistant'
118
+ * @see https://clij.github.io/clij2-docs/reference_pixelCountMap
119
+ */
120
+ auto
121
+ label_pixel_count_map_func (const Device::Pointer & device,
122
+ const Array::Pointer & src,
123
+ Array::Pointer dst) -> Array::Pointer;
124
+
125
+
126
+ /* *
127
+ * @name centroids_of_labels
128
+ * @brief Determines the centroids of all labels in a label image or image stack.
129
+ * It writes the resulting coordinates in point list image of dimensions n * d
130
+ * where n is the number of labels and d=3 the dimensionality (x,y,z) of the original image.
131
+ *
132
+ * @param device Device to perform the operation on. [const Device::Pointer &]
133
+ * @param src Label image where the centroids will be determined from. [const Array::Pointer &]
134
+ * @param dst Output image where the centroids will be written to. [Array::Pointer ( = None )]
135
+ * @param withBG Determines if the background label should be included. [bool ( = False )]
136
+ * @return Array::Pointer
137
+ *
138
+ * @note 'bia-bob-suggestion'
139
+ * @see https://clij.github.io/clij2-docs/reference_centroidsOfLabels
140
+ */
141
+ auto
142
+ centroids_of_labels_func (const Device::Pointer & device, const Array::Pointer & src, Array::Pointer dst, bool withBG)
143
+ -> Array::Pointer;
144
+
145
+
146
+ /* *
147
+ * @name remove_labels_with_values_out_of_range
148
+ * @brief Remove labels with values outside a given value range based on a vector of values
149
+ * associated with the labels.
150
+ *
151
+ * @param device Device to perform the operation on. [const Device::Pointer &]
152
+ * @param src Input image where labels will be filtered. [const Array::Pointer &]
153
+ * @param values Vector of values associated with the labels. [const Array::Pointer &]
154
+ * @param dst Output image where labels will be written to. [Array::Pointer ( = None )]
155
+ * @param min_value Minimum value to keep. [float ( = 0 )]
156
+ * @param max_value Maximum value to keep. [float ( = 100 )]
157
+ * @return Array::Pointer
158
+ *
159
+ * @note 'label processing', 'combine'
160
+ * @see https://clij.github.io/clij2-docs/reference_excludeLabelsWithValuesOutOfRange
161
+ */
162
+ auto
163
+ remove_labels_with_values_out_of_range_func (const Device::Pointer & device,
164
+ const Array::Pointer & src,
165
+ const Array::Pointer & values,
166
+ Array::Pointer dst,
167
+ float min_value,
168
+ float max_value) -> Array::Pointer;
169
+
170
+ /* *
171
+ * @name remove_labels_with_values_within_range
172
+ * @brief Remove labels with values inside a given value range based on a vector of values
173
+ * associated with the labels.
174
+ *
175
+ * @param device Device to perform the operation on. [const Device::Pointer &]
176
+ * @param src Input image where labels will be filtered. [const Array::Pointer &]
177
+ * @param values Vector of values associated with the labels. [const Array::Pointer &]
178
+ * @param dst Output image where labels will be written to. [Array::Pointer ( = None )]
179
+ * @param min_value Minimum value to keep. [float ( = 0 )]
180
+ * @param max_value Maximum value to keep. [float ( = 100 )]
181
+ * @return Array::Pointer
182
+ *
183
+ * @note 'label processing', 'combine'
184
+ * @see https://clij.github.io/clij2-docs/reference_excludeLabelsWithValuesWithinRange
185
+ */
186
+ auto
187
+ remove_labels_with_values_within_range_func (const Device::Pointer & device,
188
+ const Array::Pointer & src,
189
+ const Array::Pointer & values,
190
+ Array::Pointer dst,
191
+ float min_value,
192
+ float max_value) -> Array::Pointer;
193
+
194
+ /* *
195
+ * @name exclude_labels_with_values_out_of_range
196
+ * @brief Exclude labels with values outside a given value range based on a vector of values
197
+ * associated with the labels.
198
+ *
199
+ * @param device Device to perform the operation on. [const Device::Pointer &]
200
+ * @param src Input image where labels will be filtered. [const Array::Pointer &]
201
+ * @param values Vector of values associated with the labels. [const Array::Pointer &]
202
+ * @param dst Output image where labels will be written to. [Array::Pointer ( = None )]
203
+ * @param min_value_range Minimum value to keep. [float ( = 0 )]
204
+ * @param max_value_range Maximum value to keep. [float ( = 100 )]
205
+ * @return Array::Pointer
206
+ *
207
+ * @note 'label processing', 'combine'
208
+ * @see https://clij.github.io/clij2-docs/reference_excludeLabelsWithValuesOutOfRange
209
+ * @deprecated This function is deprecated. Use remove_labels_with_values_out_of_range_func instead.
210
+ */
211
+ auto
212
+ exclude_labels_with_values_out_of_range_func (const Device::Pointer & device,
213
+ const Array::Pointer & src,
214
+ const Array::Pointer & values,
215
+ Array::Pointer dst,
216
+ float min_value_range,
217
+ float max_value_range) -> Array::Pointer;
218
+
219
+ /* *
220
+ * @name exclude_labels_with_values_within_range
221
+ * @brief Exclude labels with values inside a given value range based on a vector of values
222
+ * associated with the labels.
223
+ *
224
+ * @param device Device to perform the operation on. [const Device::Pointer &]
225
+ * @param src Input image where labels will be filtered. [const Array::Pointer &]
226
+ * @param values Vector of values associated with the labels. [const Array::Pointer &]
227
+ * @param dst Output image where labels will be written to. [Array::Pointer ( = None )]
228
+ * @param min_value_range Minimum value to keep. [float ( = 0 )]
229
+ * @param max_value_range Maximum value to keep. [float ( = 100 )]
230
+ * @return Array::Pointer
231
+ *
232
+ * @note 'label processing', 'combine'
233
+ * @see https://clij.github.io/clij2-docs/reference_excludeLabelsWithValuesWithinRange
234
+ * @deprecated This function is deprecated. Use remove_labels_with_values_within_range_func instead.
235
+ */
236
+ auto
237
+ exclude_labels_with_values_within_range_func (const Device::Pointer & device,
238
+ const Array::Pointer & src,
239
+ const Array::Pointer & values,
240
+ Array::Pointer dst,
241
+ float min_value_range,
242
+ float max_value_range) -> Array::Pointer;
243
+
244
+ /* *
245
+ * @name extension_ratio_map
246
+ * @brief Determines the ratio of the extension for every label in a label map and returns it as
247
+ * a parametric map.
248
+ *
249
+ * The extension ration is defined as the maximum distance of any pixel in the label to the label's centroid divided by
250
+ * the average distance of all pixels in the label to the centroid.
110
251
*
111
252
* @param device Device to perform the operation on. [const Device::Pointer &]
112
253
* @param src Input label image. [const Array::Pointer &]
113
- * @param dst Output label image. [Array::Pointer ( = None )]
114
- * @param min_size Minimum size of labels to keep. [float ( = 0 )]
115
- * @param max_size Maximum size of labels to keep. [float ( = 100 )]
254
+ * @param dst Output parametric image. [Array::Pointer ( = None )]
116
255
* @return Array::Pointer
117
256
*
118
- * @note 'label processing', 'in assistant'
119
- * @see https://clij.github.io/clij2-docs/reference_excludeLabelsOutsideSizeRange
257
+ * @note 'label processing', 'in assistant', 'map'
258
+ * @see https://clij.github.io/clij2-docs/reference_extensionRatioMap
120
259
*/
121
260
auto
122
- filter_label_by_size_func (const Device::Pointer & device,
123
- const Array::Pointer & src,
124
- Array::Pointer dst,
125
- float min_size,
126
- float max_size) -> Array::Pointer;
261
+ extension_ratio_map_func (const Device::Pointer & device,
262
+ const Array::Pointer & src,
263
+ Array::Pointer dst) -> Array::Pointer;
127
264
128
265
129
266
} // namespace cle::tier4
0 commit comments