ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkInverseDisplacementFieldImageFilter.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 __itkInverseDisplacementFieldImageFilter_h
19 #define __itkInverseDisplacementFieldImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkKernelTransform.h"
24 
25 namespace itk
26 {
64 template< typename TInputImage, typename TOutputImage >
66  public ImageToImageFilter< TInputImage, TOutputImage >
67 {
68 public:
74 
75  typedef TInputImage InputImageType;
76  typedef typename InputImageType::Pointer InputImagePointer;
77  typedef typename InputImageType::ConstPointer InputImageConstPointer;
78  typedef typename InputImageType::RegionType InputImageRegionType;
79  typedef TOutputImage OutputImageType;
80  typedef typename OutputImageType::Pointer OutputImagePointer;
81 
83  itkNewMacro(Self);
84 
87 
89  itkStaticConstMacro(ImageDimension, unsigned int,
90  TOutputImage::ImageDimension);
91 
96  typedef KernelTransform<
97  double, itkGetStaticConstMacro(ImageDimension) > KernelTransformType;
99 
101  typedef typename OutputImageType::SizeType SizeType;
102 
104  typedef typename OutputImageType::IndexType IndexType;
105 
107  typedef typename TOutputImage::PixelType OutputPixelType;
108  typedef typename OutputPixelType::ValueType OutputPixelComponentType;
109 
111  typedef typename TOutputImage::RegionType OutputImageRegionType;
112 
114  typedef typename TOutputImage::SpacingType SpacingType;
115  typedef typename TOutputImage::PointType OriginPointType;
116 
120  itkSetObjectMacro(KernelTransform, KernelTransformType);
121  itkGetModifiableObjectMacro(KernelTransform, KernelTransformType);
123 
125  itkSetMacro(Size, SizeType);
126 
128  itkGetConstReferenceMacro(Size, SizeType);
129 
131  itkSetMacro(OutputSpacing, SpacingType);
132  virtual void SetOutputSpacing(const double *values);
134 
136  itkGetConstReferenceMacro(OutputSpacing, SpacingType);
137 
139  itkSetMacro(OutputOrigin, OriginPointType);
140  virtual void SetOutputOrigin(const double *values);
142 
144  itkGetConstReferenceMacro(OutputOrigin, OriginPointType);
145 
151  itkSetMacro(SubsamplingFactor, unsigned int);
152  itkGetConstMacro(SubsamplingFactor, unsigned int);
154 
160  virtual void GenerateOutputInformation();
161 
167  virtual void GenerateInputRequestedRegion();
168 
170  ModifiedTimeType GetMTime(void) const;
171 
172 #ifdef ITK_USE_CONCEPT_CHECKING
173  // Begin concept checking
174  itkConceptMacro( OutputHasNumericTraitsCheck,
176  // End concept checking
177 #endif
178 
179 protected:
182  void PrintSelf(std::ostream & os, Indent indent) const;
183 
188  void GenerateData();
189 
194 
195 private:
196  InverseDisplacementFieldImageFilter(const Self &); //purposely not implemented
197  void operator=(const Self &); //purposely not implemented
198 
199  SizeType m_Size; // Size of the output image
200  KernelTransformPointerType m_KernelTransform; // Coordinate transform to
201  // use
202  SpacingType m_OutputSpacing; // output image spacing
203  OriginPointType m_OutputOrigin; // output image origin
204 
205  unsigned int m_SubsamplingFactor; // factor to subsample the
206  // input field.
207 };
208 } // end namespace itk
209 
210 #ifndef ITK_MANUAL_INSTANTIATION
211 #include "itkInverseDisplacementFieldImageFilter.hxx"
212 #endif
213 
214 #endif
Represent the size (bounds) of a n-dimensional image.
Definition: itkSize.h:52
KernelTransform< double, itkGetStaticConstMacro(ImageDimension) > KernelTransformType
unsigned long ModifiedTimeType
Definition: itkIntTypes.h:164
Base class for all process objects that output image data.
ModifiedTimeType GetMTime(void) const
virtual void SetOutputSpacing(SpacingType _arg)
virtual void SetOutputOrigin(OriginPointType _arg)
void PrintSelf(std::ostream &os, Indent indent) const
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)
Computes the inverse of a displacement field.
ImageToImageFilter< TInputImage, TOutputImage > Superclass