ITK  5.2.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  * http://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_ASSIGN(FlipImageFilter);
57 
63 
65  itkNewMacro(Self);
66 
68  itkTypeMacro(FlipImageFilter, ImageToImageFilter);
69 
71  static constexpr unsigned int ImageDimension = TImage::ImageDimension;
72 
74  using InputImagePointer = typename Superclass::InputImagePointer;
75  using InputImageConstPointer = typename Superclass::InputImageConstPointer;
76  using OutputImagePointer = typename Superclass::OutputImagePointer;
77  using OutputImageRegionType = typename Superclass::OutputImageRegionType;
78 
80  using IndexType = typename TImage::IndexType;
82 
85 
88  itkSetMacro(FlipAxes, FlipAxesArrayType);
89  itkGetConstMacro(FlipAxes, FlipAxesArrayType);
91 
95  itkBooleanMacro(FlipAboutOrigin);
96  itkGetConstMacro(FlipAboutOrigin, bool);
97  itkSetMacro(FlipAboutOrigin, bool);
99 
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:
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::FlipImageFilter::OutputImagePointer
typename Superclass::OutputImagePointer OutputImagePointer
Definition: itkFlipImageFilter.h:76
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::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:59
itkFixedArray.h
itk::FlipImageFilter::InputImagePointer
typename Superclass::InputImagePointer InputImagePointer
Definition: itkFlipImageFilter.h:74
itkImageToImageFilter.h
itk::FixedArray< bool, Self::ImageDimension >
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::FlipImageFilter
Flips an image across user specified axes.
Definition: itkFlipImageFilter.h:53
itk::IndexValueType
signed long IndexValueType
Definition: itkIntTypes.h:90
itk::FlipImageFilter::OutputImageRegionType
typename Superclass::OutputImageRegionType OutputImageRegionType
Definition: itkFlipImageFilter.h:77
itk::FlipImageFilter::m_FlipAxes
FlipAxesArrayType m_FlipAxes
Definition: itkFlipImageFilter.h:141
itk::FlipImageFilter::InputImageConstPointer
typename Superclass::InputImageConstPointer InputImageConstPointer
Definition: itkFlipImageFilter.h:75