Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkBSplineRegistration.h
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 
17 #ifndef MITKBSPLINEREGISTRATION_H
18 #define MITKBSPLINEREGISTRATION_H
19 
21 #include "mitkImageAccessByItk.h"
22 #include "mitkRegistrationBase.h"
24 //#include <mitkMetricParameters.h>
26 
27 namespace mitk
28 {
38  {
39  public:
41 
45  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
46 
47 
50  void SetNumberOfIterations(int iterations);
51 
55  void SetSaveResult(bool saveResult);
56 
60  void SetResultFileName(const char *resultName);
61 
65  virtual void GenerateData() override
66  {
67  if (this->GetInput())
68  {
69  AccessByItk(this->GetInput(), GenerateData2);
70  }
71  }
72 
78  {
79  m_OptimizerParameters = optimizerParameters;
80  }
81 
82  /* void SetMetricParameters(mitk::MetricParameters::Pointer metricParameters)
83  {
84  m_MetricParameters = metricParameters;
85  }*/
86 
87  /* void SetParameters(mitk::OptimizerParameters::Pointer optimizerParameters, mitk::MetricParameters::Pointer
88  metricParameters)
89  {
90  m_OptimizerParameters = optimizerParameters;
91  m_MetricParameters = metricParameters;
92  }*/
93 
94  itkSetMacro(NumberOfGridPoints, int);
95  itkSetMacro(SaveDeformationField, bool);
96  itkSetMacro(UpdateInputImage, bool);
97  itkSetMacro(DeformationFileName, std::string);
98  itkSetMacro(Metric, int);
99  itkSetMacro(MatchHistograms, bool);
100 
101  protected:
106 
110  virtual ~BSplineRegistration();
111 
115  template <typename TPixel, unsigned int VImageDimension>
116  void GenerateData2(const itk::Image<TPixel, VImageDimension> *itkImage1);
117 
119  const char *m_ResultName;
121 
123  // mitk::MetricParameters::Pointer m_MetricParameters;
124 
129 
131 
132  int m_Metric;
133 
135  };
136 }
137 
138 #endif // MITKDEMONSREGISTRATION_H
itk::SmartPointer< Self > Pointer
mitk::OptimizerParameters::Pointer m_OptimizerParameters
Superclass of all classes generating some kind of mitk::BaseData.
DataCollection - Class to facilitate loading/accessing structured data.
virtual void GenerateData() override
Starts the B-Spline registration.
RigidRegistrationObserver::Pointer m_Observer
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
This class performes a b-spline registration between two images.
#define AccessByItk(mitkImage, itkImageTypeFunction)
Access a MITK image by an ITK image.
This class handles the images for the registration as well as taking care of the progress bar during ...
void SetOptimizerParameters(mitk::OptimizerParameters::Pointer optimizerParameters)
Set the optimizer parameters.
#define MITKDEFORMABLEREGISTRATION_EXPORT