ITK  4.2.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  void StartRegistration(void);
140 
142  itkSetConstObjectMacro(FixedImage, FixedImageType);
143  itkGetConstObjectMacro(FixedImage, FixedImageType);
145 
147  itkSetConstObjectMacro(MovingSpatialObject, MovingSpatialObjectType);
148  itkGetConstObjectMacro(MovingSpatialObject, MovingSpatialObjectType);
150 
152  itkSetObjectMacro(Optimizer, OptimizerType);
153  itkGetObjectMacro(Optimizer, OptimizerType);
155 
157  itkSetObjectMacro(Metric, MetricType);
158  itkGetObjectMacro(Metric, MetricType);
160 
162  itkSetObjectMacro(Transform, TransformType);
163  itkGetObjectMacro(Transform, TransformType);
165 
167  itkSetObjectMacro(Interpolator, InterpolatorType);
168  itkGetObjectMacro(Interpolator, InterpolatorType);
170 
172  itkSetMacro(InitialTransformParameters, ParametersType);
173  itkGetConstReferenceMacro(InitialTransformParameters, ParametersType);
175 
178  itkGetConstReferenceMacro(LastTransformParameters, ParametersType);
179 
181  const TransformOutputType * GetOutput() const;
182 
186  using Superclass::MakeOutput;
187  virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx);
188 
191  unsigned long GetMTime() const;
192 
193 protected:
196  void PrintSelf(std::ostream & os, Indent indent) const;
197 
200  void GenerateData();
201 
203  void Initialize()
204  throw ( ExceptionObject );
205 
206  ParametersType m_InitialTransformParameters;
207  ParametersType m_LastTransformParameters;
208 private:
209  ImageToSpatialObjectRegistrationMethod(const Self &); //purposely not
210  // implemented
211  void operator=(const Self &); //purposely not
212  // implemented
213 
214  MetricPointer m_Metric;
215  OptimizerType::Pointer m_Optimizer;
216 
217  MovingSpatialObjectConstPointer m_MovingSpatialObject;
219 
220  TransformPointer m_Transform;
221  InterpolatorPointer m_Interpolator;
222 };
223 } // end namespace itk
224 
225 #ifndef ITK_MANUAL_INSTANTIATION
226 #include "itkImageToSpatialObjectRegistrationMethod.hxx"
227 #endif
228 
229 #endif
230