ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkPointSetToImageRegistrationMethod.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 __itkPointSetToImageRegistrationMethod_h
19 #define __itkPointSetToImageRegistrationMethod_h
20 
21 #include "itkProcessObject.h"
22 #include "itkImage.h"
25 #include "itkDataObjectDecorator.h"
26 
27 namespace itk
28 {
63 template< typename TFixedPointSet, typename TMovingImage >
65 {
66 public:
72 
74  itkNewMacro(Self);
75 
78 
80  typedef TFixedPointSet FixedPointSetType;
81  typedef typename FixedPointSetType::ConstPointer FixedPointSetConstPointer;
82 
84  typedef TMovingImage MovingImageType;
85  typedef typename MovingImageType::ConstPointer MovingImageConstPointer;
86 
90 
94 
100 
104 
107 
111 
114 
116  itkSetConstObjectMacro(FixedPointSet, FixedPointSetType);
117  itkGetConstObjectMacro(FixedPointSet, FixedPointSetType);
119 
121  itkSetConstObjectMacro(MovingImage, MovingImageType);
122  itkGetConstObjectMacro(MovingImage, MovingImageType);
124 
126  itkSetObjectMacro(Optimizer, OptimizerType);
127  itkGetModifiableObjectMacro(Optimizer, OptimizerType);
129 
131  itkSetObjectMacro(Metric, MetricType);
132  itkGetModifiableObjectMacro(Metric, MetricType);
134 
136  itkSetObjectMacro(Transform, TransformType);
137  itkGetModifiableObjectMacro(Transform, TransformType);
139 
141  itkSetObjectMacro(Interpolator, InterpolatorType);
142  itkGetModifiableObjectMacro(Interpolator, InterpolatorType);
144 
146  virtual void SetInitialTransformParameters(const ParametersType & param);
147 
148  itkGetConstReferenceMacro(InitialTransformParameters, ParametersType);
149 
152  itkGetConstReferenceMacro(LastTransformParameters, ParametersType);
153 
155  void Initialize()
156  throw ( ExceptionObject );
157 
159  const TransformOutputType * GetOutput() const;
160 
164  using Superclass::MakeOutput;
165  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE;
166 
169  virtual ModifiedTimeType GetMTime() const ITK_OVERRIDE;
170 
171 #ifdef ITKV3_COMPATIBILITY
172 
173  // StartRegistration is an old API from before
174  // ImageRegistrationMethod was a subclass of ProcessObject.
175  // Historically, one could call StartRegistration() instead of
176  // calling Update(). However, when called directly by the user, the
177  // inputs to ImageRegistrationMethod may not be up to date. This
178  // may cause an unexpected behavior.
179  //
180  // Since we cannot eliminate StartRegistration for backward
181  // compatibility reasons, we check whether StartRegistration was
182  // called directly or whether Update() (which in turn called
183  // StartRegistration()).
184  void StartRegistration(void) { this->Update(); }
185 #endif
186 
187 protected:
190  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
191 
194  virtual void GenerateData() ITK_OVERRIDE;
195 
196 private:
197  PointSetToImageRegistrationMethod(const Self &); //purposely not implemented
198  void operator=(const Self &); //purposely not implemented
199 
202 
205 
208 
211 };
212 } // end namespace itk
213 
214 #ifndef ITK_MANUAL_INSTANTIATION
215 #include "itkPointSetToImageRegistrationMethod.hxx"
216 #endif
217 
218 #endif
virtual void Update()
virtual ModifiedTimeType GetMTime() const ITK_OVERRIDE
Light weight base class for most itk classes.
virtual void SetInitialTransformParameters(const ParametersType &param)
TransformOutputType::ConstPointer TransformOutputConstPointer
unsigned long ModifiedTimeType
Definition: itkIntTypes.h:164
This class is a base for the Optimization methods that optimize a single valued function.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
TransformType::ParametersType TransformParametersType
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
DataObjectDecorator< TransformType > TransformOutputType
Computes similarity between a point set and an image.
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:82
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
PointSetToImageMetric< FixedPointSetType, MovingImageType > MetricType
Decorates any subclass of itkObject with a DataObject API.
Standard exception handling object.
Generic representation for an optimization method.
Definition: itkOptimizer.h:37
const TransformOutputType * GetOutput() const
Base class for all image interpolaters.
virtual void GenerateData() ITK_OVERRIDE
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for PointSet to Image Registration Methods.