18#ifndef itkOrientImageFilter_h
19#define itkOrientImageFilter_h
72template <
typename TInputImage,
typename TOutputImage>
73class ITK_TEMPLATE_EXPORT OrientImageFilter :
public ImageToImageFilter<TInputImage, TOutputImage>
76 ITK_DISALLOW_COPY_AND_MOVE(OrientImageFilter);
79 using Self = OrientImageFilter;
80 using Superclass = ImageToImageFilter<TInputImage, TOutputImage>;
81 using Pointer = SmartPointer<Self>;
85 using InputImageType = TInputImage;
89 using InputImagePixelType =
typename InputImageType::PixelType;
90 using OutputImageType = TOutputImage;
94 using OutputImagePixelType =
typename OutputImageType::PixelType;
95 using CoordinateOrientationCode = AnatomicalOrientation;
98 using PermuterType = PermuteAxesImageFilter<TInputImage>;
99 using PermuteOrderArrayType =
typename PermuterType::PermuteOrderArrayType;
102 using FlipperType = FlipImageFilter<TInputImage>;
103 using FlipAxesArrayType =
typename FlipperType::FlipAxesArrayType;
106 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
107 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
113 itkOverrideGetNameOfClassMacro(OrientImageFilter);
116 itkGetEnumMacro(GivenCoordinateOrientation, CoordinateOrientationCode);
118 SetGivenCoordinateOrientation(CoordinateOrientationCode newCode);
124 SetGivenCoordinateOrientation(AnatomicalOrientation(GivenDirection));
127 itkGetEnumMacro(DesiredCoordinateOrientation, CoordinateOrientationCode);
129 SetDesiredCoordinateOrientation(CoordinateOrientationCode newCode);
134 SetDesiredCoordinateOrientation(AnatomicalOrientation(DesiredDirection));
145 itkBooleanMacro(UseImageDirection);
146 itkGetConstMacro(UseImageDirection,
bool);
147 itkSetMacro(UseImageDirection,
bool);
151 itkGetConstReferenceMacro(PermuteOrder, PermuteOrderArrayType);
154 itkGetConstReferenceMacro(FlipAxes, FlipAxesArrayType);
167 SetDesiredCoordinateOrientationToAxial()
176 SetDesiredCoordinateOrientationToCoronal()
184 SetDesiredCoordinateOrientationToSagittal()
199 GenerateOutputInformation()
override;
201#ifdef ITK_USE_CONCEPT_CHECKING
203 itkConceptMacro(InputConvertibleToOutput, (Concept::Convertible<InputImagePixelType, OutputImagePixelType>));
204 itkConceptMacro(SameDimension, (Concept::SameDimension<Self::InputImageDimension, Self::OutputImageDimension>));
205 itkConceptMacro(DimensionShouldBe3, (Concept::SameDimension<Self::InputImageDimension, 3>));
211 ~OrientImageFilter()
override =
default;
213 PrintSelf(std::ostream & os, Indent indent)
const override;
219 GenerateInputRequestedRegion()
override;
223 EnlargeOutputRequestedRegion(
DataObject * itkNotUsed(output))
override;
226 VerifyPreconditions()
const override;
230 DeterminePermutationsAndFlips(
const CoordinateOrientationCode fixed_orient,
231 const CoordinateOrientationCode moving_orient);
244 GenerateData()
override;
250 CoordinateOrientationCode m_DesiredCoordinateOrientation{
255 bool m_UseImageDirection{
false };
257 PermuteOrderArrayType m_PermuteOrder{};
258 FlipAxesArrayType m_FlipAxes{
false };
263#ifndef ITK_MANUAL_INSTANTIATION
264# include "itkOrientImageFilter.hxx"
Pixel-wise addition of two images.
@ PosteriorToAnterior
to front - 0b0100
@ AnteriorToPosterior
to back
@ SuperiorToInferior
to foot
@ InferiorToSuperior
to head - 0b1000
SmartPointer< const Self > ConstPointer
BinaryGeneratorImageFilter< TInputImage1, TInputImage2, TOutputImage > Superclass
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
ImageBaseType::DirectionType DirectionType
ImageBaseType::RegionType RegionType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
class ITK_FORWARD_EXPORT DataObject