ITK  4.10.0
Insight Segmentation and Registration Toolkit
itkTwoProjectionImageRegistrationMethod.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 itkTwoProjectionImageRegistrationMethod_h
19 #define itkTwoProjectionImageRegistrationMethod_h
20 
21 #include "itkProcessObject.h"
22 #include "itkImage.h"
25 #include "itkDataObjectDecorator.h"
26 
27 namespace itk
28 {
29 
64 template <typename TFixedImage, typename TMovingImage>
66 {
67 public:
73 
75  itkNewMacro(Self);
76 
79 
81  typedef TFixedImage FixedImageType;
82  typedef typename FixedImageType::ConstPointer FixedImageConstPointer;
83 
85  typedef TMovingImage MovingImageType;
86  typedef typename MovingImageType::ConstPointer MovingImageConstPointer;
87 
90  MovingImageType > MetricType;
93 
97 
103 
107 
110 
114 
117 
122  void StartRegistration(void);
123 
125  void StartOptimization(void);
126 
128  void SetFixedImage1( const FixedImageType * fixedImage1 );
129  void SetFixedImage2( const FixedImageType * fixedImage2 );
130  itkGetConstObjectMacro( FixedImage1, FixedImageType );
131  itkGetConstObjectMacro( FixedImage2, FixedImageType );
133 
135  void SetMovingImage( const MovingImageType * movingImage );
136  itkGetConstObjectMacro( MovingImage, MovingImageType );
138 
140  itkSetObjectMacro( Optimizer, OptimizerType );
141  itkGetObjectMacro( Optimizer, OptimizerType );
143 
145  itkSetObjectMacro( Metric, MetricType );
146  itkGetObjectMacro( Metric, MetricType );
148 
150  itkSetObjectMacro( Transform, TransformType );
151  itkGetObjectMacro( Transform, TransformType );
153 
155  itkSetObjectMacro( Interpolator1, InterpolatorType );
156  itkSetObjectMacro( Interpolator2, InterpolatorType );
157  itkGetObjectMacro( Interpolator1, InterpolatorType );
158  itkGetObjectMacro( Interpolator2, InterpolatorType );
160 
162  virtual void SetInitialTransformParameters( const ParametersType & param );
163  itkGetConstReferenceMacro( InitialTransformParameters, ParametersType );
165 
168  itkGetConstReferenceMacro( LastTransformParameters, ParametersType );
169 
177  void SetFixedImageRegion1( const FixedImageRegionType & region1 );
178  void SetFixedImageRegion2( const FixedImageRegionType & region2 );
179 
184  itkGetConstReferenceMacro( FixedImageRegion1, FixedImageRegionType );
185  itkGetConstReferenceMacro( FixedImageRegion2, FixedImageRegionType );
186 
189  itkGetMacro( FixedImageRegionDefined1, bool );
190  itkGetMacro( FixedImageRegionDefined2, bool );
191 
196  itkSetMacro( FixedImageRegionDefined1, bool );
197  itkSetMacro( FixedImageRegionDefined2, bool );
199 
201  virtual void Initialize();
202 
204  const TransformOutputType * GetOutput() const;
205 
209  virtual DataObjectPointer MakeOutput( DataObjectPointerArraySizeType idx);
210 
213  unsigned long GetMTime() const;
214 
215 protected:
218  virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
219 
222  virtual void GenerateData() ITK_OVERRIDE;
223 
225  itkSetMacro( LastTransformParameters, ParametersType );
226 
227 
228 private:
229  TwoProjectionImageRegistrationMethod(const Self&); //purposely not implemented
230  void operator=(const Self&); //purposely not implemented
231 
232  MetricPointer m_Metric;
234 
235  MovingImageConstPointer m_MovingImage;
236  FixedImageConstPointer m_FixedImage1;
237  FixedImageConstPointer m_FixedImage2;
238 
239  TransformPointer m_Transform;
240  InterpolatorPointer m_Interpolator1;
241  InterpolatorPointer m_Interpolator2;
242 
245 
248  FixedImageRegionType m_FixedImageRegion1;
249  FixedImageRegionType m_FixedImageRegion2;
250 
251 };
252 
253 } // end namespace itk
254 
255 
256 #ifndef ITK_MANUAL_INSTANTIATION
257 #include "itkTwoProjectionImageRegistrationMethod.hxx"
258 #endif
259 
260 #endif
void SetMovingImage(const MovingImageType *movingImage)
void SetFixedImage1(const FixedImageType *fixedImage1)
void SetFixedImageRegion2(const FixedImageRegionType &region2)
Computes similarity between two fixed images and one fixed image.
void SetFixedImage2(const FixedImageType *fixedImage2)
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...
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
Definition: itkArray.h:30
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx)
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
virtual void PrintSelf(std::ostream &os, Indent indent) const override
Class to hold and manage different parameter types used during optimization.
void SetFixedImageRegion1(const FixedImageRegionType &region1)
Decorates any subclass of itkObject with a DataObject API.
const TransformOutputType * GetOutput() const
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.
Base class for all image interpolaters.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
FixedImageType::RegionType FixedImageRegionType
itkGetObjectMacro(Optimizer, OptimizerType)
virtual void SetInitialTransformParameters(const ParametersType &param)
TwoImageToOneImageMetric< FixedImageType, MovingImageType > MetricType