ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkFlipImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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:
54  public ImageToImageFilter< TImage, TImage >
55 {
56 public:
57  ITK_DISALLOW_COPY_AND_ASSIGN(FlipImageFilter);
58 
64 
66  itkNewMacro(Self);
67 
69  itkTypeMacro(FlipImageFilter, ImageToImageFilter);
70 
72  static constexpr unsigned int ImageDimension = TImage::ImageDimension;
73 
75  using InputImagePointer = typename Superclass::InputImagePointer;
76  using InputImageConstPointer = typename Superclass::InputImageConstPointer;
77  using OutputImagePointer = typename Superclass::OutputImagePointer;
78  using OutputImageRegionType = typename Superclass::OutputImageRegionType;
79 
81  using IndexType = typename TImage::IndexType;
83 
86 
89  itkSetMacro(FlipAxes, FlipAxesArrayType);
90  itkGetConstMacro(FlipAxes, FlipAxesArrayType);
92 
96  itkBooleanMacro(FlipAboutOrigin);
97  itkGetConstMacro(FlipAboutOrigin, bool);
98  itkSetMacro(FlipAboutOrigin, bool);
100 
109  void GenerateOutputInformation() override;
110 
118  void GenerateInputRequestedRegion() override;
119 
120 protected:
121  FlipImageFilter();
122  ~FlipImageFilter() override = default;
123  void PrintSelf(std::ostream & os, Indent indent) const override;
124 
135  void DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
136 
137 private:
139  bool m_FlipAboutOrigin{ true };
140 };
141 } // end namespace itk
142 
143 #ifndef ITK_MANUAL_INSTANTIATION
144 #include "itkFlipImageFilter.hxx"
145 #endif
146 
147 #endif
Light weight base class for most itk classes.
typename Superclass::InputImagePointer InputImagePointer
typename Superclass::OutputImageRegionType OutputImageRegionType
typename Superclass::InputImageConstPointer InputImageConstPointer
FlipAxesArrayType m_FlipAxes
signed long IndexValueType
Definition: itkIntTypes.h:90
typename TImage::IndexType IndexType
typename Superclass::OutputImagePointer OutputImagePointer
typename IndexType::IndexValueType IndexValueType
Flips an image across user specified axes.
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49