ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkExpandImageFilter.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 itkExpandImageFilter_h
19 #define itkExpandImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
23 
24 namespace itk
25 {
66 template< typename TInputImage, typename TOutputImage >
67 class ITK_TEMPLATE_EXPORT ExpandImageFilter:
68  public ImageToImageFilter< TInputImage, TOutputImage >
69 {
70 public:
76 
78  itkNewMacro(Self);
79 
82 
84  typedef typename TOutputImage::RegionType OutputImageRegionType;
85 
87  itkStaticConstMacro(ImageDimension, unsigned int,
88  TInputImage::ImageDimension);
89 
91  typedef typename Superclass::InputImageType InputImageType;
92  typedef typename Superclass::OutputImageType OutputImageType;
93  typedef typename OutputImageType::PixelType OutputPixelType;
94  typedef typename InputImageType::Pointer InputImagePointer;
95  typedef typename OutputImageType::Pointer OutputImagePointer;
96 
98  typedef double CoordRepType;
103 
105  itkSetObjectMacro(Interpolator, InterpolatorType);
106  itkGetModifiableObjectMacro(Interpolator, InterpolatorType);
108 
111 
114  itkSetMacro(ExpandFactors, ExpandFactorsType);
115  virtual void SetExpandFactors(const unsigned int factor);
117 
119  itkGetConstReferenceMacro(ExpandFactors, ExpandFactorsType);
120 
121 
128  virtual void GenerateOutputInformation() ITK_OVERRIDE;
129 
135  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
136 
137 #ifdef ITK_USE_CONCEPT_CHECKING
138  // Begin concept checking
139  itkConceptMacro( InputHasNumericTraitsCheck,
141  itkConceptMacro( OutputHasNumericTraitsCheck,
143  // End concept checking
144 #endif
145 
146 protected:
148  ~ExpandImageFilter() ITK_OVERRIDE {}
149  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
150 
160  virtual
161  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
162  ThreadIdType threadId) ITK_OVERRIDE;
163 
166  virtual void BeforeThreadedGenerateData() ITK_OVERRIDE;
167 
168 private:
169  ITK_DISALLOW_COPY_AND_ASSIGN(ExpandImageFilter);
170 
171  ExpandFactorsType m_ExpandFactors;
172  InterpolatorPointer m_Interpolator;
173 };
174 } // end namespace itk
175 
176 #ifndef ITK_MANUAL_INSTANTIATION
177 #include "itkExpandImageFilter.hxx"
178 #endif
179 
180 #endif
TOutputImage::RegionType OutputImageRegionType
InterpolateImageFunction< InputImageType, CoordRepType > InterpolatorType
Superclass::InputImageType InputImageType
InputImageType::Pointer InputImagePointer
OutputImageType::Pointer OutputImagePointer
SmartPointer< Self > Pointer
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Base class for all process objects that output image data.
OutputImageType::PixelType OutputPixelType
LinearInterpolateImageFunction< InputImageType, CoordRepType > DefaultInterpolatorType
Linearly interpolate an image at specified positions.
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
InterpolatorType::Pointer InterpolatorPointer
Base class for all image interpolaters.
Base class for filters that take an image as input and produce an image as output.
FixedArray< unsigned int, ImageDimension > ExpandFactorsType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::OutputImageType OutputImageType
#define itkConceptMacro(name, concept)
SmartPointer< const Self > ConstPointer
Expand the size of an image by an integer factor in each dimension.