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  This file is part of the elastix software.
4 
5  Copyright (c) University Medical Center Utrecht. All rights reserved.
6  See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
7  details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notices for more information.
12 
13 ======================================================================*/
14 
15 #ifndef __itkImageToImageMetricWithFeatures_h
16 #define __itkImageToImageMetricWithFeatures_h
17 
19 #include "itkInterpolateImageFunction.h"
20 
21 
22 namespace itk
23 {
24 
35 template <class TFixedImage, class TMovingImage,
36  class TFixedFeatureImage = TFixedImage, class TMovingFeatureImage = TMovingImage>
38  public AdvancedImageToImageMetric< TFixedImage, TMovingImage >
39 {
40 public:
44  TFixedImage, TMovingImage > Superclass;
45  typedef SmartPointer<Self> Pointer;
46  typedef SmartPointer<const Self> ConstPointer;
47 
50 
52  typedef typename
68  typedef typename Superclass::RealType RealType;
86  typedef typename
88  typedef typename Superclass::InternalMaskPixelType InternalMaskPixelType;
89  typedef typename
90  Superclass::InternalMovingImageMaskType InternalMovingImageMaskType;
91  typedef typename
92  Superclass::MovingImageMaskInterpolatorType MovingImageMaskInterpolatorType;
95  typedef typename
97  typedef typename
99 
101  itkStaticConstMacro( FixedImageDimension, unsigned int,
102  FixedImageType::ImageDimension );
103 
105  itkStaticConstMacro( MovingImageDimension, unsigned int,
106  MovingImageType::ImageDimension );
107 
109  typedef TFixedFeatureImage FixedFeatureImageType;
110  typedef typename FixedFeatureImageType::Pointer FixedFeatureImagePointer;
111  typedef TMovingFeatureImage MovingFeatureImageType;
112  typedef typename MovingFeatureImageType::Pointer MovingFeatureImagePointer;
113  typedef std::vector<FixedFeatureImagePointer> FixedFeatureImageVectorType;
114  typedef std::vector<MovingFeatureImagePointer> MovingFeatureImageVectorType;
115 
117  typedef InterpolateImageFunction<
119  typedef InterpolateImageFunction<
121  typedef typename FixedFeatureInterpolatorType::Pointer FixedFeatureInterpolatorPointer;
122  typedef typename MovingFeatureInterpolatorType::Pointer MovingFeatureInterpolatorPointer;
123  typedef std::vector<FixedFeatureInterpolatorPointer> FixedFeatureInterpolatorVectorType;
124  typedef std::vector<MovingFeatureInterpolatorPointer> MovingFeatureInterpolatorVectorType;
125 
127  void SetNumberOfFixedFeatureImages( unsigned int arg );
128 
130  itkGetConstMacro( NumberOfFixedFeatureImages, unsigned int );
131 
133  void SetFixedFeatureImage( unsigned int i, FixedFeatureImageType * im );
135  {
136  this->SetFixedFeatureImage( 0, im );
137  };
138 
140  const FixedFeatureImageType * GetFixedFeatureImage( unsigned int i ) const;
142  {
143  return this->GetFixedFeatureImage( 0 );
144  };
145 
147  void SetFixedFeatureInterpolator( unsigned int i, FixedFeatureInterpolatorType * interpolator );
149  {
150  this->SetFixedFeatureInterpolator( 0, interpolator );
151  };
152 
154  const FixedFeatureInterpolatorType * GetFixedFeatureInterpolator( unsigned int i ) const;
156  {
157  return this->GetFixedFeatureInterpolator( 0 );
158  };
159 
161  void SetNumberOfMovingFeatureImages( unsigned int arg );
162 
164  itkGetConstMacro( NumberOfMovingFeatureImages, unsigned int );
165 
167  void SetMovingFeatureImage( unsigned int i, MovingFeatureImageType * im );
169  {
170  this->SetMovingFeatureImage( 0, im );
171  };
172 
174  const MovingFeatureImageType * GetMovingFeatureImage( unsigned int i ) const;
176  {
177  return this->GetMovingFeatureImage( 0 );
178  };
179 
181  void SetMovingFeatureInterpolator( unsigned int i, MovingFeatureInterpolatorType * interpolator );
183  {
184  this->SetMovingFeatureInterpolator( 0, interpolator );
185  };
186 
188  const MovingFeatureInterpolatorType * GetMovingFeatureInterpolator( unsigned int i ) const;
190  {
191  return this->GetMovingFeatureInterpolator( 0 );
192  };
193 
195  virtual void Initialize( void ) throw ( ExceptionObject );
196 
197 protected:
199  virtual ~ImageToImageMetricWithFeatures() {};
200  void PrintSelf( std::ostream& os, Indent indent ) const;
201 
203  typedef typename BSplineInterpolatorType::Pointer BSplineInterpolatorPointer;
204  typedef std::vector<BSplineInterpolatorPointer> BSplineFeatureInterpolatorVectorType;
209 
217 
221 
225  virtual void CheckForBSplineFeatureInterpolators( void );
226 
227 private:
228  ImageToImageMetricWithFeatures(const Self&); //purposely not implemented
229  void operator=(const Self&); //purposely not implemented
230 
231 }; // end class ImageToImageMetricWithFeatures
232 
233 } // end namespace itk
234 
235 #ifndef ITK_MANUAL_INSTANTIATION
236 #include "itkImageToImageMetricWithFeatures.txx"
237 #endif
238 
239 #endif // end #ifndef __itkImageToImageMetricWithFeatures_h
240 
241 
242 


Generated on 21-03-2014 for elastix by doxygen 1.8.1.2 elastix logo