21 #ifndef __mia_internal_convert_hh 22 #define __mia_internal_convert_hh 39 template <
class Image>
60 template <
template <
typename>
class Data,
typename T>
61 typename TConvert<Image>::result_type operator () (
const Data<T>& data)
const;
64 template <
template <
typename>
class Data,
typename S,
typename T>
65 typename TConvert<Image>::result_type convert(
const Data<S>& src)
const;
66 typename TConvert::result_type do_filter(
const Image& image)
const;
78 template <
class Image>
81 TConvertFilterPlugin();
84 virtual const std::string do_get_descr()
const;
100 template <
typename T,
bool is_
float>
102 static T apply(T x) {
107 template <
typename T>
108 struct __mia_round<T, false> {
109 static T apply(
long double x) {
110 return static_cast<T
>(floor(x + 0.5));
114 template <
typename T,
bool is_
float>
115 struct __dispatch_minmax {
116 static std::pair<T, T> apply() {
117 return std::pair<T, T>(std::numeric_limits<T>::min(),std::numeric_limits<T>::max());
121 template <
typename T>
122 struct __dispatch_minmax<T, true> {
123 static std::pair<T, T> apply() {
124 return std::pair<T, T>(-1.0f, 1.0f);
128 template <
typename T>
130 static std::pair<T, T> apply() {
131 return __dispatch_minmax<T, std::is_floating_point<T>::value >::apply();
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Generic image filter plugin base.
TFilter< std::shared_ptr< D > >::result_type result_type
result type of this filter
Generic interface class to data filters.
#define NS_MIA_END
conveniance define to end the mia namespace