ITK  6.0.0
Insight Toolkit
itkFlipImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * https://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkFlipImageFilter_h
19 #define itkFlipImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkFixedArray.h"
23 
24 namespace itk
25 {
52 template <typename TImage>
53 class ITK_TEMPLATE_EXPORT FlipImageFilter : public ImageToImageFilter<TImage, TImage>
54 {
55 public:
56  ITK_DISALLOW_COPY_AND_MOVE(FlipImageFilter);
57 
63 
65  itkNewMacro(Self);
66 
68  itkOverrideGetNameOfClassMacro(FlipImageFilter);
69 
71  static constexpr unsigned int ImageDimension = TImage::ImageDimension;
72 
74  using typename Superclass::InputImagePointer;
75  using typename Superclass::InputImageConstPointer;
76  using typename Superclass::OutputImagePointer;
77  using typename Superclass::OutputImageRegionType;
78 
80  using IndexType = typename TImage::IndexType;
82 
85 
88  itkSetMacro(FlipAxes, FlipAxesArrayType);
89  itkGetConstMacro(FlipAxes, FlipAxesArrayType);
95  itkBooleanMacro(FlipAboutOrigin);
96  itkGetConstMacro(FlipAboutOrigin, bool);
97  itkSetMacro(FlipAboutOrigin, bool);
108  void
109  GenerateOutputInformation() override;
110 
118  void
119  GenerateInputRequestedRegion() override;
120 
121 protected:
122  FlipImageFilter();
123  ~FlipImageFilter() override = default;
124  void
125  PrintSelf(std::ostream & os, Indent indent) const override;
126 
137  void
138  DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
139 
140 private:
141  FlipAxesArrayType m_FlipAxes{};
142  bool m_FlipAboutOrigin{ true };
143 };
144 } // end namespace itk
145 
146 #ifndef ITK_MANUAL_INSTANTIATION
147 # include "itkFlipImageFilter.hxx"
148 #endif
149 
150 #endif
itk::FlipImageFilter::IndexValueType
typename IndexType::IndexValueType IndexValueType
Definition: itkFlipImageFilter.h:81
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::FlipImageFilter::IndexType
typename TImage::IndexType IndexType
Definition: itkFlipImageFilter.h:80
itk::IndexValueType
long IndexValueType
Definition: itkIntTypes.h:93
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itkFixedArray.h
itkImageToImageFilter.h
itk::FixedArray< bool, Self::ImageDimension >
itk::ImageSource< TImage >::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::FlipImageFilter
Flips an image across user specified axes.
Definition: itkFlipImageFilter.h:53