18 #ifndef itkImageAlgorithm_h
19 #define itkImageAlgorithm_h
23 #include <type_traits>
28 template <
typename TPixelType,
unsigned int VImageDimension >
class VectorImage;
69 template<
typename InputImageType,
typename OutputImageType>
70 static void Copy(
const InputImageType *inImage, OutputImageType *outImage,
78 template<
typename TPixel1,
typename TPixel2,
unsigned int VImageDimension>
87 std::is_convertible<
typename _ImageType1::PixelType,
88 typename _ImageType2::PixelType>()
92 template<
typename TPixel1,
typename TPixel2,
unsigned int VImageDimension>
93 static void Copy(
const VectorImage<TPixel1, VImageDimension> * inImage,
94 VectorImage<TPixel2, VImageDimension> * outImage,
98 using _ImageType1 = VectorImage<TPixel1, VImageDimension>;
99 using _ImageType2 = VectorImage<TPixel2, VImageDimension>;
101 std::is_convertible<
typename _ImageType1::PixelType,
102 typename _ImageType2::PixelType>()
114 template<
typename InputImageType,
typename OutputImageType>
117 const InputImageType* inputImage,
118 const OutputImageType* outputImage);
126 template<
typename InputImageType,
typename OutputImageType>
127 static void DispatchedCopy(
const InputImageType *inImage, OutputImageType *outImage,
132 template<
typename InputImageType,
typename OutputImageType>
133 static void DispatchedCopy(
const InputImageType *inImage, OutputImageType *outImage,
141 template <
typename TImageType>
144 static size_t Get(
const TImageType *)
151 template <
typename TPixelType,
unsigned int VImageDimension>
152 struct PixelSize<
VectorImage<TPixelType, VImageDimension> >
155 static size_t Get(
const ImageType * i )
157 const size_t vectorLength = ImageType::AccessorFunctorType::GetVectorLength(i);
164 template<
typename TInputType,
typename TOutputType>
167 TOutputType
operator() (
const TInputType i) {
return static_cast<TOutputType
>(i); }
172 template<
typename TType>
173 static TType*
CopyHelper(
const TType *first,
const TType *last, TType *result)
178 return std::copy(first, last, result);
182 template<
typename TInputType,
typename TOutputType>
183 static TOutputType*
CopyHelper(
const TInputType *first,
const TInputType *last, TOutputType *result)
185 return std::transform(first, last, result, StaticCast<TInputType,TOutputType>());
194 #ifndef ITK_MANUAL_INSTANTIATION
195 #include "itkImageAlgorithm.hxx"
199 #endif //itkImageAlgorithm_h
static OutputImageType::RegionType EnlargeRegionOverBox(const typename InputImageType::RegionType &inputRegion, const InputImageType *inputImage, const OutputImageType *outputImage)
Sets the output region to the smallest region of the output image that fully contains the physical sp...
static void DispatchedCopy(const InputImageType *inImage, OutputImageType *outImage, const typename InputImageType::RegionType &inRegion, const typename OutputImageType::RegionType &outRegion, TrueType isSpecialized)
Templated n-dimensional vector image class.
static TType * CopyHelper(const TType *first, const TType *last, TType *result)
static vcl_size_t Get(const TImageType *)
std::false_type FalseType
typename Superclass::RegionType RegionType
static void Copy(const InputImageType *inImage, OutputImageType *outImage, const typename InputImageType::RegionType &inRegion, const typename OutputImageType::RegionType &outRegion)
This generic function copies a region from one image to another. It may perform optimizations on the ...
ImageBaseType::RegionType RegionType
TOutputType operator()(const TInputType i)
A container of static functions which can operate on Images with Iterators.
Templated n-dimensional image class.