ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkVectorResampleImageFilter.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 itkVectorResampleImageFilter_h
19 #define itkVectorResampleImageFilter_h
20 
21 #include "itkTransform.h"
22 #include "itkImageRegionIterator.h"
23 #include "itkImageToImageFilter.h"
25 #include "itkSize.h"
26 
27 namespace itk
28 {
61 template< typename TInputImage, typename TOutputImage, typename TInterpolatorPrecisionType = double >
62 class ITK_TEMPLATE_EXPORT VectorResampleImageFilter:
63  public ImageToImageFilter< TInputImage, TOutputImage >
64 {
65 public:
71 
72  typedef TInputImage InputImageType;
73  typedef TOutputImage OutputImageType;
74  typedef typename InputImageType::Pointer InputImagePointer;
75  typedef typename InputImageType::ConstPointer InputImageConstPointer;
76  typedef typename OutputImageType::Pointer OutputImagePointer;
77  typedef typename InputImageType::RegionType InputImageRegionType;
78 
80  itkNewMacro(Self);
81 
84 
86  itkStaticConstMacro(ImageDimension, unsigned int,
87  TOutputImage::ImageDimension);
88 
94  typedef Transform< TInterpolatorPrecisionType, itkGetStaticConstMacro(ImageDimension),
95  itkGetStaticConstMacro(ImageDimension) > TransformType;
96  typedef typename TransformType::ConstPointer
99 
103 
106 
109 
112 
114  typedef typename TOutputImage::PixelType PixelType;
115  typedef typename PixelType::ValueType PixelComponentType;
116 
118  typedef typename TOutputImage::RegionType OutputImageRegionType;
119 
121  typedef typename TOutputImage::SpacingType SpacingType;
124 
130  itkSetConstObjectMacro(Transform, TransformType);
131  itkGetConstObjectMacro(Transform, TransformType);
133 
136  itkSetObjectMacro(Interpolator, InterpolatorType);
137 
139  itkGetModifiableObjectMacro(Interpolator, InterpolatorType);
140 
142  itkSetMacro(Size, SizeType);
143 
145  itkGetConstReferenceMacro(Size, SizeType);
146 
149  itkSetMacro(DefaultPixelValue, PixelType);
150 
152  itkGetConstMacro(DefaultPixelValue, PixelType);
153 
155  itkSetMacro(OutputSpacing, SpacingType);
156  virtual void SetOutputSpacing(const double *values);
158 
160  itkGetConstReferenceMacro(OutputSpacing, SpacingType);
161 
163  itkSetMacro(OutputOrigin, OriginPointType);
164  virtual void SetOutputOrigin(const double *values);
166 
168  itkGetConstReferenceMacro(OutputOrigin, OriginPointType);
169 
171  itkSetMacro(OutputDirection, DirectionType);
172  itkGetConstReferenceMacro(OutputDirection, DirectionType);
174 
177  itkSetMacro(OutputStartIndex, IndexType);
178 
180  itkGetConstReferenceMacro(OutputStartIndex, IndexType);
181 
187  virtual void GenerateOutputInformation() ITK_OVERRIDE;
188 
194  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
195 
199  virtual void BeforeThreadedGenerateData() ITK_OVERRIDE;
200 
202  virtual void AfterThreadedGenerateData() ITK_OVERRIDE;
203 
205  ModifiedTimeType GetMTime(void) const ITK_OVERRIDE;
206 
207 #ifdef ITK_USE_CONCEPT_CHECKING
208  // Begin concept checking
209  itkConceptMacro( InputHasNumericTraitsCheck,
211  itkConceptMacro( OutputHasNumericTraitsCheck,
213  // End concept checking
214 #endif
215 
216 protected:
218  ~VectorResampleImageFilter() ITK_OVERRIDE {}
219  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
220 
229  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
230  ThreadIdType threadId) ITK_OVERRIDE;
231 
232 private:
233  ITK_DISALLOW_COPY_AND_ASSIGN(VectorResampleImageFilter);
234 
243 };
244 } // end namespace itk
245 
246 #ifndef ITK_MANUAL_INSTANTIATION
247 #include "itkVectorResampleImageFilter.hxx"
248 #endif
249 
250 #endif
Resample an image via a coordinate transform.
TOutputImage::RegionType OutputImageRegionType
InterpolatorType::Pointer InterpolatorPointerType
unsigned long ModifiedTimeType
Definition: itkIntTypes.h:164
TOutputImage::DirectionType DirectionType
Base class for all process objects that output image data.
Size< itkGetStaticConstMacro(ImageDimension) > SizeType
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:82
InputImageType::RegionType InputImageRegionType
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
Transform< TInterpolatorPrecisionType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) > TransformType
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Base class for filters that take an image as input and produce an image as output.
VectorInterpolateImageFunction< InputImageType, TInterpolatorPrecisionType > InterpolatorType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for all vector image interpolaters.
#define itkConceptMacro(name, concept)
TransformType::ConstPointer TransformPointerType
InputImageType::ConstPointer InputImageConstPointer