18#ifndef itkImageAlgorithm_h
19#define itkImageAlgorithm_h
28template <
typename TPixelType,
unsigned int VImageDimension>
58 while( !it.IsAtEnd() )
60 ot.Set(
static_cast< typename TInputImage::PixelType
>( it.Get() ) );
66 * \note: It is important not to explicitly pass the
template
67 * arguments to
this method as it may not result in an optimized
68 * method being called.
70 template <
typename InputImageType,
typename OutputImageType>
72 Copy(
const InputImageType * inImage,
73 OutputImageType * outImage,
81 template <
typename TPixel1,
typename TPixel2,
unsigned int VImageDimension>
95 std::is_convertible<typename _ImageType1::PixelType, typename _ImageType2::PixelType>());
98 template <
typename TPixel1,
typename TPixel2,
unsigned int VImageDimension>
100 Copy(
const VectorImage<TPixel1, VImageDimension> * inImage,
101 VectorImage<TPixel2, VImageDimension> * outImage,
105 using _ImageType1 = VectorImage<TPixel1, VImageDimension>;
106 using _ImageType2 = VectorImage<TPixel2, VImageDimension>;
112 std::is_convertible<typename _ImageType1::PixelType, typename _ImageType2::PixelType>());
123 template <
typename InputImageType,
typename OutputImageType>
126 const InputImageType * inputImage,
127 const OutputImageType * outputImage);
129 template <
typename InputImageType,
typename OutputImageType,
typename TransformType>
132 const InputImageType * inputImage,
133 const OutputImageType * outputImage,
134 const TransformType * transform);
141 template <
typename InputImageType,
typename OutputImageType>
144 OutputImageType * outImage,
150 template <
typename InputImageType,
typename OutputImageType>
153 OutputImageType * outImage,
162 template <
typename TImageType>
173 template <
typename TPixelType,
unsigned int VImageDimension>
174 struct PixelSize<VectorImage<TPixelType, VImageDimension>>
178 Get(
const ImageType * i)
180 const size_t vectorLength = ImageType::AccessorFunctorType::GetVectorLength(i);
187 template <
typename TInputType,
typename TOutputType>
193 return static_cast<TOutputType
>(i);
200 template <
typename TType>
202 CopyHelper(
const TType * first,
const TType * last, TType * result)
207 return std::copy(first, last, result);
211 template <
typename TInputType,
typename TOutputType>
213 CopyHelper(
const TInputType * first,
const TInputType * last, TOutputType * result)
215 return std::transform(first, last, result, StaticCast<TInputType, TOutputType>());
222#ifndef ITK_MANUAL_INSTANTIATION
223# include "itkImageAlgorithm.hxx"
ImageRegion< VImageDimension > RegionType
An image region represents a structured region of data.
Templated n-dimensional image class.
Templated n-dimensional vector image class.
ImageBaseType::RegionType RegionType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
static vcl_size_t Get(const TImageType *)
TOutputType operator()(const TInputType i)
A container of static functions which can operate on Images with Iterators.
std::false_type FalseType
static void DispatchedCopy(const InputImageType *inImage, OutputImageType *outImage, const typename InputImageType::RegionType &inRegion, const typename OutputImageType::RegionType &outRegion, FalseType isSpecialized=FalseType())
static void DispatchedCopy(const InputImageType *inImage, OutputImageType *outImage, const typename InputImageType::RegionType &inRegion, const typename OutputImageType::RegionType &outRegion, TrueType isSpecialized)
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 OutputImageType::RegionType EnlargeRegionOverBox(const typename InputImageType::RegionType &inputRegion, const InputImageType *inputImage, const OutputImageType *outputImage, const TransformType *transform)
This generic function copies a region from one image to another. It may perform optimizations on the ...
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 ...
static TType * CopyHelper(const TType *first, const TType *last, TType *result)