18 #ifndef __itkImageAlgorithm_h
19 #define __itkImageAlgorithm_h
23 #ifdef ITK_HAS_STLTR1_TR1_TYPE_TRAITS
24 # include <tr1/type_traits>
25 #elif defined ITK_HAS_STLTR1_TYPE_TRAITS
26 # include <type_traits>
34 template <
typename TPixelType,
unsigned int VImageDimension >
class VectorImage;
50 #if defined(ITK_HAS_STLTR1_TR1_TYPE_TRAITS) || defined(ITK_HAS_STLTR1_TYPE_TRAITS)
51 typedef std::tr1::true_type
TrueType;
79 template<
typename InputImageType,
typename OutputImageType>
80 static void Copy(
const InputImageType *inImage, OutputImageType *outImage,
81 const typename InputImageType::RegionType &inRegion,
82 const typename OutputImageType::RegionType &outRegion )
89 template<
class TPixel1,
class TPixel2,
unsigned int VImageDimension>
98 #
if defined(ITK_HAS_STLTR1_TR1_TYPE_TRAITS) || defined(ITK_HAS_STLTR1_TYPE_TRAITS)
99 , std::tr1::is_convertible<
typename _ImageType1::PixelType,
100 typename _ImageType2::PixelType>()
111 template<
class TPixel1,
class TPixel2,
unsigned int VImageDimension>
112 static void Copy(
const VectorImage<TPixel1, VImageDimension> * inImage,
113 VectorImage<TPixel2, VImageDimension> * outImage,
114 const typename VectorImage<TPixel1, VImageDimension>::RegionType &inRegion,
115 const typename VectorImage<TPixel2, VImageDimension>::RegionType &outRegion )
117 typedef VectorImage<TPixel1, VImageDimension> _ImageType1;
118 typedef VectorImage<TPixel2, VImageDimension> _ImageType2;
120 #
if defined(ITK_HAS_STLTR1_TR1_TYPE_TRAITS) || defined(ITK_HAS_STLTR1_TYPE_TRAITS)
121 , std::tr1::is_convertible<
typename _ImageType1::PixelType,
122 typename _ImageType2::PixelType>()
137 template<
typename InputImageType,
typename OutputImageType>
138 static void DispatchedCopy(
const InputImageType *inImage, OutputImageType *outImage,
139 const typename InputImageType::RegionType &inRegion,
140 const typename OutputImageType::RegionType &outRegion,
TrueType isSpecialized );
143 template<
typename InputImageType,
typename OutputImageType>
144 static void DispatchedCopy(
const InputImageType *inImage, OutputImageType *outImage,
145 const typename InputImageType::RegionType &inRegion,
146 const typename OutputImageType::RegionType &outRegion,
FalseType isSpecialized =
FalseType() );
152 template <
typename TImageType>
155 static size_t Get(
const TImageType *)
162 template <
typename TPixelType,
unsigned int VImageDimension>
163 struct PixelSize<
VectorImage<TPixelType, VImageDimension> >
166 static size_t Get(
const ImageType * i )
168 const size_t vectorLength = ImageType::AccessorFunctorType::GetVectorLength(i);
179 #ifndef ITK_MANUAL_INSTANTIATION
180 #include "itkImageAlgorithm.hxx"
184 #endif //__itkImageAlgorithm_h