15#include <peak_common_c/detail/peak_common_defines.h>
19#include <peak_icv_c/algorithms/thresholds/peak_icv_threshold.h>
36template <
typename IntervalType>
49 explicit Threshold(
const IntervalType& interval);
59 explicit Threshold(
typename IntervalType::type minimum,
typename IntervalType::type maximum);
90 IntervalType m_interval;
115template <
typename IntervalType>
117 : m_interval(interval)
120template <
typename IntervalType>
122 : m_interval(minimum, maximum)
125template <
typename IntervalType>
128 auto*
const inputImageHandle = peak::common::detail::BackendAccessor<Image>::BackendHandle(image);
133 return PEAK_ICV_C_ABI_PREFIX peak_icv_Threshold_Process(inputImageHandle, &interval,
sizeof(interval),
134 peak::common::detail::BackendAccessor<peak::icv::Region>::BackendHandleAddress(region));
140template <
typename IntervalType>
145 auto*
const handle = peak::common::detail::BackendAccessor<Image>::BackendHandle(image);
146 return PEAK_ICV_C_ABI_PREFIX peak_icv_Threshold_GetRange(handle, &interval,
sizeof(interval));
148 return { interval.minimum, interval.maximum };
For detailed information about the use of ids_peak_icv Image refer to the Image Guide.
Represents a region defined by a set of points in the image plane.
Class for thresholding an image.
Threshold(const IntervalType &interval)
Creates an instance of class Threshold.
peak::icv::Region Process(const Image &image) const
Applies a threshold on a given single-channel image and returns a region with selected pixels whose g...
static IntervalType GetRange(const Image &image)
Queries the minimum and maximum value of a given image and provides it as an interval.
detail::Threshold< peak::common::Interval > Threshold
Class for thresholding an image of type integer.
typename c_type_of_< Type >::type c_type_of_t
constexpr bool is_threshold_interval_v
void ExecuteAndMapReturnCodes(const CallableType &callableObject)