|
ITK
6.0.0
Insight Toolkit
|
Go to the documentation of this file.
28 #ifndef itkImageToImageFilterDetail_h
29 #define itkImageToImageFilterDetail_h
44 namespace ImageToImageFilterDetail
92 template <
unsigned int>
102 template <
bool B1,
bool B2>
116 template <
int D1,
int D2>
135 template <
unsigned int D1,
unsigned int D2>
180 template <
unsigned int D1,
unsigned int D2>
186 destRegion = srcRegion;
205 template <
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];
247 template <
unsigned int D1,
unsigned int D2>
263 unsigned int dim = 0;
264 for (; dim < D2; ++dim)
266 destIndex[dim] = srcIndex[dim];
267 destSize[dim] = srcSize[dim];
270 for (; dim < D1; ++dim)
318 template <
unsigned int D1,
unsigned int D2>
326 ImageToImageFilterDefaultCopyRegion<D1, D2>(ComparisonType(), destRegion, srcRegion);
334 template <
unsigned int D1,
unsigned int D2>
344 template <
unsigned int D1,
unsigned int D2>
352 template <
unsigned int D1,
unsigned int D2>
362 template <
unsigned int D1,
unsigned int D2>
374 const typename SourceImageType::SpacingType & inputSpacing = srcImage->
GetSpacing();
378 typename DestinationImageType::SpacingType destSpacing;
385 for (; i < SourceImageType::ImageDimension; ++i)
387 destSpacing[i] = inputSpacing[i];
388 destOrigin[i] = inputOrigin[i];
389 for (
unsigned int j = 0; j < DestinationImageType::ImageDimension; ++j)
391 if (j < SourceImageType::ImageDimension)
393 destDirection[j][i] = inputDirection[j][i];
397 destDirection[j][i] = 0.0;
401 for (; i < DestinationImageType::ImageDimension; ++i)
403 destSpacing[i] = 1.0;
405 for (
unsigned int j = 0; j < DestinationImageType::ImageDimension; ++j)
409 destDirection[j][i] = 1.0;
413 destDirection[j][i] = 0.0;
438 template <
unsigned int D1,
unsigned int D2>
446 ImageToImageFilterDefaultCopyInformation<D1, D2>(ComparisonType(), destImage, srcImage);
virtual unsigned int GetNumberOfComponentsPerPixel() const
Represent a n-dimensional index in a n-dimensional image.
ImageBaseType::DirectionType DirectionType
Represent a n-dimensional size (bounds) of a n-dimensional image.
Templated class to produce a unique type for each unsigned integer (usually a dimension).
bool operator!=(const ImageRegionCopier< D1, D2 > &c1, const ImageRegionCopier< D1, D2 > &c2)
Base class for templated image classes.
const IndexType & GetIndex() const
An image region represents a structured region of data.
ImageBaseType::PointType PointType
void CopyInformation(const DataObject *data) override
void ImageToImageFilterDefaultCopyInformation(const typename BinaryUnsignedIntDispatch< D1, D2 >::FirstEqualsSecondType &, ImageBase< D1 > *destImage, const ImageBase< D2 > *srcImage)
Templated class to produce a unique type "true" and "false".
virtual const PointType & GetOrigin() const
const SizeType & GetSize() const
Templated class to produce a unique type for a pairing of unsigned integers (usually two dimensions).
void ImageToImageFilterDefaultCopyRegion(const typename BinaryUnsignedIntDispatch< D1, D2 >::FirstEqualsSecondType &, ImageRegion< D1 > &destRegion, const ImageRegion< D2 > &srcRegion)
Base class for a class used to dispatch to dimension specific implementations.
virtual void SetDirection(const DirectionType &direction)
virtual void operator()(ImageRegion< D1 > &destRegion, const ImageRegion< D2 > &srcRegion) const
Templated class to produce a unique type for a pairing of integers.
Templated class to produce a unique type for each integer.
Templated class to produce a unique type for a pairing of booleans.
virtual void SetOrigin(PointType _arg)
virtual const SpacingType & GetSpacing() const
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
virtual const DirectionType & GetDirection() const
virtual void SetSpacing(const SpacingType &spacing)
void SetIndex(const IndexType &index)
std::ostream & operator<<(std::ostream &os, const ImageRegionCopier< D1, D2 > &)
virtual void SetNumberOfComponentsPerPixel(unsigned int)
A Function object used to dispatching to a routine to copy a region (start index and size).
void SetSize(const SizeType &size)
virtual ~ImageRegionCopier()=default