00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 #ifndef MITKSYMMETRICFORCESDEMONSREGISTRATION_H 00019 #define MITKSYMMETRICFORCESDEMONSREGISTRATION_H 00020 00021 #include "itkSymmetricForcesDemonsRegistrationFilter.h" 00022 #include "MitkDeformableRegistrationExports.h" 00023 00024 #include "mitkRegistrationBase.h" 00025 #include "mitkImageAccessByItk.h" 00026 00027 namespace mitk 00028 { 00029 00038 class MITK_DEFORMABLEREGISTRATION_EXPORT SymmetricForcesDemonsRegistration : public RegistrationBase 00039 { 00040 00041 public: 00042 00043 mitkClassMacro(SymmetricForcesDemonsRegistration, RegistrationBase); 00044 00048 itkNewMacro(Self); 00049 00053 void SetNumberOfIterations(int iterations); 00054 00058 void SetStandardDeviation(float deviation); 00059 00063 void SetSaveDeformationField(bool saveField); 00064 00068 void SetDeformationFieldFileName(const char* fieldName); 00069 00073 void SetSaveResult(bool saveResult); 00074 00078 void SetResultFileName(const char* resultName); 00079 00083 itk::Image<class itk::Vector<float, 3>,3>::Pointer GetDeformationField(); 00084 00088 virtual void GenerateData() 00089 { 00090 if (this->GetInput()) 00091 { 00092 AccessByItk(this->GetInput(), GenerateData2); 00093 } 00094 } 00095 00096 protected: 00097 00101 SymmetricForcesDemonsRegistration(); 00102 00106 virtual ~SymmetricForcesDemonsRegistration(); 00107 00111 template < typename TPixel, unsigned int VImageDimension > 00112 void GenerateData2( itk::Image<TPixel, VImageDimension>* itkImage1); 00113 00114 int m_Iterations; 00115 float m_StandardDeviation; 00116 const char* m_FieldName; 00117 const char* m_ResultName; 00118 bool m_SaveField; 00119 bool m_SaveResult; 00120 itk::Image<class itk::Vector<float, 3>,3>::Pointer m_DeformationField; 00121 }; 00122 } 00123 00124 #endif // MITKSYMMETRICFORCESDEMONSREGISTRATION_H