ITK  5.0.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:
66  ITK_DISALLOW_COPY_AND_ASSIGN(VectorResampleImageFilter);
67 
73 
74  using InputImageType = TInputImage;
75  using OutputImageType = TOutputImage;
76  using InputImagePointer = typename InputImageType::Pointer;
77  using InputImageConstPointer = typename InputImageType::ConstPointer;
78  using OutputImagePointer = typename OutputImageType::Pointer;
80 
82  itkNewMacro(Self);
83 
86 
88  static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
89 
95  using TransformType = Transform< TInterpolatorPrecisionType, Self::ImageDimension,
96  Self::ImageDimension >;
98 
102 
105 
108 
111 
113  using PixelType = typename TOutputImage::PixelType;
114  using PixelComponentType = typename PixelType::ValueType;
115 
118 
120  using SpacingType = typename TOutputImage::SpacingType;
123 
129  itkSetConstObjectMacro(Transform, TransformType);
130  itkGetConstObjectMacro(Transform, TransformType);
132 
135  itkSetObjectMacro(Interpolator, InterpolatorType);
136 
138  itkGetModifiableObjectMacro(Interpolator, InterpolatorType);
139 
141  itkSetMacro(Size, SizeType);
142 
144  itkGetConstReferenceMacro(Size, SizeType);
145 
148  itkSetMacro(DefaultPixelValue, PixelType);
149 
151  itkGetConstMacro(DefaultPixelValue, PixelType);
152 
154  itkSetMacro(OutputSpacing, SpacingType);
155  virtual void SetOutputSpacing(const double *values);
157 
159  itkGetConstReferenceMacro(OutputSpacing, SpacingType);
160 
162  itkSetMacro(OutputOrigin, OriginPointType);
163  virtual void SetOutputOrigin(const double *values);
165 
167  itkGetConstReferenceMacro(OutputOrigin, OriginPointType);
168 
170  itkSetMacro(OutputDirection, DirectionType);
171  itkGetConstReferenceMacro(OutputDirection, DirectionType);
173 
176  itkSetMacro(OutputStartIndex, IndexType);
177 
179  itkGetConstReferenceMacro(OutputStartIndex, IndexType);
180 
186  void GenerateOutputInformation() override;
187 
193  void GenerateInputRequestedRegion() override;
194 
198  void BeforeThreadedGenerateData() override;
199 
201  void AfterThreadedGenerateData() override;
202 
204  ModifiedTimeType GetMTime() const override;
205 
206 #ifdef ITK_USE_CONCEPT_CHECKING
207  // Begin concept checking
208  itkConceptMacro( InputHasNumericTraitsCheck,
210  itkConceptMacro( OutputHasNumericTraitsCheck,
212  // End concept checking
213 #endif
214 
215 protected:
217  ~VectorResampleImageFilter() override = default;
218  void PrintSelf(std::ostream & os, Indent indent) const override;
219 
228  void DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
229 
230 
231 private:
240 };
241 } // end namespace itk
242 
243 #ifndef ITK_MANUAL_INSTANTIATION
244 #include "itkVectorResampleImageFilter.hxx"
245 #endif
246 
247 #endif
typename TOutputImage::SpacingType SpacingType
Resample an image via a coordinate transform.
typename OutputImageType::Pointer OutputImagePointer
typename TOutputImage::PointType OriginPointType
typename TransformType::ConstPointer TransformPointerType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
typename InterpolatorType::PointType PointType
typename TOutputImage::PixelType PixelType
typename InterpolatorType::Pointer InterpolatorPointerType
typename InputImageType::Pointer InputImagePointer
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:83
typename TOutputImage::DirectionType DirectionType
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
unsigned long ModifiedTimeType
Definition: itkIntTypes.h:104
typename PixelType::ValueType PixelComponentType
typename InputImageType::RegionType InputImageRegionType
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
Base class for all vector image interpolaters.
typename TOutputImage::IndexType IndexType
#define itkConceptMacro(name, concept)
typename InputImageType::ConstPointer InputImageConstPointer