ITK  4.5.0
Insight Segmentation and Registration Toolkit
itkImageToSpatialObjectRegistrationMethod.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 __itkImageToSpatialObjectRegistrationMethod_h
19 #define __itkImageToSpatialObjectRegistrationMethod_h
20 
21 #include "itkProcessObject.h"
22 #include "itkImage.h"
25 #include "itkDataObjectDecorator.h"
26 
27 namespace itk
28 {
84 template< typename TFixedImage, typename TMovingSpatialObject >
86 {
87 public:
93 
95  itkNewMacro(Self);
96 
99 
101  typedef TFixedImage FixedImageType;
102  typedef typename FixedImageType::ConstPointer FixedImageConstPointer;
103 
105  typedef TMovingSpatialObject MovingSpatialObjectType;
106  typedef typename MovingSpatialObjectType::ConstPointer
108 
113 
117 
123 
127 
130 
134 
137 
139  itkSetConstObjectMacro(FixedImage, FixedImageType);
140  itkGetConstObjectMacro(FixedImage, FixedImageType);
142 
144  itkSetConstObjectMacro(MovingSpatialObject, MovingSpatialObjectType);
145  itkGetConstObjectMacro(MovingSpatialObject, MovingSpatialObjectType);
147 
149  itkSetObjectMacro(Optimizer, OptimizerType);
150  itkGetModifiableObjectMacro(Optimizer, OptimizerType);
152 
154  itkSetObjectMacro(Metric, MetricType);
155  itkGetModifiableObjectMacro(Metric, MetricType);
157 
159  itkSetObjectMacro(Transform, TransformType);
160  itkGetModifiableObjectMacro(Transform, TransformType);
162 
164  itkSetObjectMacro(Interpolator, InterpolatorType);
165  itkGetModifiableObjectMacro(Interpolator, InterpolatorType);
167 
169  itkSetMacro(InitialTransformParameters, ParametersType);
170  itkGetConstReferenceMacro(InitialTransformParameters, ParametersType);
172 
175  itkGetConstReferenceMacro(LastTransformParameters, ParametersType);
176 
178  const TransformOutputType * GetOutput() const;
179 
185 
188  ModifiedTimeType GetMTime() const;
189 
190 #ifdef ITKV3_COMPATIBILITY
191  // StartRegistration is an old API from before
192  // the RegistrationMethod was a subclass of ProcessObject.
193  // Historically, one could call StartRegistration() instead of
194  // calling Update(). However, when called directly by the user, the
195  // inputs to the RegistrationMethod may not be up to date. This
196  // may cause an unexpected behavior.
197  //
198  // Since we cannot eliminate StartRegistration for ITKv3 backward
199  // compatibility reasons, we check whether StartRegistration was
200  // called directly or whether Update() (which in turn called
201  // StartRegistration()).
202  void StartRegistration(void) { this->Update(); }
203 #endif
204 
205 protected:
208  void PrintSelf(std::ostream & os, Indent indent) const;
209 
212  void GenerateData();
213 
215  void Initialize()
216  throw ( ExceptionObject );
217 
220 
221 private:
222  ImageToSpatialObjectRegistrationMethod(const Self &); //purposely not
223  // implemented
224  void operator=(const Self &); //purposely not
225  // implemented
226 
229 
232 
235 };
236 } // end namespace itk
237 
238 #ifndef ITK_MANUAL_INSTANTIATION
239 #include "itkImageToSpatialObjectRegistrationMethod.hxx"
240 #endif
241 
242 #endif
virtual void Update()
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
ImageToSpatialObjectMetric< FixedImageType, MovingSpatialObjectType > MetricType
Computes similarity between a moving spatial obejct and an Image to be registered.
Light weight base class for most itk classes.
TransformType::ParametersType TransformParametersType
unsigned long ModifiedTimeType
Definition: itkIntTypes.h:164
void PrintSelf(std::ostream &os, Indent indent) const
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...
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:82
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx)
Decorates any subclass of itkObject with a DataObject API.
Standard exception handling object.
Generic representation for an optimization method.
Definition: itkOptimizer.h:37
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx)
Linearly interpolate an image at specified positions.
const TransformOutputType * GetOutput() const
Control indentation during Print() invocation.
Definition: itkIndent.h:49