18 #ifndef itkCastImageFilter_h
19 #define itkCastImageFilter_h
25 #include <type_traits>
29 #if !defined(ITK_LEGACY_REMOVE)
38 template <
typename TInput,
typename TOutput>
39 class ITK_TEMPLATE_EXPORT Cast
43 virtual ~Cast() =
default;
53 return !(*
this != other);
57 operator()(
const TInput & A)
const
59 return static_cast<TOutput>(A);
103 template <
typename TInputImage,
typename TOutputImage>
134 GenerateOutputInformation()
override;
137 GenerateData()
override;
142 template <
typename TInputPixelType,
143 typename TOutputPixelType,
144 typename std::enable_if<mpl::is_static_castable<TInputPixelType, TOutputPixelType>::value,
int>::type = 0>
148 template <
typename TInputPixelType,
149 typename TOutputPixelType,
150 typename std::enable_if<!mpl::is_static_castable<TInputPixelType, TOutputPixelType>::value,
int>::type = 0>
161 #ifndef ITK_MANUAL_INSTANTIATION
162 #include "itkCastImageFilter.hxx"