ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkFixedPointInverseDisplacementFieldImageFilter.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 itkFixedPointInverseDisplacementFieldImageFilter_h
19 #define itkFixedPointInverseDisplacementFieldImageFilter_h
20 
21 
22 #include "itkImageToImageFilter.h"
23 
26 #include "itkImageRegionIterator.h"
27 #include "itkTimeProbe.h"
28 
29 namespace itk
30 {
31 
57 template < typename TInputImage, typename TOutputImage >
59  public ImageToImageFilter<TInputImage,TOutputImage>
60 {
61 public:
62  ITK_DISALLOW_COPY_AND_ASSIGN(FixedPointInverseDisplacementFieldImageFilter);
63 
69 
71  itkNewMacro(Self);
72 
75 
76 
78  using InputImageType = TInputImage;
79  using InputImageConstPointer = typename InputImageType::ConstPointer;
80  using InputImagePointer = typename InputImageType::Pointer;
83  using InputImageSpacingType = typename InputImageType::SpacingType;
85 
86 
87  using OutputImageType = TOutputImage;
88  using OutputImagePointer = typename OutputImageType::Pointer;
89  using OutputImagePixelType = typename OutputImageType::PixelType;
92  using OutputImageValueType = typename OutputImagePixelType::ValueType;
94  using OutputImageSpacingType = typename OutputImageType::SpacingType;
97 
98 
100  static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
101 
106 
109  using OutputVectorType = typename TOutputImage::PixelType;
113 
114 
115  itkSetMacro(NumberOfIterations, unsigned int);
116  itkGetConstMacro(NumberOfIterations, unsigned int);
117 
118 
120  itkSetMacro( Size, OutputImageSizeType );
121 
123  itkGetConstReferenceMacro( Size, OutputImageSizeType );
124 
126  itkSetMacro(OutputSpacing, OutputImageSpacingType);
127  virtual void SetOutputSpacing(const double* values);
129 
131  itkGetConstReferenceMacro( OutputSpacing, OutputImageSpacingType );
132 
134  itkSetMacro(OutputOrigin, OutputImageOriginPointType);
135  virtual void SetOutputOrigin( const double* values);
137 
138 #ifdef ITK_USE_CONCEPT_CHECKING
139 
140  itkConceptMacro(OutputHasNumericTraitsCheck,
142  itkConceptMacro( SameDimensionCheck,
145 
147 #endif
148 
149 protected:
152 
153  void PrintSelf(std::ostream& os, Indent indent) const override;
154 
155  void GenerateData( ) override;
156  void GenerateOutputInformation() override;
157 
158  void GenerateInputRequestedRegion() override;
159 
160  unsigned int m_NumberOfIterations;
161 
162 
163 private:
164  OutputImageSizeType m_Size; // Size of the output image
165  OutputImageSpacingType m_OutputSpacing; // output image spacing
167 
168 };
169 
170 } // end namespace itk
171 
172 #ifndef ITK_MANUAL_INSTANTIATION
173 #include "itkFixedPointInverseDisplacementFieldImageFilter.hxx"
174 #endif
175 #endif
typename OutputImageType::Pointer OutputImagePointer
Computes the time passed between two points in code.
Definition: itkTimeProbe.h:44
Define numeric traits for std::vector.
typename NumericTraits< typename TOutputImage::PixelType >::RealType InterpolatorVectorType
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 OutputImageType::PixelType OutputImagePixelType
Warps an image using an input displacement field.
typename InputImageType::Pointer InputImagePointer
A multi-dimensional iterator templated over image type that walks a region of pixels.
TOutputImage OutputImageType
Represent a n-dimensional size (bounds) of a n-dimensional image.
Definition: itkSize.h:68
typename InputImageType::RegionType InputImageRegionType
Computes the inverse of a Displacement field using a fixed point iteration scheme.
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
#define itkConceptMacro(name, concept)
typename InputImageType::ConstPointer InputImageConstPointer
A multi-dimensional iterator templated over image type that walks a region of pixels.
Linearly interpolate a vector image at specified positions.