ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkImageToSpatialObjectMetric.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 __itkImageToSpatialObjectMetric_h
19 #define __itkImageToSpatialObjectMetric_h
20 
24 #include "vnl/vnl_vector_fixed.h"
25 #include "itkTransform.h"
26 
27 namespace itk
28 {
60 template< typename TFixedImage, typename TMovingSpatialObject >
63 {
64 public:
69 
71  typedef TFixedImage FixedImageType;
72 
74  typedef TMovingSpatialObject MovingSpatialObjectType;
75 
78 
80  itkStaticConstMacro(ImageDimension, unsigned int,
81  FixedImageType::ImageDimension);
82 
84  itkStaticConstMacro(ObjectDimension, unsigned int,
85  MovingSpatialObjectType::ObjectDimension);
86 
89  itkGetStaticConstMacro(ObjectDimension),
90  itkGetStaticConstMacro(ImageDimension) > TransformType;
91 
97 
100  TFixedImage,
102 
104 
106  typedef vnl_vector_fixed< double,
107  itkGetStaticConstMacro(ObjectDimension) > VectorType;
108 
111 
114 
116  typedef typename FixedImageType::Pointer FixedImagePointer;
117 
119  typedef typename MovingSpatialObjectType::Pointer
121 
123  typedef typename FixedImageType::ConstPointer FixedImageConstPointer;
124 
126  typedef typename MovingSpatialObjectType::ConstPointer MovingSpatialObjectConstPointer;
127 
131 
133  itkTypeMacro(ImageToSpatialObjectMetric, Object);
134 
136  itkSetConstObjectMacro(FixedImage, FixedImageType);
137  itkGetConstObjectMacro(FixedImage, FixedImageType);
139 
141  itkSetConstObjectMacro(MovingSpatialObject, MovingSpatialObjectType);
142  itkGetConstObjectMacro(MovingSpatialObject, MovingSpatialObjectType);
144 
146  itkSetObjectMacro(Interpolator, InterpolatorType);
147 
149  itkGetModifiableObjectMacro(Interpolator, InterpolatorType);
150 
152  virtual void GetValueAndDerivative(const ParametersType & parameters,
153  MeasureType & Value,
154  DerivativeType & Derivative) const = 0;
155 
157  virtual void Initialize(void)
158  throw ( ExceptionObject );
159 
162  itkGetConstReferenceMacro(LastTransformParameters, ParametersType);
163 
165  itkSetObjectMacro(Transform, TransformType);
166 
167 protected:
168 
170  virtual ~ImageToSpatialObjectMetric() {}
172  void operator=(const Self &) {}
173  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
174 
179 
183 };
184 } // end namespace itk
185 
186 #ifndef ITK_MANUAL_INSTANTIATION
187 #include "itkImageToSpatialObjectMetric.hxx"
188 #endif
189 
190 #endif
Array class with size defined at construction time.
Definition: itkArray.h:50
TransformType::OutputPointType OutputPointType
Computes similarity between a moving spatial obejct and an Image to be registered.
Superclass::ParametersValueType CoordinateRepresentationType
This class is a base for the CostFunctions returning a single value.
TransformType::InputPointType InputPointType
Light weight base class for most itk classes.
TransformType::ParametersType TransformParametersType
virtual void GetValueAndDerivative(const ParametersType &parameters, MeasureType &Value, DerivativeType &Derivative) const =0
vnl_vector_fixed< double, itkGetStaticConstMacro(ObjectDimension) > VectorType
virtual void Initialize(void)
TransformType::JacobianType TransformJacobianType
Transform< CoordinateRepresentationType, itkGetStaticConstMacro(ObjectDimension), itkGetStaticConstMacro(ImageDimension) > TransformType
LinearInterpolateImageFunction< TFixedImage, CoordinateRepresentationType > InterpolatorType
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:82
Array< ParametersValueType > DerivativeType
Array2D class representing a 2D array with size defined at construction time.
Definition: itkArray2D.h:44
Class to hold and manage different parameter types used during optimization.
Standard exception handling object.
FixedImageType::ConstPointer FixedImageConstPointer
Linearly interpolate an image at specified positions.
Superclass::ParametersType ParametersType
Superclass::ParametersValueType ParametersValueType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for most ITK classes.
Definition: itkObject.h:57
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:51
MovingSpatialObjectType::Pointer MovingSpatialObjectPointer
MovingSpatialObjectConstPointer m_MovingSpatialObject
MovingSpatialObjectType::ConstPointer MovingSpatialObjectConstPointer