ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkReflectImageFilter.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 itkReflectImageFilter_h
19 #define itkReflectImageFilter_h
20 #if !defined( ITK_LEGACY_REMOVE )
21 
22 #include "itkImageToImageFilter.h"
23 
24 namespace itk
25 {
37 template< typename TInputImage, typename TOutputImage >
38 class ReflectImageFilter:public ImageToImageFilter< TInputImage, TOutputImage >
39 {
40 public:
42  typedef ReflectImageFilter Self;
43  typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
44  typedef SmartPointer< Self > Pointer;
45  typedef SmartPointer< const Self > ConstPointer;
46 
48  itkNewMacro(Self);
49 
51  itkTypeMacro(ReflectImageFilter, ImageToImageFilter);
52 
54  typedef TInputImage InputImageType;
55  typedef typename InputImageType::Pointer InputImagePointer;
56  typedef typename InputImageType::RegionType InputImageRegionType;
57  typedef typename InputImageType::PixelType InputImagePixelType;
58 
59  typedef TOutputImage OutputImageType;
60  typedef typename OutputImageType::Pointer OutputImagePointer;
61  typedef typename OutputImageType::RegionType OutputImageRegionType;
62  typedef typename OutputImageType::PixelType OutputImagePixelType;
63 
65  itkGetConstMacro(Direction, unsigned int);
66  itkSetMacro(Direction, unsigned int);
68 
70  itkStaticConstMacro(InputImageDimension, unsigned int,
71  TInputImage::ImageDimension);
72  itkStaticConstMacro(OutputImageDimension, unsigned int,
73  TOutputImage::ImageDimension);
75 
76 #ifdef ITK_USE_CONCEPT_CHECKING
77  // Begin concept checking
78  itkConceptMacro( SameDimensionCheck,
79  ( Concept::SameDimension< InputImageDimension, OutputImageDimension > ) );
80  itkConceptMacro( InputConvertibleToOutputCheck,
81  ( Concept::Convertible< InputImagePixelType, OutputImagePixelType > ) );
82  // End concept checking
83 #endif
84 
85 protected:
86  ReflectImageFilter();
87  virtual ~ReflectImageFilter() {}
88  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
89 
94  void GenerateData();
95 
96 private:
97  ReflectImageFilter(const Self &) ITK_DELETE_FUNCTION;
98  void operator=(const Self &) ITK_DELETE_FUNCTION;
99 
100  unsigned int m_Direction;
101 };
102 } // end namespace itk
103 
104 #ifndef ITK_MANUAL_INSTANTIATION
105 #include "itkReflectImageFilter.hxx"
106 #endif
107 
108 #endif //#if !defined( ITK_LEGACY_REMOVE )
109 #endif
#define itkConceptMacro(name, concept)