ITK  4.9.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  virtual ModifiedTimeType GetMTime() const ITK_OVERRIDE;
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  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
209 
212  virtual void GenerateData() ITK_OVERRIDE;
213 
215  void Initialize()
216  throw ( ExceptionObject );
217 
220 
221 private:
222  ImageToSpatialObjectRegistrationMethod(const Self &) ITK_DELETE_FUNCTION;
223  void operator=(const Self &) ITK_DELETE_FUNCTION;
224 
227 
230 
233 };
234 } // end namespace itk
235 
236 #ifndef ITK_MANUAL_INSTANTIATION
237 #include "itkImageToSpatialObjectRegistrationMethod.hxx"
238 #endif
239 
240 #endif
virtual void Update()
Bring this filter up-to-date.
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.
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...
virtual void PrintSelf(std::ostream &os, Indent indent) const override
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override
Make a DataObject of the correct type to used as the specified output.
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:82
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
Class to hold and manage different parameter types used during optimization.
Decorates any subclass of itkObject with a DataObject API.
Standard exception handling object.
Generic representation for an optimization method.
Definition: itkOptimizer.h:38
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx)
Make a DataObject of the correct type to used as the specified output.
Linearly interpolate an image at specified positions.
const TransformOutputType * GetOutput() const
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual ModifiedTimeType GetMTime() const override