Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkImageRegistrationMethod.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
19 
20 namespace mitk
21 {
22  ImageRegistrationMethod::ImageRegistrationMethod() : m_Interpolator(0), m_MultiResolutionScales(1)
23  {
25  m_OptimizerScales.clear();
26  }
27 
30  {
31  if (this->GetInput())
32  {
34  }
35  }
36 
38  void ImageRegistrationMethod::SetInterpolator(int interpolator) { m_Interpolator = interpolator; }
40  {
41  m_ReferenceImage = fixedImage;
42  SetNthInput(1, m_ReferenceImage);
43  Modified();
44  }
45 
47  {
48  m_MovingMask = movingMask;
49  SetNthInput(3, m_MovingMask);
50  Modified();
51  }
52 
54  {
55  m_FixedMask = FixedMask;
56  SetNthInput(4, m_FixedMask);
57  Modified();
58  }
59 
61  {
62  m_Transform = transform;
63 
64  MITK_INFO("Image.Registration.Method") << "Transform : " << m_Transform;
65  }
66 
67  void ImageRegistrationMethod::SetMetric(itk::Object::Pointer metric) { m_Metric = metric; }
68  void ImageRegistrationMethod::SetOptimizer(itk::Object::Pointer optimizer) { m_Optimizer = optimizer; }
69  void ImageRegistrationMethod::SetOptimizerScales(itk::Array<double> scales)
70  {
71  m_OptimizerScales.set_size(scales.size());
72  m_OptimizerScales.copy_in(scales.data_block());
73  }
74 
75  void ImageRegistrationMethod::SetNumberOfLevels(unsigned int levels) { m_MultiResolutionScales = levels; }
76 } // end namespace
void SetOptimizerScales(itk::Array< double > scales)
itk::SmartPointer< Self > Pointer
#define MITK_INFO
Definition: mitkLogMacros.h:22
void SetTransform(itk::Object::Pointer transform)
DataCollection - Class to facilitate loading/accessing structured data.
virtual void GenerateData() override
A version of GenerateData() specific for image processing filters.
void SetNumberOfLevels(unsigned int levels)
void SetOptimizer(itk::Object::Pointer optimizer)
virtual void SetReferenceImage(Image::Pointer fixedImage)
void SetObserver(RigidRegistrationObserver::Pointer observer)
virtual void SetMovingMask(Image::Pointer movingMask)
RigidRegistrationObserver::Pointer m_Observer
static Pointer New()
InputImageType * GetInput(void)
virtual void SetFixedMask(Image::Pointer fixedMask)
void SetMetric(itk::Object::Pointer metric)