11 #ifndef __stir_thresholding_H__ 12 #define __stir_thresholding_H__ 43 template <
typename forw_iterT,
typename elemT>
47 for (forw_iterT iter = begin; iter != end; ++iter)
51 else if (new_min > *iter)
59 template <
typename forw_iterT,
typename elemT>
63 for (forw_iterT iter = begin; iter != end; ++iter)
73 template <
typename forw_iterT,
typename elemT>
77 for (forw_iterT iter = begin; iter != end; ++iter)
99 template <
typename ForwardIter_t,
typename elemT>
105 if (smallest_positive_element_iter != end)
106 threshold_lower(begin, end, (*smallest_positive_element_iter) * small_number);
108 std::fill(begin, end, small_number);
Declares the stir::min_positive_element() function.
void threshold_upper_lower(forw_iterT begin, forw_iterT end, const elemT new_min, const elemT new_max)
Threshold a sequence from above and below.
Definition: thresholding.h:45
void threshold_min_to_small_positive_value(ForwardIter_t begin, ForwardIter_t end, const elemT &small_number)
sets non-positive values in the sequence to small positive ones
Definition: thresholding.h:101
ForwardIter_t min_positive_element(ForwardIter_t start, ForwardIter_t end)
Finds where the smallest strictly positive element occurs.
Definition: min_positive_element.h:45
void threshold_upper(forw_iterT begin, forw_iterT end, const elemT new_max)
Threshold a sequence from above.
Definition: thresholding.h:61
void threshold_lower(forw_iterT begin, forw_iterT end, const elemT new_min)
Threshold a sequence from below.
Definition: thresholding.h:75