From 639c52655473029f72ab3bdd1c2ab56ba041d5fd Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Thu, 17 Oct 2024 10:35:20 +0200 Subject: [PATCH 01/16] rename parameters in convolve --- clic/include/tier1.hpp | 8 ++++---- clic/src/tier1/convolve.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/clic/include/tier1.hpp b/clic/include/tier1.hpp index 8cb735612..b54e898ee 100644 --- a/clic/include/tier1.hpp +++ b/clic/include/tier1.hpp @@ -250,8 +250,8 @@ block_enumerate_func(const Device::Pointer & device, * and Z. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src0 First input image to process. [const Array::Pointer &] - * @param src1 Second input image to process. [const Array::Pointer &] + * @param src First input image to process. [const Array::Pointer &] + * @param kernel Second input image to process. [const Array::Pointer &] * @param dst Output result image. [Array::Pointer ( = None )] * @return Array::Pointer * @@ -260,8 +260,8 @@ block_enumerate_func(const Device::Pointer & device, */ auto convolve_func(const Device::Pointer & device, - const Array::Pointer & src0, - const Array::Pointer & src1, + const Array::Pointer & src, + const Array::Pointer & kernel, Array::Pointer dst) -> Array::Pointer; diff --git a/clic/src/tier1/convolve.cpp b/clic/src/tier1/convolve.cpp index 68ca9dcd9..67bdb2201 100644 --- a/clic/src/tier1/convolve.cpp +++ b/clic/src/tier1/convolve.cpp @@ -10,13 +10,13 @@ namespace cle::tier1 auto convolve_func(const Device::Pointer & device, - const Array::Pointer & src0, - const Array::Pointer & src1, + const Array::Pointer & src, + const Array::Pointer & kernel, Array::Pointer dst) -> Array::Pointer { - tier0::create_like(src0, dst, dType::FLOAT); + tier0::create_like(src, dst, dType::FLOAT); const KernelInfo kernel = { "convolve", kernel::convolve }; - const ParameterList params = { { "src0", src0 }, { "src1", src1 }, { "dst", dst } }; + const ParameterList params = { { "src0", src }, { "src1", kernel }, { "dst", dst } }; const RangeArray range = { dst->width(), dst->height(), dst->depth() }; execute(device, kernel, params, range); return dst; From 263210548c0c7bb97f704dc5d0398bf1944ee42c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 08:37:01 +0000 Subject: [PATCH 02/16] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- clic/include/tier4.hpp | 6 ++++-- clic/src/tier4/centroids_of_labels.cpp | 6 ++++-- clic/src/tier4/filter_label_by_values.cpp | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/clic/include/tier4.hpp b/clic/include/tier4.hpp index ad6992da0..67b175e2b 100644 --- a/clic/include/tier4.hpp +++ b/clic/include/tier4.hpp @@ -152,8 +152,10 @@ label_pixel_count_map_func(const Device::Pointer & device, const Array::Pointer * @see https://clij.github.io/clij2-docs/reference_centroidsOfLabels */ auto -centroids_of_labels_func(const Device::Pointer & device, const Array::Pointer & src, Array::Pointer dst, bool include_background) - -> Array::Pointer; +centroids_of_labels_func(const Device::Pointer & device, + const Array::Pointer & src, + Array::Pointer dst, + bool include_background) -> Array::Pointer; /** diff --git a/clic/src/tier4/centroids_of_labels.cpp b/clic/src/tier4/centroids_of_labels.cpp index 471bc9e39..a04efdd09 100644 --- a/clic/src/tier4/centroids_of_labels.cpp +++ b/clic/src/tier4/centroids_of_labels.cpp @@ -12,8 +12,10 @@ namespace cle::tier4 { auto -centroids_of_labels_func(const Device::Pointer & device, const Array::Pointer & src, Array::Pointer dst, bool include_background) - -> Array::Pointer +centroids_of_labels_func(const Device::Pointer & device, + const Array::Pointer & src, + Array::Pointer dst, + bool include_background) -> Array::Pointer { cle::StatisticsMap props; if (include_background) diff --git a/clic/src/tier4/filter_label_by_values.cpp b/clic/src/tier4/filter_label_by_values.cpp index b4d657f75..5dcd3a72b 100644 --- a/clic/src/tier4/filter_label_by_values.cpp +++ b/clic/src/tier4/filter_label_by_values.cpp @@ -53,7 +53,8 @@ exclude_labels_with_map_values_out_of_range_func(const Device::Pointer & device, float minimum_value_range, float maximum_value_range) -> Array::Pointer { - return remove_labels_with_map_values_out_of_range_func(device, src, values, dst, minimum_value_range, maximum_value_range); + return remove_labels_with_map_values_out_of_range_func( + device, src, values, dst, minimum_value_range, maximum_value_range); } @@ -65,7 +66,8 @@ exclude_labels_with_map_values_within_range_func(const Device::Pointer & device, float minimum_value_range, float maximum_value_range) -> Array::Pointer { - return remove_labels_with_map_values_within_range_func(device, src, values, dst, minimum_value_range, maximum_value_range); + return remove_labels_with_map_values_within_range_func( + device, src, values, dst, minimum_value_range, maximum_value_range); } } // namespace cle::tier4 From 08369e90bf23344b4a83efc0477559f97c332ca1 Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Thu, 17 Oct 2024 10:40:15 +0200 Subject: [PATCH 03/16] renamed parameter names in generate_distance_matrix --- clic/include/tier1.hpp | 10 +++++----- clic/src/tier1/generate_distance_matrix.cpp | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/clic/include/tier1.hpp b/clic/include/tier1.hpp index b54e898ee..681f12818 100644 --- a/clic/include/tier1.hpp +++ b/clic/include/tier1.hpp @@ -675,8 +675,8 @@ gaussian_blur_func(const Device::Pointer & device, * meshes. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src0 First input image to process. [const Array::Pointer &] - * @param src1 Second input image to process. [const Array::Pointer &] + * @param coordinate_list1 First coordinate list to process. [const Array::Pointer &] + * @param coordinate_list2 Second coordinate list to process. [const Array::Pointer &] * @param dst Output result image. [Array::Pointer ( = None )] * @return Array::Pointer * @@ -684,9 +684,9 @@ gaussian_blur_func(const Device::Pointer & device, */ auto generate_distance_matrix_func(const Device::Pointer & device, - const Array::Pointer & src0, - const Array::Pointer & src1, - Array::Pointer dst) -> Array::Pointer; + const Array::Pointer & coordinate_list1, + const Array::Pointer & coordinate_list2, + Array::Pointer distance_matrix_destination) -> Array::Pointer; /** diff --git a/clic/src/tier1/generate_distance_matrix.cpp b/clic/src/tier1/generate_distance_matrix.cpp index 6bc745e0b..f9b63ea3c 100644 --- a/clic/src/tier1/generate_distance_matrix.cpp +++ b/clic/src/tier1/generate_distance_matrix.cpp @@ -10,17 +10,17 @@ namespace cle::tier1 auto generate_distance_matrix_func(const Device::Pointer & device, - const Array::Pointer & src0, - const Array::Pointer & src1, - Array::Pointer dst) -> Array::Pointer + const Array::Pointer & coordinate_list1, + const Array::Pointer & coordinate_list2, + Array::Pointer distance_matrix_destination) -> Array::Pointer { - tier0::create_dst(src0, dst, src0->width() + 1, src0->width() + 1, 1, dType::FLOAT); - dst->fill(0); + tier0::create_dst(coordinate_list1, distance_matrix_destination, coordinate_list1->width() + 1, coordinate_list1->width() + 1, 1, dType::FLOAT); + distance_matrix_destination->fill(0); const KernelInfo kernel = { "generate_distance_matrix", kernel::generate_distance_matrix }; - const ParameterList params = { { "src0", src0 }, { "src1", src1 }, { "dst", dst } }; - const RangeArray range = { dst->width(), dst->height(), dst->depth() }; + const ParameterList params = { { "src0", coordinate_list1 }, { "src1", coordinate_list2 }, { "dst", distance_matrix_destination } }; + const RangeArray range = { distance_matrix_destination->width(), distance_matrix_destination->height(), distance_matrix_destination->depth() }; execute(device, kernel, params, range); - return dst; + return distance_matrix_destination; } } // namespace cle::tier1 From 37f2d901afa6b2cc8391d147da39b6bea4347713 Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Thu, 17 Oct 2024 10:45:10 +0200 Subject: [PATCH 04/16] rename parameters of multiply_matrix --- clic/include/tier1.hpp | 12 ++++++------ clic/src/tier1/multiply_matrix.cpp | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/clic/include/tier1.hpp b/clic/include/tier1.hpp index 681f12818..c7c79d9c3 100644 --- a/clic/include/tier1.hpp +++ b/clic/include/tier1.hpp @@ -2145,18 +2145,18 @@ minimum_sphere_func(const Device::Pointer & device, * @brief Multiplies two matrices with each other. Shape of matrix1 should be equal to shape of matrix2 transposed. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src0 First input image to process. [const Array::Pointer &] - * @param src1 Second input image to process. [const Array::Pointer &] - * @param dst Output result image. [Array::Pointer ( = None )] + * @param matrix1 First matrix to process. [const Array::Pointer &] + * @param matrix2 Second matrix to process. [const Array::Pointer &] + * @param matrix_destination Output result matrix. [Array::Pointer ( = None )] * @return Array::Pointer * @see https://clij.github.io/clij2-docs/reference_multiplyMatrix * */ auto multiply_matrix_func(const Device::Pointer & device, - const Array::Pointer & src0, - const Array::Pointer & src1, - Array::Pointer dst) -> Array::Pointer; + const Array::Pointer & matrix1, + const Array::Pointer & matrix2, + Array::Pointer matrix_destination) -> Array::Pointer; /** diff --git a/clic/src/tier1/multiply_matrix.cpp b/clic/src/tier1/multiply_matrix.cpp index 189a36fb2..93e37128c 100644 --- a/clic/src/tier1/multiply_matrix.cpp +++ b/clic/src/tier1/multiply_matrix.cpp @@ -10,16 +10,16 @@ namespace cle::tier1 auto multiply_matrix_func(const Device::Pointer & device, - const Array::Pointer & src0, - const Array::Pointer & src1, - Array::Pointer dst) -> Array::Pointer + const Array::Pointer & matrix1, + const Array::Pointer & matrix2, + Array::Pointer matrix_destination) -> Array::Pointer { - tier0::create_dst(src0, dst, src1->width(), src0->height(), src0->depth(), dType::FLOAT); + tier0::create_dst(matrix1, matrix_destination, matrix2->width(), matrix1->height(), matrix1->depth(), dType::FLOAT); const KernelInfo kernel = { "multiply_matrix", kernel::multiply_matrix }; - const ParameterList params = { { "src0", src0 }, { "src1", src1 }, { "dst", dst } }; - const RangeArray range = { dst->width(), dst->height(), dst->depth() }; + const ParameterList params = { { "src0", matrix1 }, { "src1", matrix2 }, { "dst", matrix_destination } }; + const RangeArray range = { matrix_destination->width(), matrix_destination->height(), matrix_destination->depth() }; execute(device, kernel, params, range); - return dst; + return matrix_destination; } } // namespace cle::tier1 From 78091e259ad0986f57a22a4b3f2dc8cd13c1cd67 Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Thu, 17 Oct 2024 10:50:59 +0200 Subject: [PATCH 05/16] renamed parameters of count_touching_neighbors --- clic/include/tier2.hpp | 8 ++++---- clic/src/tier2/count_touching_neighbors.cpp | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/clic/include/tier2.hpp b/clic/include/tier2.hpp index f5528808e..75a55fd44 100644 --- a/clic/include/tier2.hpp +++ b/clic/include/tier2.hpp @@ -283,8 +283,8 @@ concatenate_along_z_func(const Device::Pointer & device, * matrix where the first column (index = 0) has been set to 0. Use set_column for that. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src Input image to process. [const Array::Pointer &] - * @param dst Output result image. [Array::Pointer ( = None )] + * @param touch_matrix Input touch matrix to process. [const Array::Pointer &] + * @param touching_neighbors_count_destination Output vector of touch count. [Array::Pointer ( = None )] * @param ignore_background [bool ( = True )] * @return Array::Pointer * @@ -292,8 +292,8 @@ concatenate_along_z_func(const Device::Pointer & device, */ auto count_touching_neighbors_func(const Device::Pointer & device, - const Array::Pointer & src, - Array::Pointer dst, + const Array::Pointer & touch_matrix, + Array::Pointer touching_neighbors_count_destination, bool ignore_background) -> Array::Pointer; diff --git a/clic/src/tier2/count_touching_neighbors.cpp b/clic/src/tier2/count_touching_neighbors.cpp index 107f71dc8..6332234e3 100644 --- a/clic/src/tier2/count_touching_neighbors.cpp +++ b/clic/src/tier2/count_touching_neighbors.cpp @@ -9,19 +9,19 @@ namespace cle::tier2 auto count_touching_neighbors_func(const Device::Pointer & device, - const Array::Pointer & src, - Array::Pointer dst, + const Array::Pointer & touch_matrix, + Array::Pointer touching_neighbors_count_destination, bool ignore_background) -> Array::Pointer { - tier0::create_vector(src, dst, src->width(), dType::UINT32); - auto bin_matrix = tier1::greater_constant_func(device, src, nullptr, 0); + tier0::create_vector(touch_matrix, touching_neighbors_count_destination, touch_matrix->width(), dType::UINT32); + auto bin_matrix = tier1::greater_constant_func(device, touch_matrix, nullptr, 0); if (ignore_background) { tier1::set_row_func(device, bin_matrix, 0, 0); tier1::set_column_func(device, bin_matrix, 0, 0); tier1::set_where_x_equals_y_func(device, bin_matrix, 0); } - return tier1::sum_y_projection_func(device, bin_matrix, dst); + return tier1::sum_y_projection_func(device, bin_matrix, touching_neighbors_count_destination); } } // namespace cle::tier2 From cc179e44c423ffc058d99100a74ef8d3d00a720a Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Thu, 17 Oct 2024 10:53:38 +0200 Subject: [PATCH 06/16] Revert "rename parameters in convolve" This reverts commit 639c52655473029f72ab3bdd1c2ab56ba041d5fd. --- clic/include/tier1.hpp | 8 ++++---- clic/src/tier1/convolve.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/clic/include/tier1.hpp b/clic/include/tier1.hpp index c7c79d9c3..7d5c3b91d 100644 --- a/clic/include/tier1.hpp +++ b/clic/include/tier1.hpp @@ -250,8 +250,8 @@ block_enumerate_func(const Device::Pointer & device, * and Z. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src First input image to process. [const Array::Pointer &] - * @param kernel Second input image to process. [const Array::Pointer &] + * @param src0 First input image to process. [const Array::Pointer &] + * @param src1 Second input image to process. [const Array::Pointer &] * @param dst Output result image. [Array::Pointer ( = None )] * @return Array::Pointer * @@ -260,8 +260,8 @@ block_enumerate_func(const Device::Pointer & device, */ auto convolve_func(const Device::Pointer & device, - const Array::Pointer & src, - const Array::Pointer & kernel, + const Array::Pointer & src0, + const Array::Pointer & src1, Array::Pointer dst) -> Array::Pointer; diff --git a/clic/src/tier1/convolve.cpp b/clic/src/tier1/convolve.cpp index 67bdb2201..68ca9dcd9 100644 --- a/clic/src/tier1/convolve.cpp +++ b/clic/src/tier1/convolve.cpp @@ -10,13 +10,13 @@ namespace cle::tier1 auto convolve_func(const Device::Pointer & device, - const Array::Pointer & src, - const Array::Pointer & kernel, + const Array::Pointer & src0, + const Array::Pointer & src1, Array::Pointer dst) -> Array::Pointer { - tier0::create_like(src, dst, dType::FLOAT); + tier0::create_like(src0, dst, dType::FLOAT); const KernelInfo kernel = { "convolve", kernel::convolve }; - const ParameterList params = { { "src0", src }, { "src1", kernel }, { "dst", dst } }; + const ParameterList params = { { "src0", src0 }, { "src1", src1 }, { "dst", dst } }; const RangeArray range = { dst->width(), dst->height(), dst->depth() }; execute(device, kernel, params, range); return dst; From e421e0c6f8deff7945f8da0968d3a80858475a2e Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Thu, 17 Oct 2024 13:09:58 +0200 Subject: [PATCH 07/16] renamed parameters of centroids_of_labels --- clic/include/tier4.hpp | 8 ++++---- clic/src/tier4/centroids_of_labels.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/clic/include/tier4.hpp b/clic/include/tier4.hpp index 67b175e2b..cf34f942e 100644 --- a/clic/include/tier4.hpp +++ b/clic/include/tier4.hpp @@ -144,8 +144,8 @@ label_pixel_count_map_func(const Device::Pointer & device, const Array::Pointer * where n is the number of labels and d=3 the dimensionality (x,y,z) of the original image. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src Label image where the centroids will be determined from. [const Array::Pointer &] - * @param dst Output image where the centroids will be written to. [Array::Pointer ( = None )] + * @param label_image Label image where the centroids will be determined from. [const Array::Pointer &] + * @param coorindate_list_destination Output list of coordinates where the centroids will be written to. [Array::Pointer ( = None )] * @param include_background Determines if the background label should be included. [bool ( = False )] * @return Array::Pointer * @@ -153,8 +153,8 @@ label_pixel_count_map_func(const Device::Pointer & device, const Array::Pointer */ auto centroids_of_labels_func(const Device::Pointer & device, - const Array::Pointer & src, - Array::Pointer dst, + const Array::Pointer & label_image, + Array::Pointer coorindate_list_destination, bool include_background) -> Array::Pointer; diff --git a/clic/src/tier4/centroids_of_labels.cpp b/clic/src/tier4/centroids_of_labels.cpp index a04efdd09..0a5439399 100644 --- a/clic/src/tier4/centroids_of_labels.cpp +++ b/clic/src/tier4/centroids_of_labels.cpp @@ -13,18 +13,18 @@ namespace cle::tier4 auto centroids_of_labels_func(const Device::Pointer & device, - const Array::Pointer & src, - Array::Pointer dst, + const Array::Pointer & label_image, + Array::Pointer coorindate_list_destination, bool include_background) -> Array::Pointer { cle::StatisticsMap props; if (include_background) { - props = tier3::statistics_of_background_and_labelled_pixels_func(device, src, nullptr); + props = tier3::statistics_of_background_and_labelled_pixels_func(device, label_image, nullptr); } else { - props = tier3::statistics_of_labelled_pixels_func(device, src, nullptr); + props = tier3::statistics_of_labelled_pixels_func(device, label_image, nullptr); } auto centroid_x = props["centroid_x"]; auto centroid_y = props["centroid_y"]; From 739d4e3b99ab0051842495bf0bfcfc8b84c8df5d Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Thu, 17 Oct 2024 13:17:14 +0200 Subject: [PATCH 08/16] renamed parameters of voronoi_labeling --- clic/include/tier6.hpp | 6 +++--- clic/src/tier6/voronoi_labeling.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/clic/include/tier6.hpp b/clic/include/tier6.hpp index 2b5d76848..522f98912 100644 --- a/clic/include/tier6.hpp +++ b/clic/include/tier6.hpp @@ -103,15 +103,15 @@ masked_voronoi_labeling_func(const Device::Pointer & device, * touch. The resulting label map is written to the output. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src [const Array::Pointer &] - * @param dst [Array::Pointer ( = None )] + * @param input_binary [const Array::Pointer &] + * @param output_labels [Array::Pointer ( = None )] * @return Array::Pointer * * @note 'label', 'in assistant', 'bia-bob-suggestion' * @see https://clij.github.io/clij2-docs/reference_voronoiLabeling */ auto -voronoi_labeling_func(const Device::Pointer & device, const Array::Pointer & src, Array::Pointer dst) -> Array::Pointer; +voronoi_labeling_func(const Device::Pointer & device, const Array::Pointer & input_binary, Array::Pointer output_labels) -> Array::Pointer; /** diff --git a/clic/src/tier6/voronoi_labeling.cpp b/clic/src/tier6/voronoi_labeling.cpp index 1b720f5b9..3cec4ae33 100644 --- a/clic/src/tier6/voronoi_labeling.cpp +++ b/clic/src/tier6/voronoi_labeling.cpp @@ -12,11 +12,11 @@ namespace cle::tier6 { auto -voronoi_labeling_func(const Device::Pointer & device, const Array::Pointer & src, Array::Pointer dst) -> Array::Pointer +voronoi_labeling_func(const Device::Pointer & device, const Array::Pointer & input_binary, Array::Pointer output_labels) -> Array::Pointer { - tier0::create_like(src, dst, dType::LABEL); - auto flip = tier5::connected_component_labeling_func(device, src, nullptr, "box"); - return tier2::extend_labeling_via_voronoi_func(device, flip, dst); + tier0::create_like(input_binary, output_labels, dType::LABEL); + auto flip = tier5::connected_component_labeling_func(device, input_binary, nullptr, "box"); + return tier2::extend_labeling_via_voronoi_func(device, flip, output_labels); } } // namespace cle::tier6 From 691a5ae013c8cd5b7a737e3ecb83c1fb55246caa Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 11:19:35 +0000 Subject: [PATCH 09/16] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- clic/include/tier4.hpp | 3 ++- clic/include/tier6.hpp | 3 ++- clic/src/tier1/generate_distance_matrix.cpp | 15 ++++++++++++--- clic/src/tier1/multiply_matrix.cpp | 2 +- clic/src/tier6/voronoi_labeling.cpp | 3 ++- 5 files changed, 19 insertions(+), 7 deletions(-) diff --git a/clic/include/tier4.hpp b/clic/include/tier4.hpp index 0df81fa9f..86a51b63d 100644 --- a/clic/include/tier4.hpp +++ b/clic/include/tier4.hpp @@ -145,7 +145,8 @@ label_pixel_count_map_func(const Device::Pointer & device, const Array::Pointer * * @param device Device to perform the operation on. [const Device::Pointer &] * @param label_image Label image where the centroids will be determined from. [const Array::Pointer &] - * @param coorindate_list_destination Output list of coordinates where the centroids will be written to. [Array::Pointer ( = None )] + * @param coorindate_list_destination Output list of coordinates where the centroids will be written to. [Array::Pointer + * ( = None )] * @param include_background Determines if the background label should be included. [bool ( = False )] * @return Array::Pointer * diff --git a/clic/include/tier6.hpp b/clic/include/tier6.hpp index 522f98912..1ecccc5f8 100644 --- a/clic/include/tier6.hpp +++ b/clic/include/tier6.hpp @@ -111,7 +111,8 @@ masked_voronoi_labeling_func(const Device::Pointer & device, * @see https://clij.github.io/clij2-docs/reference_voronoiLabeling */ auto -voronoi_labeling_func(const Device::Pointer & device, const Array::Pointer & input_binary, Array::Pointer output_labels) -> Array::Pointer; +voronoi_labeling_func(const Device::Pointer & device, const Array::Pointer & input_binary, Array::Pointer output_labels) + -> Array::Pointer; /** diff --git a/clic/src/tier1/generate_distance_matrix.cpp b/clic/src/tier1/generate_distance_matrix.cpp index f9b63ea3c..bb82884e0 100644 --- a/clic/src/tier1/generate_distance_matrix.cpp +++ b/clic/src/tier1/generate_distance_matrix.cpp @@ -14,11 +14,20 @@ generate_distance_matrix_func(const Device::Pointer & device, const Array::Pointer & coordinate_list2, Array::Pointer distance_matrix_destination) -> Array::Pointer { - tier0::create_dst(coordinate_list1, distance_matrix_destination, coordinate_list1->width() + 1, coordinate_list1->width() + 1, 1, dType::FLOAT); + tier0::create_dst(coordinate_list1, + distance_matrix_destination, + coordinate_list1->width() + 1, + coordinate_list1->width() + 1, + 1, + dType::FLOAT); distance_matrix_destination->fill(0); const KernelInfo kernel = { "generate_distance_matrix", kernel::generate_distance_matrix }; - const ParameterList params = { { "src0", coordinate_list1 }, { "src1", coordinate_list2 }, { "dst", distance_matrix_destination } }; - const RangeArray range = { distance_matrix_destination->width(), distance_matrix_destination->height(), distance_matrix_destination->depth() }; + const ParameterList params = { { "src0", coordinate_list1 }, + { "src1", coordinate_list2 }, + { "dst", distance_matrix_destination } }; + const RangeArray range = { distance_matrix_destination->width(), + distance_matrix_destination->height(), + distance_matrix_destination->depth() }; execute(device, kernel, params, range); return distance_matrix_destination; } diff --git a/clic/src/tier1/multiply_matrix.cpp b/clic/src/tier1/multiply_matrix.cpp index 93e37128c..de09c6eba 100644 --- a/clic/src/tier1/multiply_matrix.cpp +++ b/clic/src/tier1/multiply_matrix.cpp @@ -17,7 +17,7 @@ multiply_matrix_func(const Device::Pointer & device, tier0::create_dst(matrix1, matrix_destination, matrix2->width(), matrix1->height(), matrix1->depth(), dType::FLOAT); const KernelInfo kernel = { "multiply_matrix", kernel::multiply_matrix }; const ParameterList params = { { "src0", matrix1 }, { "src1", matrix2 }, { "dst", matrix_destination } }; - const RangeArray range = { matrix_destination->width(), matrix_destination->height(), matrix_destination->depth() }; + const RangeArray range = { matrix_destination->width(), matrix_destination->height(), matrix_destination->depth() }; execute(device, kernel, params, range); return matrix_destination; } diff --git a/clic/src/tier6/voronoi_labeling.cpp b/clic/src/tier6/voronoi_labeling.cpp index 3cec4ae33..be5051ba7 100644 --- a/clic/src/tier6/voronoi_labeling.cpp +++ b/clic/src/tier6/voronoi_labeling.cpp @@ -12,7 +12,8 @@ namespace cle::tier6 { auto -voronoi_labeling_func(const Device::Pointer & device, const Array::Pointer & input_binary, Array::Pointer output_labels) -> Array::Pointer +voronoi_labeling_func(const Device::Pointer & device, const Array::Pointer & input_binary, Array::Pointer output_labels) + -> Array::Pointer { tier0::create_like(input_binary, output_labels, dType::LABEL); auto flip = tier5::connected_component_labeling_func(device, input_binary, nullptr, "box"); From 2cc1a087a320d1e688783b07422e114a3c152470 Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Thu, 17 Oct 2024 13:22:52 +0200 Subject: [PATCH 10/16] documentation update tier7 --- clic/include/tier7.hpp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/clic/include/tier7.hpp b/clic/include/tier7.hpp index 98f7a5297..aa974f064 100644 --- a/clic/include/tier7.hpp +++ b/clic/include/tier7.hpp @@ -19,8 +19,8 @@ namespace cle::tier7 * If no matrix is given, the identity matrix will be used. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src Input Array to be transformed. [const Array::Pointer &] - * @param dst Output Array. [Array::Pointer ( = None )] + * @param src Input image to be transformed. [const Array::Pointer &] + * @param dst Output image. [Array::Pointer ( = None )] * @param transform_matrix Affine transformation matrix (3x3 or 4x4). [std::vector * ( = None )] * @param interpolate If true, bi/trilinear interpolation will be applied, if hardware allows. [bool ( = False )] * @param resize Automatically determines the size of the output depending on the rotation angles. [bool ( = False )] @@ -51,8 +51,8 @@ affine_transform_func(const Device::Pointer & device, * This function is inspired by a similar implementation in Java by Jan Brocher (Biovoxxel) [0] [1] * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src Input Array to be transformed. [const Array::Pointer &] - * @param dst Output Array. [Array::Pointer ( = None )] + * @param src Input image to be transformed. [const Array::Pointer &] + * @param dst Output label image. [Array::Pointer ( = None )] * @param number_of_erosions Number of iteration of erosion. [int ( = 5 )] * @param outline_sigma Gaussian blur sigma applied before Otsu thresholding. [float ( = 2 )] * @return Array::Pointer @@ -75,8 +75,8 @@ eroded_otsu_labeling_func(const Device::Pointer & device, * radians to degrees, use this formula: angle_in_degrees = angle_in_radians / numpy.pi * 180.0 * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src Input Array to be transformed. [const Array::Pointer &] - * @param dst Output Array. [Array::Pointer ( = None )] + * @param src Input image to be transformed. [const Array::Pointer &] + * @param dst Output image. [Array::Pointer ( = None )] * @param translate_x Translation along x axis in pixels. [float ( = 0 )] * @param translate_y Translation along y axis in pixels. [float ( = 0 )] * @param translate_z Translation along z axis in pixels. [float ( = 0 )] @@ -111,8 +111,8 @@ rigid_transform_func(const Device::Pointer & device, * formula: angle_in_degrees = angle_in_radians / numpy.pi * 180.0 * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src Input Array to be rotated. [const Array::Pointer &] - * @param dst Output Array. [Array::Pointer ( = None )] + * @param src Input image to be rotated. [const Array::Pointer &] + * @param dst Output image. [Array::Pointer ( = None )] * @param angle_x Rotation around x axis in degrees. [float ( = 0 )] * @param angle_y Rotation around y axis in degrees. [float ( = 0 )] * @param angle_z Rotation around z axis in degrees. [float ( = 0 )] @@ -140,8 +140,8 @@ rotate_func(const Device::Pointer & device, * @brief Scale the image by given factors. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src Input Array to be scaleded. [const Array::Pointer &] - * @param dst Output Array. [Array::Pointer ( = None )] + * @param src Input image to be scaled. [const Array::Pointer &] + * @param dst Output image. [Array::Pointer ( = None )] * @param factor_x Scaling along x axis. [float ( = 1 )] * @param factor_y Scaling along y axis. [float ( = 1 )] * @param factor_z Scaling along z axis. [float ( = 1 )] @@ -169,8 +169,8 @@ scale_func(const Device::Pointer & device, * @brief Translate the image by a given vector. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src Input Array to be translated. [const Array::Pointer &] - * @param dst Output Array. [Array::Pointer ( = None )] + * @param src Input image to be translated. [const Array::Pointer &] + * @param dst Output image. [Array::Pointer ( = None )] * @param translate_x Translation along x axis in pixels. [float ( = 0 )] * @param translate_y Translation along y axis in pixels. [float ( = 0 )] * @param translate_z Translation along z axis in pixels. [float ( = 0 )] @@ -196,8 +196,8 @@ translate_func(const Device::Pointer & device, * operation has an octagon as structuring element. Notes * This operation assumes input images are isotropic. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src Input label Array. [const Array::Pointer &] - * @param dst Output label Array. [Array::Pointer ( = None )] + * @param src Input label image. [const Array::Pointer &] + * @param dst Output label image. [Array::Pointer ( = None )] * @param radius Radius size for the closing. [int ( = 0 )] * @return Array::Pointer * @@ -215,8 +215,8 @@ closing_labels_func(const Device::Pointer & device, const Array::Pointer & src, * not have the same identifier. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src result [const Array::Pointer &] - * @param dst [Array::Pointer ( = None )] + * @param src Input image to process [const Array::Pointer &] + * @param dst Output label image [Array::Pointer ( = None )] * @param radius [int ( = 1 )] * @return Array::Pointer * @@ -233,8 +233,8 @@ erode_connected_labels_func(const Device::Pointer & device, const Array::Pointer * operation has an octagon as structuring element. Notes * This operation assumes input images are isotropic. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src Input label Array. [const Array::Pointer &] - * @param dst Output label Array. [Array::Pointer ( = None )] + * @param src Input label image. [const Array::Pointer &] + * @param dst Output label image. [Array::Pointer ( = None )] * @param radius Radius size for the opening. [int ( = 0 )] * @return Array::Pointer * @@ -253,8 +253,8 @@ opening_labels_func(const Device::Pointer & device, const Array::Pointer & src, * Notes * This operation assumes input images are isotropic. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src Input intensity Array. [const Array::Pointer &] - * @param dst Output label Array. [Array::Pointer ( = None )] + * @param src Input intensity image. [const Array::Pointer &] + * @param dst Output label image. [Array::Pointer ( = None )] * @param spot_sigma Controls how close detected cells can be. [float ( = 2 )] * @param outline_sigma Controls how precise segmented objects are outlined. [float ( = 2 )] * @return Array::Pointer From 624db19c409d1a1c891b39a12f8c08c63c8ade19 Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Thu, 17 Oct 2024 13:26:32 +0200 Subject: [PATCH 11/16] Documentation upgrade tier6 --- clic/include/tier6.hpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/clic/include/tier6.hpp b/clic/include/tier6.hpp index 522f98912..eab8ef013 100644 --- a/clic/include/tier6.hpp +++ b/clic/include/tier6.hpp @@ -16,8 +16,8 @@ namespace cle::tier6 * scikitimage [2] and MorpholibJ[3] Notes * This operation assumes input images are isotropic. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src label image to erode [const Array::Pointer &] - * @param dst result [Array::Pointer ( = None )] + * @param src Input label image to erode [const Array::Pointer &] + * @param dst Output label image [Array::Pointer ( = None )] * @param radius [int ( = 2 )] * @return Array::Pointer * @@ -35,10 +35,10 @@ dilate_labels_func(const Device::Pointer & device, const Array::Pointer & src, A * identifier. Notes * This operation assumes input images are isotropic. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src result [const Array::Pointer &] - * @param dst [Array::Pointer ( = None )] + * @param src Input label image [const Array::Pointer &] + * @param dst Output label image [Array::Pointer ( = None )] * @param radius [int ( = 1 )] - * @param relabel and all label indices exist. [bool ( = False )] + * @param relabel Relabel the image, e.g. if object disappear or split. [bool ( = False )] * @return Array::Pointer * * @note 'label processing', 'in assistant' @@ -60,7 +60,7 @@ erode_labels_func(const Device::Pointer & device, * thresholded binary image is flooded using the Voronoi tesselation approach starting from the found local maxima. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src0 intensity image to add labels [const Array::Pointer &] + * @param src0 Intensity image to segment [const Array::Pointer &] * @param dst Output label image. [Array::Pointer ( = None )] * @param outline_sigma Gaussian blur sigma along all axes [float ( = 0 )] * @return Array::Pointer @@ -82,9 +82,9 @@ gauss_otsu_labeling_func(const Device::Pointer & device, * touch. The region growing is limited to a masked area. The resulting label map is written to the output. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src [const Array::Pointer &] - * @param mask [const Array::Pointer &] - * @param dst [Array::Pointer ( = None )] + * @param src Input binary image [const Array::Pointer &] + * @param mask Input mask [const Array::Pointer &] + * @param dst Output label image [Array::Pointer ( = None )] * @return Array::Pointer * * @note 'label' @@ -103,8 +103,8 @@ masked_voronoi_labeling_func(const Device::Pointer & device, * touch. The resulting label map is written to the output. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param input_binary [const Array::Pointer &] - * @param output_labels [Array::Pointer ( = None )] + * @param input_binary Input binary image [const Array::Pointer &] + * @param output_labels Output label image [Array::Pointer ( = None )] * @return Array::Pointer * * @note 'label', 'in assistant', 'bia-bob-suggestion' @@ -120,7 +120,7 @@ voronoi_labeling_func(const Device::Pointer & device, const Array::Pointer & inp * * @param device Device to perform the operation on. [const Device::Pointer &] * @param src Label image to filter. [const Array::Pointer &] - * @param dst Output label image fitlered. [Array::Pointer ( = None )] + * @param dst Output label image filtered. [Array::Pointer ( = None )] * @param minimum_size Smallest size object allowed. [float ( = 100 )] * @return Array::Pointer * @@ -139,7 +139,7 @@ remove_small_labels_func(const Device::Pointer & device, * * @param device Device to perform the operation on. [const Device::Pointer &] * @param src Label image to filter. [const Array::Pointer &] - * @param dst Output label image fitlered. [Array::Pointer ( = None )] + * @param dst Output label image filtered. [Array::Pointer ( = None )] * @param maximum_size Largest size object to exclude. [float ( = 100 )] * @return Array::Pointer * @@ -154,11 +154,11 @@ exclude_small_labels_func(const Device::Pointer & device, /** * @name remove_large_labels - * @brief Removes labelled objects bigger than a given size (in pixels) from a label map. + * @brief Removes labeled objects bigger than a given size (in pixels) from a label map. * * @param device Device to perform the operation on. [const Device::Pointer &] * @param src Label image to filter. [const Array::Pointer &] - * @param dst Output label image fitlered. [Array::Pointer ( = None )] + * @param dst Output label image filtered. [Array::Pointer ( = None )] * @param maximum_size Biggest size object allowed. [float ( = 100 )] * @return Array::Pointer * @@ -177,7 +177,7 @@ remove_large_labels_func(const Device::Pointer & device, * * @param device Device to perform the operation on. [const Device::Pointer &] * @param src Label image to filter. [const Array::Pointer &] - * @param dst Output label image fitlered. [Array::Pointer ( = None )] + * @param dst Output label image filtered. [Array::Pointer ( = None )] * @param minimum_size Smallest size object to keep. [float ( = 100 )] * @return Array::Pointer * From 45fb1ed2ad35911c30e3536aef689a1654b955f3 Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Thu, 17 Oct 2024 13:26:40 +0200 Subject: [PATCH 12/16] Documentation update tier5 --- clic/include/tier5.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clic/include/tier5.hpp b/clic/include/tier5.hpp index 731377a91..481f322ed 100644 --- a/clic/include/tier5.hpp +++ b/clic/include/tier5.hpp @@ -16,8 +16,8 @@ namespace cle::tier5 * False. True otherwise This function is supposed to work similarly like its counterpart in numpy [1]. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src0 [const Array::Pointer &] - * @param src1 [const Array::Pointer &] + * @param src0 First array to compare [const Array::Pointer &] + * @param src1 Second array to compare [const Array::Pointer &] * @return bool * * @note 'combine' From 8c80092d8c04ba2db1979c93db630302e7acc1b7 Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Thu, 17 Oct 2024 13:28:24 +0200 Subject: [PATCH 13/16] documentation update tier4 --- clic/include/tier4.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/clic/include/tier4.hpp b/clic/include/tier4.hpp index 0df81fa9f..4297cec76 100644 --- a/clic/include/tier4.hpp +++ b/clic/include/tier4.hpp @@ -17,8 +17,8 @@ namespace cle::tier4 * an array of 6 values as follows: minX, minY, minZ, maxX, maxY, maxZ. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src [const Array::Pointer &] - * @param label_id [int] + * @param src Label image [const Array::Pointer &] + * @param label_id Identifier of label [int] * @return std::vector * * @see https://clij.github.io/clij2-docs/reference_boundingBox @@ -33,8 +33,8 @@ label_bounding_box_func(const Device::Pointer & device, const Array::Pointer & s * Results table in the column 'MSE'. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src0 [const Array::Pointer &] - * @param src1 [const Array::Pointer &] + * @param src0 First image to compare [const Array::Pointer &] + * @param src1 Second image to compare [const Array::Pointer &] * @return float * * @note 'in assistant', 'combine', 'bia-bob-suggestion' @@ -51,8 +51,8 @@ mean_squared_error_func(const Device::Pointer & device, const Array::Pointer & s * pixels (with d = dimensionality of the original image) with the coordinates of the maxima/minima. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src [const Array::Pointer &] - * @param dst [Array::Pointer ( = None )] + * @param src Input binary image of spots [const Array::Pointer &] + * @param dst Output coordinate list of spots [Array::Pointer ( = None )] * @return Array::Pointer * * @see https://clij.github.io/clij2-docs/reference_spotsToPointList @@ -70,7 +70,7 @@ spots_to_pointlist_func(const Device::Pointer & device, const Array::Pointer & s * performed on the CPU. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src Label image. [const Array::Pointer &] + * @param src Input label image. [const Array::Pointer &] * @param dst Output label image. [Array::Pointer ( = None )] * @param blocksize Renumbering is done in blocks for performance reasons. [int ( = 4096 )] * @return Array::Pointer From 2059dcda15cf8d8937a604b3a3412ae77eb5cc6d Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Thu, 17 Oct 2024 13:32:30 +0200 Subject: [PATCH 14/16] documentation update tier3 --- clic/include/tier3.hpp | 50 +++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/clic/include/tier3.hpp b/clic/include/tier3.hpp index 27d2303cd..844903ea1 100644 --- a/clic/include/tier3.hpp +++ b/clic/include/tier3.hpp @@ -17,7 +17,7 @@ namespace cle::tier3 * an array of 6 values as follows: minX, minY, minZ, maxX, maxY, maxZ. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src [const Array::Pointer &] + * @param src Input binary image [const Array::Pointer &] * @return std::vector * * @see https://clij.github.io/clij2-docs/reference_boundingBox @@ -33,7 +33,7 @@ bounding_box_func(const Device::Pointer & device, const Array::Pointer & src) -> * columns MassX, MassY and MassZ. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src [const Array::Pointer &] + * @param src Input image [const Array::Pointer &] * @return std::vector * @see https://clij.github.io/clij2-docs/reference_centerOfMass * @@ -50,9 +50,9 @@ center_of_mass_func(const Device::Pointer & device, const Array::Pointer & src) * renumbered to 1 and 2. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src [const Array::Pointer &] - * @param list [const Array::Pointer &] - * @param dst [Array::Pointer ( = None )] + * @param src Input label image [const Array::Pointer &] + * @param list Vector of 0 and 1 flagging labels to remove [const Array::Pointer &] + * @param dst Output label image [Array::Pointer ( = None )] * @return Array::Pointer * * @see https://clij.github.io/clij2-docs/reference_excludeLabels @@ -72,9 +72,9 @@ remove_labels_func(const Device::Pointer & device, * renumbered to 1 and 2. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src [const Array::Pointer &] - * @param list [const Array::Pointer &] - * @param dst [Array::Pointer ( = None )] + * @param src Input label image [const Array::Pointer &] + * @param list Vector of 0 and 1 flagging labels to remove [const Array::Pointer &] + * @param dst Output label image [Array::Pointer ( = None )] * @return Array::Pointer * * @see https://clij.github.io/clij2-docs/reference_excludeLabels @@ -92,8 +92,8 @@ exclude_labels_func(const Device::Pointer & device, * renumbered afterwards. * * @param device Device to perform the operation on. [const Device::Pointer & ( = None )] - * @param src [const Array::Pointer &] - * @param dst [Array::Pointer ( = None )] + * @param src Input label image [const Array::Pointer &] + * @param dst Output label image[Array::Pointer ( = None )] * @param exclude_x Exclude labels along min and max x [bool ( = True )] * @param exclude_y Exclude labels along min and max y [bool ( = True )] * @param exclude_z Exclude labels along min and max z [bool ( = True )] @@ -116,8 +116,8 @@ remove_labels_on_edges_func(const Device::Pointer & device, * renumbered afterwards. * * @param device Device to perform the operation on. [const Device::Pointer & ( = None )] - * @param src [const Array::Pointer &] - * @param dst [Array::Pointer ( = None )] + * @param src Input label image [const Array::Pointer &] + * @param dst Output label image [Array::Pointer ( = None )] * @param exclude_x Exclude labels along min and max x [bool ( = True )] * @param exclude_y Exclude labels along min and max y [bool ( = True )] * @param exclude_z Exclude labels along min and max z [bool ( = True )] @@ -157,8 +157,8 @@ flag_existing_labels_func(const Device::Pointer & device, const Array::Pointer & * gamma g is computed, before normlization is reversed (^ is the power operator):f(x) = (x / max(X)) ^ gamma * max(X) * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src [const Array::Pointer &] - * @param dst [Array::Pointer ( = None )] + * @param src Input image [const Array::Pointer &] + * @param dst Output image [Array::Pointer ( = None )] * @param gamma [float ( = 1 )] * @return Array::Pointer * @@ -177,9 +177,9 @@ gamma_correction_func(const Device::Pointer & device, const Array::Pointer & src * touching then the pixel (3,4) in the matrix will be set to 1. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src0 [const Array::Pointer &] - * @param src1 [const Array::Pointer &] - * @param dst [Array::Pointer ( = None )] + * @param src0 First input label image [const Array::Pointer &] + * @param src1 Second input label image [const Array::Pointer &] + * @param dst Output overlap matrix [Array::Pointer ( = None )] * @return Array::Pointer * * @see https://clij.github.io/clij2-docs/reference_generateBinaryOverlapMatrix @@ -200,8 +200,8 @@ generate_binary_overlap_matrix_func(const Device::Pointer & device, * adjacency graph * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src [const Array::Pointer &] - * @param dst [Array::Pointer ( = None )] + * @param src Input label image [const Array::Pointer &] + * @param dst Output touch matrix [Array::Pointer ( = None )] * @return Array::Pointer * * @see https://clij.github.io/clij2-docs/reference_generateTouchMatrix @@ -234,8 +234,8 @@ generate_touch_matrix_func(const Device::Pointer & device, const Array::Pointer * http://www.openclprogrammingguide.com * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src [const Array::Pointer &] - * @param dst [Array::Pointer ( = None )] + * @param src Input image to derive histogram from [const Array::Pointer &] + * @param dst Output histogram [Array::Pointer ( = None )] * @param num_bins [int ( = 256 )] * @param minimum_intensity [float ( = None )] * @param maximum_intensity [float ( = None )] @@ -261,8 +261,8 @@ histogram_func(const Device::Pointer & device, * + 1) * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src0 [const Array::Pointer &] - * @param src1 [const Array::Pointer &] + * @param src0 First binary image to compare [const Array::Pointer &] + * @param src1 Second binary image to compare[const Array::Pointer &] * @return float * * @see https://clij.github.io/clij2-docs/reference_jaccardIndex @@ -279,8 +279,8 @@ jaccard_index_func(const Device::Pointer & device, const Array::Pointer & src0, * contains d pixels (with d = dimensionality of the original image) with the coordinates of the maxima/minima. * * @param device Device to perform the operation on. [const Device::Pointer &] - * @param src [const Array::Pointer &] - * @param dst [Array::Pointer ( = None )] + * @param src Input label image [const Array::Pointer &] + * @param dst Output coordinate list [Array::Pointer ( = None )] * @return Array::Pointer * * @see https://clij.github.io/clij2-docs/reference_labelledSpotsToPointList From 5ea536d1796749a9f80cc176f0e522d85b53ed38 Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Thu, 17 Oct 2024 13:59:29 +0200 Subject: [PATCH 15/16] Update clic/include/tier3.hpp Signed-off-by: Stephane Rigaud --- clic/include/tier3.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clic/include/tier3.hpp b/clic/include/tier3.hpp index 844903ea1..ae84ef62e 100644 --- a/clic/include/tier3.hpp +++ b/clic/include/tier3.hpp @@ -262,7 +262,7 @@ histogram_func(const Device::Pointer & device, * * @param device Device to perform the operation on. [const Device::Pointer &] * @param src0 First binary image to compare [const Array::Pointer &] - * @param src1 Second binary image to compare[const Array::Pointer &] + * @param src1 Second binary image to compare [const Array::Pointer &] * @return float * * @see https://clij.github.io/clij2-docs/reference_jaccardIndex From 745d8757f9baea50c0dde045fae031b8d68e07a3 Mon Sep 17 00:00:00 2001 From: Stephane Rigaud Date: Thu, 17 Oct 2024 14:14:45 +0200 Subject: [PATCH 16/16] fix: statistic now take label as second param --- clic/src/tier4/centroids_of_labels.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clic/src/tier4/centroids_of_labels.cpp b/clic/src/tier4/centroids_of_labels.cpp index 0a5439399..0c8931c67 100644 --- a/clic/src/tier4/centroids_of_labels.cpp +++ b/clic/src/tier4/centroids_of_labels.cpp @@ -20,11 +20,11 @@ centroids_of_labels_func(const Device::Pointer & device, cle::StatisticsMap props; if (include_background) { - props = tier3::statistics_of_background_and_labelled_pixels_func(device, label_image, nullptr); + props = tier3::statistics_of_background_and_labelled_pixels_func(device, label_image, label_image); } else { - props = tier3::statistics_of_labelled_pixels_func(device, label_image, nullptr); + props = tier3::statistics_of_labelled_pixels_func(device, label_image, label_image); } auto centroid_x = props["centroid_x"]; auto centroid_y = props["centroid_y"];