Skip to content

Commit

Permalink
Merge pull request #392 from clEsperanto/update-param
Browse files Browse the repository at this point in the history
Update param
  • Loading branch information
StRigaud authored Nov 12, 2024
2 parents e9899cd + 2bd5fbd commit e926acf
Show file tree
Hide file tree
Showing 21 changed files with 267 additions and 336 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests_and_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
max-parallel: 1
matrix:
buildtype: [Debug]
os: [macos-13] #[macos-latest]
os: [macos-13] #, macos-latest]
cxx: [clang++]
cc: [clang]
packages: [lcov gcovr]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[![GitHub issues](https://img.shields.io/github/issues-raw/clEsperanto/CLIc)](https://github.com/clEsperanto/CLIc/issues)
[![GitHub stars](https://img.shields.io/github/stars/clEsperanto/CLIc?style=social)](https://github.com/clEsperanto/CLIc)
[![GitHub forks](https://img.shields.io/github/forks/clEsperanto/CLIc?style=social)](https://github.com/clEsperanto/CLIc)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.13857353.svg)](https://doi.org/10.5281/zenodo.13857353)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.6075345.svg)](https://doi.org/10.5281/zenodo.6075345)


CLIc is a **prototype** backend library for [CLesperanto](https://github.com/clEsperanto) - a multi-language framework for GPU-accelerated image processing. It uses the [OpenCL kernels](https://github.com/clEsperanto/clij-opencl-kernels/tree/development/src/main/java/net/haesleinhuepf/clij/kernels) from [CLIJ](https://clij.github.io/)
Expand Down
16 changes: 16 additions & 0 deletions clic/include/array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,14 @@ class Array
private:
using MemoryPointer = std::shared_ptr<void *>;

/**
* @brief Default constructor
*/
Array() = default;

/**
* @brief Constructor
*/
Array(size_t width,
size_t height,
size_t depth,
Expand All @@ -325,6 +332,15 @@ class Array
const Backend & backend_ = cle::BackendManager::getInstance().getBackend();
};


/**
* @brief Print the Array as a matrix for debugging
*
* @tparam T Data type of the Array
* @param array Array::Pointer to print
* @param name Name of the Array to print (default: "Array::Pointer")
* @return void
*/
template <typename T>
auto
print(const Array::Pointer & array, const char * name = "Array::Pointer") -> void
Expand Down
118 changes: 0 additions & 118 deletions clic/include/memory.hpp

This file was deleted.

18 changes: 18 additions & 0 deletions clic/include/statistics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,35 @@ namespace cle

using StatisticsMap = std::unordered_map<std::string, std::vector<float>>;

/**
* @brief Compute a list of statistics for each label in the label image (mean, std, min, max)
* using the intensity image and label image as input.
* The output is a map with the following keys: "mean", "std", "min", "max" etc. and a vector of float values
* associated with each statistics.
* The vector length is equal to the number of labels in the label image.
*
* @param device Device::Pointer to use
* @param label Array::Pointer of the label image
* @param intensity Array::Pointer of the intensity image
* @return StatisticsMap
*/
auto
compute_statistics_per_labels(const Device::Pointer & device,
const Array::Pointer & label,
const Array::Pointer & intensity) -> StatisticsMap;

/**
* @brief Subfunction to compute statistics per label
*/
auto
_statistics_per_label(const Device::Pointer & device,
const Array::Pointer & label,
const Array::Pointer & intensity,
int nb_labels) -> Array::Pointer;

/**
* @brief Subfunction to compute standard deviation per label
*/
auto
_std_per_label(const Device::Pointer & device,
const Array::Pointer & statistics,
Expand Down
Loading

0 comments on commit e926acf

Please sign in to comment.