go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkImageToImageMetricWithFeatures.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright UMC Utrecht and contributors
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 __itkImageToImageMetricWithFeatures_h
19 #define __itkImageToImageMetricWithFeatures_h
20 
22 #include "itkInterpolateImageFunction.h"
23 
24 namespace itk
25 {
26 
37 template< class TFixedImage, class TMovingImage,
38 class TFixedFeatureImage = TFixedImage, class TMovingFeatureImage = TMovingImage >
40  public AdvancedImageToImageMetric< TFixedImage, TMovingImage >
41 {
42 public:
43 
48  typedef SmartPointer< const Self > ConstPointer;
49 
52 
69  typedef typename Superclass::RealType RealType;
88  typedef typename Superclass::InternalMaskPixelType InternalMaskPixelType;
89  typedef typename Superclass::InternalMovingImageMaskType InternalMovingImageMaskType;
90  typedef typename Superclass::MovingImageMaskInterpolatorType MovingImageMaskInterpolatorType;
95 
97  itkStaticConstMacro( FixedImageDimension, unsigned int,
98  FixedImageType::ImageDimension );
99 
101  itkStaticConstMacro( MovingImageDimension, unsigned int,
102  MovingImageType::ImageDimension );
103 
105  typedef TFixedFeatureImage FixedFeatureImageType;
106  typedef typename FixedFeatureImageType::Pointer FixedFeatureImagePointer;
107  typedef TMovingFeatureImage MovingFeatureImageType;
108  typedef typename MovingFeatureImageType::Pointer MovingFeatureImagePointer;
109  typedef std::vector< FixedFeatureImagePointer > FixedFeatureImageVectorType;
110  typedef std::vector< MovingFeatureImagePointer > MovingFeatureImageVectorType;
111 
113  typedef InterpolateImageFunction< FixedFeatureImageType, double > FixedFeatureInterpolatorType;
114  typedef InterpolateImageFunction< MovingFeatureImageType, double > MovingFeatureInterpolatorType;
115  typedef typename FixedFeatureInterpolatorType::Pointer FixedFeatureInterpolatorPointer;
116  typedef typename MovingFeatureInterpolatorType::Pointer MovingFeatureInterpolatorPointer;
117  typedef std::vector< FixedFeatureInterpolatorPointer > FixedFeatureInterpolatorVectorType;
118  typedef std::vector< MovingFeatureInterpolatorPointer > MovingFeatureInterpolatorVectorType;
119 
121  void SetNumberOfFixedFeatureImages( unsigned int arg );
122 
124  itkGetConstMacro( NumberOfFixedFeatureImages, unsigned int );
125 
127  void SetFixedFeatureImage( unsigned int i, FixedFeatureImageType * im );
128 
129  void SetFixedFeatureImage( FixedFeatureImageType * im )
130  {
131  this->SetFixedFeatureImage( 0, im );
132  }
133 
134 
136  const FixedFeatureImageType * GetFixedFeatureImage( unsigned int i ) const;
137 
138  const FixedFeatureImageType * GetFixedFeatureImage( void ) const
139  {
140  return this->GetFixedFeatureImage( 0 );
141  }
142 
143 
145  void SetFixedFeatureInterpolator( unsigned int i, FixedFeatureInterpolatorType * interpolator );
146 
147  void SetFixedFeatureInterpolator( FixedFeatureInterpolatorType * interpolator )
148  {
149  this->SetFixedFeatureInterpolator( 0, interpolator );
150  }
151 
152 
154  const FixedFeatureInterpolatorType * GetFixedFeatureInterpolator( unsigned int i ) const;
155 
156  const FixedFeatureInterpolatorType * GetFixedFeatureInterpolator( void ) const
157  {
158  return this->GetFixedFeatureInterpolator( 0 );
159  }
160 
161 
163  void SetNumberOfMovingFeatureImages( unsigned int arg );
164 
166  itkGetConstMacro( NumberOfMovingFeatureImages, unsigned int );
167 
169  void SetMovingFeatureImage( unsigned int i, MovingFeatureImageType * im );
170 
171  void SetMovingFeatureImage( MovingFeatureImageType * im )
172  {
173  this->SetMovingFeatureImage( 0, im );
174  }
175 
176 
178  const MovingFeatureImageType * GetMovingFeatureImage( unsigned int i ) const;
179 
180  const MovingFeatureImageType * GetMovingFeatureImage( void ) const
181  {
182  return this->GetMovingFeatureImage( 0 );
183  }
184 
185 
187  void SetMovingFeatureInterpolator( unsigned int i, MovingFeatureInterpolatorType * interpolator );
188 
189  void SetMovingFeatureInterpolator( MovingFeatureInterpolatorType * interpolator )
190  {
191  this->SetMovingFeatureInterpolator( 0, interpolator );
192  }
193 
194 
196  const MovingFeatureInterpolatorType * GetMovingFeatureInterpolator( unsigned int i ) const;
197 
198  const MovingFeatureInterpolatorType * GetMovingFeatureInterpolator( void ) const
199  {
200  return this->GetMovingFeatureInterpolator( 0 );
201  }
202 
203 
205  virtual void Initialize( void ) throw ( ExceptionObject );
206 
207 protected:
208 
210  virtual ~ImageToImageMetricWithFeatures() {}
211  void PrintSelf( std::ostream & os, Indent indent ) const;
212 
214  typedef typename BSplineInterpolatorType::Pointer BSplineInterpolatorPointer;
215  typedef std::vector< BSplineInterpolatorPointer > BSplineFeatureInterpolatorVectorType;
220 
224  FixedFeatureImageVectorType m_FixedFeatureImages;
225  MovingFeatureImageVectorType m_MovingFeatureImages;
226  FixedFeatureInterpolatorVectorType m_FixedFeatureInterpolators;
227  MovingFeatureInterpolatorVectorType m_MovingFeatureInterpolators;
228 
229  std::vector< bool > m_FeatureInterpolatorsIsBSpline;
231  BSplineFeatureInterpolatorVectorType m_MovingFeatureBSplineInterpolators;
232 
236  virtual void CheckForBSplineFeatureInterpolators( void );
237 
238 private:
239 
240  ImageToImageMetricWithFeatures( const Self & ); // purposely not implemented
241  void operator=( const Self & ); // purposely not implemented
242 
243 };
244 
245 } // end namespace itk
246 
247 #ifndef ITK_MANUAL_INSTANTIATION
248 #include "itkImageToImageMetricWithFeatures.hxx"
249 #endif
250 
251 #endif // end #ifndef __itkImageToImageMetricWithFeatures_h
Computes similarity between regions of two images.
Superclass::ImageSampleContainerType ImageSampleContainerType
Superclass::MovingImageLimiterType MovingImageLimiterType
Superclass::FixedImageLimiterOutputType FixedImageLimiterOutputType
void SetNumberOfMovingFeatureImages(unsigned int arg)
LimiterFunctionBase< RealType, FixedImageDimension > FixedImageLimiterType
Superclass::CoordinateRepresentationType CoordinateRepresentationType
Superclass::TransformParametersType TransformParametersType
Superclass::InternalMaskPixelType InternalMaskPixelType
std::vector< BSplineInterpolatorPointer > BSplineFeatureInterpolatorVectorType
Superclass::MovingImageMaskInterpolatorType MovingImageMaskInterpolatorType
Superclass::FixedImagePixelType FixedImagePixelType
void SetFixedFeatureInterpolator(FixedFeatureInterpolatorType *interpolator)
Superclass::FixedImageMaskPointer FixedImageMaskPointer
An extension of the ITK ImageToImageMetric. It is the intended base class for all elastix metrics...
Superclass::MovingImagePointType MovingImagePointType
Superclass::ImageSampleContainerPointer ImageSampleContainerPointer
Superclass::MovingImageMaskPointer MovingImageMaskPointer
InterpolateImageFunction< FixedFeatureImageType, double > FixedFeatureInterpolatorType
Superclass::GradientPixelType GradientPixelType
Superclass::TransformParametersType TransformParametersType
FixedImageLimiterType::OutputType FixedImageLimiterOutputType
MovingFeatureImageType::Pointer MovingFeatureImagePointer
Superclass::ImageSamplerPointer ImageSamplerPointer
Superclass::FixedImageRegionType FixedImageRegionType
Superclass::MovingImageMaskType MovingImageMaskType
void SetNumberOfFixedFeatureImages(unsigned int arg)
Superclass::MovingImagePixelType MovingImagePixelType
ImageSamplerType::OutputVectorContainerType ImageSampleContainerType
Superclass::MovingImageDerivativeType MovingImageDerivativeType
Superclass::MovingImageContinuousIndexType MovingImageContinuousIndexType
InterpolatorType::ContinuousIndexType MovingImageContinuousIndexType
Superclass::GradientImagePointer GradientImagePointer
TransformType::InputPointType FixedImagePointType
InterpolateImageFunction< MovingFeatureImageType, double > MovingFeatureInterpolatorType
void SetFixedFeatureImage(FixedFeatureImageType *im)
void SetFixedFeatureImage(unsigned int i, FixedFeatureImageType *im)
Superclass::InternalMovingImageMaskType InternalMovingImageMaskType
void SetMovingFeatureImage(MovingFeatureImageType *im)
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > BSplineInterpolatorType
ImageSamplerBase< FixedImageType > ImageSamplerType
std::vector< MovingFeatureInterpolatorPointer > MovingFeatureInterpolatorVectorType
Superclass::InterpolatorPointer InterpolatorPointer
std::vector< FixedFeatureImagePointer > FixedFeatureImageVectorType
Superclass::MovingImageRegionType MovingImageRegionType
const MovingFeatureImageType * GetMovingFeatureImage(void) const
std::vector< FixedFeatureInterpolatorPointer > FixedFeatureInterpolatorVectorType
TransformType::OutputPointType MovingImagePointType
Superclass::MovingImageMaskType MovingImageMaskType
LimiterFunctionBase< RealType, MovingImageDimension > MovingImageLimiterType
Superclass::GradientImageType GradientImageType
const MovingFeatureInterpolatorType * GetMovingFeatureInterpolator(void) const
Superclass::TransformPointer TransformPointer
AdvancedImageToImageMetric< TFixedImage, TMovingImage > Superclass
const FixedFeatureImageType * GetFixedFeatureImage(void) const
MovingFeatureInterpolatorType::Pointer MovingFeatureInterpolatorPointer
FixedFeatureInterpolatorVectorType m_FixedFeatureInterpolators
Superclass::GradientImageFilterType GradientImageFilterType
Superclass::FixedImageRegionType FixedImageRegionType
Superclass::GradientImageFilterType GradientImageFilterType
Superclass::TransformJacobianType TransformJacobianType
MovingImageType::RegionType MovingImageRegionType
Superclass::InterpolatorType InterpolatorType
void SetFixedFeatureInterpolator(unsigned int i, FixedFeatureInterpolatorType *interpolator)
Superclass::TransformJacobianType TransformJacobianType
Superclass::FixedImageMaskPointer FixedImageMaskPointer
BSplineFeatureInterpolatorVectorType m_MovingFeatureBSplineInterpolators
Superclass::InterpolatorPointer InterpolatorPointer
Superclass::MovingImagePixelType MovingImagePixelType
void SetMovingFeatureInterpolator(unsigned int i, MovingFeatureInterpolatorType *interpolator)
Superclass::FixedImageLimiterType FixedImageLimiterType
virtual void CheckForBSplineFeatureInterpolators(void)
Superclass::MovingImageMaskPointer MovingImageMaskPointer
FixedFeatureImageType::Pointer FixedFeatureImagePointer
Superclass::FixedImageConstPointer FixedImageConstPointer
MovingImageLimiterType::OutputType MovingImageLimiterOutputType
MovingFeatureInterpolatorVectorType m_MovingFeatureInterpolators
Superclass::MovingImageLimiterOutputType MovingImageLimiterOutputType
const FixedFeatureInterpolatorType * GetFixedFeatureInterpolator(void) const
FixedFeatureInterpolatorType::Pointer FixedFeatureInterpolatorPointer
void PrintSelf(std::ostream &os, Indent indent) const
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
ImageSamplerType::OutputVectorContainerPointer ImageSampleContainerPointer
Superclass::CoordinateRepresentationType CoordinateRepresentationType
Superclass::FixedImageMaskType FixedImageMaskType
Superclass::MovingImageConstPointer MovingImageConstPointer
BSplineInterpolatorType::Pointer BSplineInterpolatorPointer
void SetMovingFeatureInterpolator(MovingFeatureInterpolatorType *interpolator)
std::vector< MovingFeatureImagePointer > MovingFeatureImageVectorType
BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
Superclass::FixedImageConstPointer FixedImageConstPointer
Superclass::MovingImageConstPointer MovingImageConstPointer
Superclass::BSplineInterpolatorType BSplineInterpolatorType
void SetMovingFeatureImage(unsigned int i, MovingFeatureImageType *im)
Superclass::GradientImageFilterPointer GradientImageFilterPointer
Superclass::GradientImageFilterPointer GradientImageFilterPointer
Superclass::GradientImagePointer GradientImagePointer


Generated on 04-09-2015 for elastix by doxygen 1.8.9.1 elastix logo