Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef MITKBSPLINEREGISTRATION_H
00019 #define MITKBSPLINEREGISTRATION_H
00020
00021
00022
00023 #include "mitkRegistrationBase.h"
00024 #include "MitkDeformableRegistrationExports.h"
00025 #include "mitkImageAccessByItk.h"
00026 #include <mitkOptimizerParameters.h>
00027
00028 #include "mitkRigidRegistrationObserver.h"
00029
00030 namespace mitk
00031 {
00032
00042 class MITK_DEFORMABLEREGISTRATION_EXPORT BSplineRegistration : public RegistrationBase
00043 {
00044
00045 public:
00046
00047
00048 mitkClassMacro(BSplineRegistration, RegistrationBase);
00049
00053 itkNewMacro(Self);
00054
00055
00059 void SetNumberOfIterations(int iterations);
00060
00061
00065 void SetSaveResult(bool saveResult);
00066
00070 void SetResultFileName(const char* resultName);
00071
00072
00076 virtual void GenerateData()
00077 {
00078 if (this->GetInput())
00079 {
00080 AccessByItk(this->GetInput(), GenerateData2);
00081 }
00082 }
00083
00089 void SetOptimizerParameters(mitk::OptimizerParameters::Pointer optimizerParameters)
00090 {
00091 m_OptimizerParameters = optimizerParameters;
00092 }
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106 itkSetMacro(NumberOfGridPoints, int);
00107 itkSetMacro(SaveDeformationField, bool);
00108 itkSetMacro(UpdateInputImage, bool);
00109 itkSetMacro(DeformationFileName, std::string);
00110 itkSetMacro(Metric, int);
00111 itkSetMacro(MatchHistograms, bool);
00112
00113
00114
00115 protected:
00116
00120 BSplineRegistration();
00121
00125 virtual ~BSplineRegistration();
00126
00130 template < typename TPixel, unsigned int VImageDimension >
00131 void GenerateData2( itk::Image<TPixel, VImageDimension>* itkImage1);
00132
00133 int m_Iterations;
00134 const char* m_ResultName;
00135 bool m_SaveResult;
00136
00137 mitk::OptimizerParameters::Pointer m_OptimizerParameters;
00138
00139
00140 int m_NumberOfGridPoints;
00141 bool m_SaveDeformationField;
00142 bool m_UpdateInputImage;
00143 std::string m_DeformationFileName;
00144
00145 bool m_MatchHistograms;
00146
00147 int m_Metric;
00148
00149 RigidRegistrationObserver::Pointer m_Observer;
00150
00151 };
00152 }
00153
00154 #endif // MITKDEMONSREGISTRATION_H