18 #ifndef sitkCastImageFilter_h
19 #define sitkCastImageFilter_h
45 SITK_RETURN_SELF_TYPE_HEADER
48 GetOutputPixelType()
const;
62 return std::string(
"CastImageFilter");
67 ToString()
const override;
71 Execute(
const Image &);
85 template <
typename TImageType,
typename TOutputImageType>
87 ExecuteInternalCast(
const Image & inImage);
89 template <
typename TImageType,
typename TOutputImageType>
91 ExecuteInternalToVector(
const Image & inImage);
93 template <
typename TImageType,
typename TOutputImageType>
95 ExecuteInternalToLabel(
const Image & inImage);
97 template <
typename TImageType,
typename TOutputImageType>
99 ExecuteInternalLabelToImage(
const Image & inImage);
108 template <
class TMemberFunctionPo
inter>
111 using ObjectType = typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType;
113 template <
typename TImageType1,
typename TImageType2>
114 TMemberFunctionPointer
117 return &ObjectType::template ExecuteInternalCast<TImageType1, TImageType2>;
124 template <
class TMemberFunctionPo
inter>
127 using ObjectType = typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType;
129 template <
typename TImageType1,
typename TImageType2>
130 TMemberFunctionPointer
133 return &ObjectType::template ExecuteInternalToVector<TImageType1, TImageType2>;
140 template <
class TMemberFunctionPo
inter>
143 using ObjectType = typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType;
145 template <
typename TImageType1,
typename TImageType2>
146 TMemberFunctionPointer
149 return &ObjectType::template ExecuteInternalToLabel<TImageType1, TImageType2>;
156 template <
class TMemberFunctionPo
inter>
159 using ObjectType = typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType;
161 template <
typename TImageType1,
typename TImageType2>
162 TMemberFunctionPointer
165 return &ObjectType::template ExecuteInternalLabelToImage<TImageType1, TImageType2>;
177 RegisterMemberFactory2();
179 RegisterMemberFactory2v();
181 RegisterMemberFactory2l();
183 RegisterMemberFactory3();
185 RegisterMemberFactory3v();
187 RegisterMemberFactory3l();
189 RegisterMemberFactory4();