Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to CLIc@master #31

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions native/clesperantoj/include/kernelj.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

/*
* This file is autogenerated. Do not edit manually.
*/
#include "kernelj.hpp"
#include "tier8.hpp"

ArrayJ Tier8::smooth_labels(DeviceJ * device, ArrayJ * src, ArrayJ * dst, int radius)
{
return ArrayJ{cle::tier8::smooth_labels_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), radius)};
}

ArrayJ Tier8::smooth_connected_labels(DeviceJ * device, ArrayJ * src, ArrayJ * dst, int radius)
{
return ArrayJ{cle::tier8::smooth_connected_labels_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), radius)};
}

712 changes: 712 additions & 0 deletions native/clesperantoj/src/tier1j.cpp

Large diffs are not rendered by default.

232 changes: 232 additions & 0 deletions native/clesperantoj/src/tier2j.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,232 @@

/*
* This file is autogenerated. Do not edit manually.
*/
#include "kernelj.hpp"
#include "tier2.hpp"

ArrayJ Tier2::absolute_difference(DeviceJ * device, ArrayJ * src0, ArrayJ * src1, ArrayJ * dst)
{
return ArrayJ{cle::tier2::absolute_difference_func(device->get(), src0->get(), src1->get(), dst == nullptr ? nullptr : dst->get())};
}

ArrayJ Tier2::add_images(DeviceJ * device, ArrayJ * src0, ArrayJ * src1, ArrayJ * dst)
{
return ArrayJ{cle::tier2::add_images_func(device->get(), src0->get(), src1->get(), dst == nullptr ? nullptr : dst->get())};
}

ArrayJ Tier2::bottom_hat_box(DeviceJ * device, ArrayJ * src, ArrayJ * dst, int radius_x, int radius_y, int radius_z)
{
return ArrayJ{cle::tier2::bottom_hat_box_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), radius_x, radius_y, radius_z)};
}

ArrayJ Tier2::bottom_hat_sphere(DeviceJ * device, ArrayJ * src, ArrayJ * dst, float radius_x, float radius_y, float radius_z)
{
return ArrayJ{cle::tier2::bottom_hat_sphere_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), radius_x, radius_y, radius_z)};
}

ArrayJ Tier2::bottom_hat(DeviceJ * device, ArrayJ * src, ArrayJ * dst, float radius_x, float radius_y, float radius_z, std::string connectivity)
{
return ArrayJ{cle::tier2::bottom_hat_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), radius_x, radius_y, radius_z, connectivity)};
}

ArrayJ Tier2::clip(DeviceJ * device, ArrayJ * src, ArrayJ * dst, float min_intensity, float max_intensity)
{
return ArrayJ{cle::tier2::clip_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), min_intensity, max_intensity)};
}

ArrayJ Tier2::closing_box(DeviceJ * device, ArrayJ * src, ArrayJ * dst, int radius_x, int radius_y, int radius_z)
{
return ArrayJ{cle::tier2::closing_box_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), radius_x, radius_y, radius_z)};
}

ArrayJ Tier2::closing_sphere(DeviceJ * device, ArrayJ * src, ArrayJ * dst, int radius_x, int radius_y, int radius_z)
{
return ArrayJ{cle::tier2::closing_sphere_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), radius_x, radius_y, radius_z)};
}

ArrayJ Tier2::closing(DeviceJ * device, ArrayJ * src, ArrayJ * dst, int radius_x, int radius_y, int radius_z, std::string connectivity)
{
return ArrayJ{cle::tier2::closing_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), radius_x, radius_y, radius_z, connectivity)};
}

ArrayJ Tier2::concatenate_along_x(DeviceJ * device, ArrayJ * src0, ArrayJ * src1, ArrayJ * dst)
{
return ArrayJ{cle::tier2::concatenate_along_x_func(device->get(), src0->get(), src1->get(), dst == nullptr ? nullptr : dst->get())};
}

ArrayJ Tier2::concatenate_along_y(DeviceJ * device, ArrayJ * src0, ArrayJ * src1, ArrayJ * dst)
{
return ArrayJ{cle::tier2::concatenate_along_y_func(device->get(), src0->get(), src1->get(), dst == nullptr ? nullptr : dst->get())};
}

ArrayJ Tier2::concatenate_along_z(DeviceJ * device, ArrayJ * src0, ArrayJ * src1, ArrayJ * dst)
{
return ArrayJ{cle::tier2::concatenate_along_z_func(device->get(), src0->get(), src1->get(), dst == nullptr ? nullptr : dst->get())};
}

ArrayJ Tier2::count_touching_neighbors(DeviceJ * device, ArrayJ * src, ArrayJ * dst, bool ignore_background)
{
return ArrayJ{cle::tier2::count_touching_neighbors_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), ignore_background)};
}

ArrayJ Tier2::crop_border(DeviceJ * device, ArrayJ * src, ArrayJ * dst, int border_size)
{
return ArrayJ{cle::tier2::crop_border_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), border_size)};
}

ArrayJ Tier2::divide_by_gaussian_background(DeviceJ * device, ArrayJ * src, ArrayJ * dst, float sigma_x, float sigma_y, float sigma_z)
{
return ArrayJ{cle::tier2::divide_by_gaussian_background_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), sigma_x, sigma_y, sigma_z)};
}

ArrayJ Tier2::degrees_to_radians(DeviceJ * device, ArrayJ * src, ArrayJ * dst)
{
return ArrayJ{cle::tier2::degrees_to_radians_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get())};
}

ArrayJ Tier2::detect_maxima_box(DeviceJ * device, ArrayJ * src, ArrayJ * dst, int radius_x, int radius_y, int radius_z)
{
return ArrayJ{cle::tier2::detect_maxima_box_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), radius_x, radius_y, radius_z)};
}

ArrayJ Tier2::detect_maxima(DeviceJ * device, ArrayJ * src, ArrayJ * dst, int radius_x, int radius_y, int radius_z, std::string connectivity)
{
return ArrayJ{cle::tier2::detect_maxima_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), radius_x, radius_y, radius_z, connectivity)};
}

ArrayJ Tier2::detect_minima_box(DeviceJ * device, ArrayJ * src, ArrayJ * dst, int radius_x, int radius_y, int radius_z)
{
return ArrayJ{cle::tier2::detect_minima_box_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), radius_x, radius_y, radius_z)};
}

ArrayJ Tier2::detect_minima(DeviceJ * device, ArrayJ * src, ArrayJ * dst, int radius_x, int radius_y, int radius_z, std::string connectivity)
{
return ArrayJ{cle::tier2::detect_minima_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), radius_x, radius_y, radius_z, connectivity)};
}

ArrayJ Tier2::difference_of_gaussian(DeviceJ * device, ArrayJ * src, ArrayJ * dst, float sigma1_x, float sigma1_y, float sigma1_z, float sigma2_x, float sigma2_y, float sigma2_z)
{
return ArrayJ{cle::tier2::difference_of_gaussian_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), sigma1_x, sigma1_y, sigma1_z, sigma2_x, sigma2_y, sigma2_z)};
}

ArrayJ Tier2::extend_labeling_via_voronoi(DeviceJ * device, ArrayJ * src, ArrayJ * dst)
{
return ArrayJ{cle::tier2::extend_labeling_via_voronoi_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get())};
}

ArrayJ Tier2::invert(DeviceJ * device, ArrayJ * src, ArrayJ * dst)
{
return ArrayJ{cle::tier2::invert_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get())};
}

ArrayJ Tier2::label_spots(DeviceJ * device, ArrayJ * src, ArrayJ * dst)
{
return ArrayJ{cle::tier2::label_spots_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get())};
}

ArrayJ Tier2::large_hessian_eigenvalue(DeviceJ * device, ArrayJ * src, ArrayJ * dst)
{
return ArrayJ{cle::tier2::large_hessian_eigenvalue_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get())};
}

float Tier2::maximum_of_all_pixels(DeviceJ * device, ArrayJ * src)
{
return cle::tier2::maximum_of_all_pixels_func(device->get(), src->get());
}

float Tier2::minimum_of_all_pixels(DeviceJ * device, ArrayJ * src)
{
return cle::tier2::minimum_of_all_pixels_func(device->get(), src->get());
}

float Tier2::minimum_of_masked_pixels(DeviceJ * device, ArrayJ * src, ArrayJ * mask)
{
return cle::tier2::minimum_of_masked_pixels_func(device->get(), src->get(), mask->get());
}

ArrayJ Tier2::opening_box(DeviceJ * device, ArrayJ * src, ArrayJ * dst, int radius_x, int radius_y, int radius_z)
{
return ArrayJ{cle::tier2::opening_box_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), radius_x, radius_y, radius_z)};
}

ArrayJ Tier2::opening_sphere(DeviceJ * device, ArrayJ * src, ArrayJ * dst, float radius_x, float radius_y, float radius_z)
{
return ArrayJ{cle::tier2::opening_sphere_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), radius_x, radius_y, radius_z)};
}

ArrayJ Tier2::opening(DeviceJ * device, ArrayJ * src, ArrayJ * dst, float radius_x, float radius_y, float radius_z, std::string connectivity)
{
return ArrayJ{cle::tier2::opening_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), radius_x, radius_y, radius_z, connectivity)};
}

ArrayJ Tier2::radians_to_degrees(DeviceJ * device, ArrayJ * src, ArrayJ * dst)
{
return ArrayJ{cle::tier2::radians_to_degrees_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get())};
}

ArrayJ Tier2::reduce_labels_to_label_edges(DeviceJ * device, ArrayJ * src, ArrayJ * dst)
{
return ArrayJ{cle::tier2::reduce_labels_to_label_edges_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get())};
}

ArrayJ Tier2::small_hessian_eigenvalue(DeviceJ * device, ArrayJ * src, ArrayJ * dst)
{
return ArrayJ{cle::tier2::small_hessian_eigenvalue_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get())};
}

ArrayJ Tier2::square(DeviceJ * device, ArrayJ * src, ArrayJ * dst)
{
return ArrayJ{cle::tier2::square_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get())};
}

ArrayJ Tier2::squared_difference(DeviceJ * device, ArrayJ * src0, ArrayJ * src1, ArrayJ * dst)
{
return ArrayJ{cle::tier2::squared_difference_func(device->get(), src0->get(), src1->get(), dst == nullptr ? nullptr : dst->get())};
}

ArrayJ Tier2::standard_deviation_box(DeviceJ * device, ArrayJ * src, ArrayJ * dst, int radius_x, int radius_y, int radius_z)
{
return ArrayJ{cle::tier2::standard_deviation_box_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), radius_x, radius_y, radius_z)};
}

ArrayJ Tier2::standard_deviation_sphere(DeviceJ * device, ArrayJ * src, ArrayJ * dst, int radius_x, int radius_y, int radius_z)
{
return ArrayJ{cle::tier2::standard_deviation_sphere_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), radius_x, radius_y, radius_z)};
}

ArrayJ Tier2::standard_deviation(DeviceJ * device, ArrayJ * src, ArrayJ * dst, int radius_x, int radius_y, int radius_z, std::string connectivity)
{
return ArrayJ{cle::tier2::standard_deviation_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), radius_x, radius_y, radius_z, connectivity)};
}

ArrayJ Tier2::subtract_gaussian_background(DeviceJ * device, ArrayJ * src, ArrayJ * dst, float sigma_x, float sigma_y, float sigma_z)
{
return ArrayJ{cle::tier2::subtract_gaussian_background_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), sigma_x, sigma_y, sigma_z)};
}

ArrayJ Tier2::subtract_images(DeviceJ * device, ArrayJ * src0, ArrayJ * src1, ArrayJ * dst)
{
return ArrayJ{cle::tier2::subtract_images_func(device->get(), src0->get(), src1->get(), dst == nullptr ? nullptr : dst->get())};
}

float Tier2::sum_of_all_pixels(DeviceJ * device, ArrayJ * src)
{
return cle::tier2::sum_of_all_pixels_func(device->get(), src == nullptr ? nullptr : src->get());
}

ArrayJ Tier2::top_hat_box(DeviceJ * device, ArrayJ * src, ArrayJ * dst, int radius_x, int radius_y, int radius_z)
{
return ArrayJ{cle::tier2::top_hat_box_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), radius_x, radius_y, radius_z)};
}

ArrayJ Tier2::top_hat_sphere(DeviceJ * device, ArrayJ * src, ArrayJ * dst, float radius_x, float radius_y, float radius_z)
{
return ArrayJ{cle::tier2::top_hat_sphere_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), radius_x, radius_y, radius_z)};
}

ArrayJ Tier2::top_hat(DeviceJ * device, ArrayJ * src, ArrayJ * dst, float radius_x, float radius_y, float radius_z, std::string connectivity)
{
return ArrayJ{cle::tier2::top_hat_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), radius_x, radius_y, radius_z, connectivity)};
}

87 changes: 87 additions & 0 deletions native/clesperantoj/src/tier3j.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@

/*
* This file is autogenerated. Do not edit manually.
*/
#include "kernelj.hpp"
#include "tier3.hpp"

std::vector<float> Tier3::bounding_box(DeviceJ * device, ArrayJ * src)
{
return cle::tier3::bounding_box_func(device->get(), src->get());
}

std::vector<float> Tier3::center_of_mass(DeviceJ * device, ArrayJ * src)
{
return cle::tier3::center_of_mass_func(device->get(), src->get());
}

ArrayJ Tier3::remove_labels(DeviceJ * device, ArrayJ * src, ArrayJ * list, ArrayJ * dst)
{
return ArrayJ{cle::tier3::remove_labels_func(device->get(), src->get(), list->get(), dst == nullptr ? nullptr : dst->get())};
}

ArrayJ Tier3::remove_labels_on_edges(DeviceJ * device, ArrayJ * src, ArrayJ * dst, bool exclude_x, bool exclude_y, bool exclude_z)
{
return ArrayJ{cle::tier3::remove_labels_on_edges_func(device == nullptr ? nullptr : device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), exclude_x, exclude_y, exclude_z)};
}

ArrayJ Tier3::flag_existing_labels(DeviceJ * device, ArrayJ * src, ArrayJ * dst)
{
return ArrayJ{cle::tier3::flag_existing_labels_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get())};
}

ArrayJ Tier3::gamma_correction(DeviceJ * device, ArrayJ * src, ArrayJ * dst, float gamma)
{
return ArrayJ{cle::tier3::gamma_correction_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), gamma)};
}

ArrayJ Tier3::generate_binary_overlap_matrix(DeviceJ * device, ArrayJ * src0, ArrayJ * src1, ArrayJ * dst)
{
return ArrayJ{cle::tier3::generate_binary_overlap_matrix_func(device->get(), src0->get(), src1->get(), dst == nullptr ? nullptr : dst->get())};
}

ArrayJ Tier3::generate_touch_matrix(DeviceJ * device, ArrayJ * src, ArrayJ * dst)
{
return ArrayJ{cle::tier3::generate_touch_matrix_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get())};
}

ArrayJ Tier3::histogram(DeviceJ * device, ArrayJ * src, ArrayJ * dst, int nbins, float min, float max)
{
return ArrayJ{cle::tier3::histogram_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), nbins, min, max)};
}

float Tier3::jaccard_index(DeviceJ * device, ArrayJ * src0, ArrayJ * src1)
{
return cle::tier3::jaccard_index_func(device->get(), src0->get(), src1->get());
}

ArrayJ Tier3::labelled_spots_to_pointlist(DeviceJ * device, ArrayJ * src, ArrayJ * dst)
{
return ArrayJ{cle::tier3::labelled_spots_to_pointlist_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get())};
}

std::vector<float> Tier3::maximum_position(DeviceJ * device, ArrayJ * src)
{
return cle::tier3::maximum_position_func(device->get(), src->get());
}

float Tier3::mean_of_all_pixels(DeviceJ * device, ArrayJ * src)
{
return cle::tier3::mean_of_all_pixels_func(device->get(), src->get());
}

std::vector<float> Tier3::minimum_position(DeviceJ * device, ArrayJ * src)
{
return cle::tier3::minimum_position_func(device->get(), src->get());
}

ArrayJ Tier3::morphological_chan_vese(DeviceJ * device, ArrayJ * src, ArrayJ * dst, int num_iter, int smoothing, float lambda1, float lambda2)
{
return ArrayJ{cle::tier3::morphological_chan_vese_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), num_iter, smoothing, lambda1, lambda2)};
}

std::unordered_map<std::string, std::vector<float>> Tier3::statistics_of_labelled_pixels(DeviceJ * device, ArrayJ * src, ArrayJ * intensity, bool withBG)
{
return cle::tier3::statistics_of_labelled_pixels_func(device->get(), src->get(), intensity == nullptr ? nullptr : intensity->get(), withBG);
}

37 changes: 37 additions & 0 deletions native/clesperantoj/src/tier4j.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

/*
* This file is autogenerated. Do not edit manually.
*/
#include "kernelj.hpp"
#include "tier4.hpp"

std::vector<float> Tier4::label_bounding_box(DeviceJ * device, ArrayJ * src, int label_id)
{
return cle::tier4::label_bounding_box_func(device->get(), src->get(), label_id);
}

float Tier4::mean_squared_error(DeviceJ * device, ArrayJ * src0, ArrayJ * src1)
{
return cle::tier4::mean_squared_error_func(device->get(), src0->get(), src1->get());
}

ArrayJ Tier4::spots_to_pointlist(DeviceJ * device, ArrayJ * src, ArrayJ * dst)
{
return ArrayJ{cle::tier4::spots_to_pointlist_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get())};
}

ArrayJ Tier4::relabel_sequential(DeviceJ * device, ArrayJ * src, ArrayJ * dst, int blocksize)
{
return ArrayJ{cle::tier4::relabel_sequential_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), blocksize)};
}

ArrayJ Tier4::threshold_otsu(DeviceJ * device, ArrayJ * src, ArrayJ * dst)
{
return ArrayJ{cle::tier4::threshold_otsu_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get())};
}

ArrayJ Tier4::filter_label_by_size(DeviceJ * device, ArrayJ * src, ArrayJ * dst, float min_size, float max_size)
{
return ArrayJ{cle::tier4::filter_label_by_size_func(device->get(), src->get(), dst == nullptr ? nullptr : dst->get(), min_size, max_size)};
}

Loading