28#ifndef itkImageToImageFilterDetail_h
29#define itkImageToImageFilterDetail_h
92template <
unsigned int>
102template <
bool B1,
bool B2>
116template <
int D1,
int D2>
135template <
unsigned int D1,
unsigned int D2>
180template <
unsigned int D1,
unsigned int D2>
186 destRegion = srcRegion;
205template <
unsigned int D1,
unsigned int D2>
221 for (
unsigned int dim = 0; dim < D1; ++dim)
223 destIndex[dim] = srcIndex[dim];
224 destSize[dim] = srcSize[dim];
247template <
unsigned int D1,
unsigned int D2>
262 unsigned int dim = 0;
263 for (; dim < D2; ++dim)
265 destIndex[dim] = srcIndex[dim];
266 destSize[dim] = srcSize[dim];
269 for (; dim < D1; ++dim)
317template <
unsigned int D1,
unsigned int D2>
333template <
unsigned int D1,
unsigned int D2>
342template <
unsigned int D1,
unsigned int D2>
350template <
unsigned int D1,
unsigned int D2>
360template <
unsigned int D1,
unsigned int D2>
372 const typename SourceImageType::SpacingType & inputSpacing = srcImage->
GetSpacing();
373 const typename SourceImageType::PointType & inputOrigin = srcImage->
GetOrigin();
374 const typename SourceImageType::DirectionType & inputDirection = srcImage->
GetDirection();
376 typename DestinationImageType::SpacingType destSpacing;
377 typename DestinationImageType::PointType destOrigin;
378 typename DestinationImageType::DirectionType destDirection;
383 for (; i < SourceImageType::ImageDimension; ++i)
385 destSpacing[i] = inputSpacing[i];
386 destOrigin[i] = inputOrigin[i];
387 for (
unsigned int j = 0; j < DestinationImageType::ImageDimension; ++j)
389 if (j < SourceImageType::ImageDimension)
391 destDirection[j][i] = inputDirection[j][i];
395 destDirection[j][i] = 0.0;
399 for (; i < DestinationImageType::ImageDimension; ++i)
401 destSpacing[i] = 1.0;
403 for (
unsigned int j = 0; j < DestinationImageType::ImageDimension; ++j)
407 destDirection[j][i] = 1.0;
411 destDirection[j][i] = 0.0;
436template <
unsigned int D1,
unsigned int D2>
Base class for templated image classes.
virtual const SpacingType & GetSpacing() const
virtual void SetDirection(const DirectionType &direction)
virtual const DirectionType & GetDirection() const
virtual const PointType & GetOrigin() const
virtual void SetSpacing(const SpacingType &spacing)
virtual void SetNumberOfComponentsPerPixel(unsigned int)
virtual void SetOrigin(PointType _arg)
virtual unsigned int GetNumberOfComponentsPerPixel() const
void CopyInformation(const DataObject *data) override
An image region represents a structured region of data.
void SetSize(const SizeType &size)
const IndexType & GetIndex() const
void SetIndex(const IndexType &index)
const SizeType & GetSize() const
A Function object used to dispatching to a routine to copy a region (start index and size).
virtual void operator()(ImageRegion< D1 > &destRegion, const ImageRegion< D2 > &srcRegion) const
virtual ~ImageRegionCopier()=default
void ImageToImageFilterDefaultCopyInformation(const typename BinaryUnsignedIntDispatch< D1, D2 >::FirstEqualsSecondType &, ImageBase< D1 > *destImage, const ImageBase< D2 > *srcImage)
void ImageToImageFilterDefaultCopyRegion(const typename BinaryUnsignedIntDispatch< D1, D2 >::FirstEqualsSecondType &, ImageRegion< D1 > &destRegion, const ImageRegion< D2 > &srcRegion)
bool operator!=(const ImageRegionCopier< D1, D2 > &c1, const ImageRegionCopier< D1, D2 > &c2)
std::ostream & operator<<(std::ostream &os, const ImageRegionCopier< D1, D2 > &)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Templated class to produce a unique type for a pairing of booleans.
BooleanDispatch< B1 > FirstType
BooleanDispatch< B2 > SecondType
Templated class to produce a unique type for a pairing of integers.
IntDispatch< D2 > SecondType
IntDispatch< D1 > FirstType
Templated class to produce a unique type for a pairing of unsigned integers (usually two dimensions).
IntDispatch< 0 > FirstEqualsSecondType
IntDispatch< 1 > FirstGreaterThanSecondType
IntDispatch<-1 > FirstLessThanSecondType
UnsignedIntDispatch< D2 > SecondType
IntDispatch<(D1 > D2) -(D1< D2)> ComparisonType
UnsignedIntDispatch< D1 > FirstType
Templated class to produce a unique type "true" and "false".
Base class for a class used to dispatch to dimension specific implementations.
Templated class to produce a unique type for each integer.
Templated class to produce a unique type for each unsigned integer (usually a dimension).
Represent a n-dimensional index in a n-dimensional image.
Represent a n-dimensional size (bounds) of a n-dimensional image.