ITK  4.13.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 
53 template < class TInputImage, class TOutputImage >
55  public ImageToImageFilter<TInputImage,TOutputImage>
56 {
57 public:
63 
65  itkNewMacro(Self);
66 
69 
70 
72  typedef TInputImage InputImageType;
73  typedef typename InputImageType::ConstPointer InputImageConstPointer;
74  typedef typename InputImageType::Pointer InputImagePointer;
76  typedef typename InputImageType::RegionType InputImageRegionType;
77  typedef typename InputImageType::SpacingType InputImageSpacingType;
79 
80 
81  typedef TOutputImage OutputImageType;
82  typedef typename OutputImageType::Pointer OutputImagePointer;
83  typedef typename OutputImageType::PixelType OutputImagePixelType;
86  typedef typename OutputImagePixelType::ValueType OutputImageValueType;
88  typedef typename OutputImageType::SpacingType OutputImageSpacingType;
91 
92 
94  itkStaticConstMacro(ImageDimension, unsigned int,
95  TOutputImage::ImageDimension);
96 
101 
104  typedef typename TOutputImage::PixelType OutputVectorType;
108 
109 
110  itkSetMacro(NumberOfIterations, unsigned int);
111  itkGetConstMacro(NumberOfIterations, unsigned int);
112 
113 
115  itkSetMacro( Size, OutputImageSizeType );
116 
118  itkGetConstReferenceMacro( Size, OutputImageSizeType );
119 
121  itkSetMacro(OutputSpacing, OutputImageSpacingType);
122  virtual void SetOutputSpacing(const double* values);
124 
126  itkGetConstReferenceMacro( OutputSpacing, OutputImageSpacingType );
127 
129  itkSetMacro(OutputOrigin, OutputImageOriginPointType);
130  virtual void SetOutputOrigin( const double* values);
132 
133 #ifdef ITK_USE_CONCEPT_CHECKING
134 
135  itkConceptMacro(OutputHasNumericTraitsCheck,
137  itkConceptMacro( SameDimensionCheck,
140 
142 #endif
143 
144 protected:
147 
148  void PrintSelf(std::ostream& os, Indent indent) const;
149 
150  void GenerateData( );
151  void GenerateOutputInformation();
152 
153  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
154 
155  unsigned int m_NumberOfIterations;
156 
157 
158 private:
159  FixedPointInverseDisplacementFieldImageFilter(const Self&); //purposely not implemented
160  void operator=(const Self&); //purposely not implemented
161 
162  OutputImageSizeType m_Size; // Size of the output image
163  OutputImageSpacingType m_OutputSpacing; // output image spacing
164  OutputImageOriginPointType m_OutputOrigin; // output image origin
165 
166 
167 };
168 
169 } // end namespace itk
170 
171 #ifndef ITK_MANUAL_INSTANTIATION
172 #include "itkFixedPointInverseDisplacementFieldImageFilter.hxx"
173 #endif
174 #endif
Computes the time passed between two points in code.
Definition: itkTimeProbe.h:44
Represent the size (bounds) of a n-dimensional image.
Definition: itkSize.h:52
Base class for all process objects that output image data.
VectorLinearInterpolateImageFunction< TInputImage, double > FieldInterpolatorType
Warps an image using an input displacement field.
A multi-dimensional iterator templated over image type that walks a region of pixels.
NumericTraits< typename TOutputImage::PixelType >::RealType InterpolatorVectorType
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)
A multi-dimensional iterator templated over image type that walks a region of pixels.
Linearly interpolate a vector image at specified positions.
WarpVectorImageFilter< TOutputImage, TInputImage, TOutputImage > VectorWarperType