21 #ifndef mia_core_distance_hh 22 #define mia_core_distance_hh 45 template <
typename InputIterator,
typename OutputIterator,
typename T>
47 static void apply(InputIterator in_begin, InputIterator in_end, OutputIterator out_begin){
48 std::transform(in_begin, in_end, out_begin, [](
float x){
return x*x;});
52 template <
typename InputIterator,
typename OutputIterator>
54 static void apply(InputIterator in_begin, InputIterator in_end, OutputIterator out_begin){
55 std::transform(in_begin, in_end, out_begin,
56 [](
bool x){
return x ? 0.0f : std::numeric_limits<float>::max();});
77 template <
typename InputIterator,
typename OutputIterator>
79 OutputIterator out_begin)
81 typedef typename std::iterator_traits<InputIterator>::value_type in_value_type;
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
void EXPORT_CORE distance_transform_inplace(std::vector< float > &r)
void distance_transform_prepare(InputIterator in_begin, InputIterator in_end, OutputIterator out_begin)
#define EXPORT_CORE
Macro to manage Visual C++ style dllimport/dllexport.
#define NS_MIA_END
conveniance define to end the mia namespace