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 MITKHISTOGRAMMATCHING_H 00019 #define MITKHISTOGRAMMATCHING_H 00020 00021 #include "itkHistogramMatchingImageFilter.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 HistogramMatching : public RegistrationBase 00039 { 00040 00041 public: 00042 mitkClassMacro(HistogramMatching, RegistrationBase); 00043 00047 itkNewMacro(Self); 00048 00052 void SetNumberOfMatchPoints(int matchPoints); 00053 00057 void SetNumberOfHistogramLevels(int histogrammLevels); 00058 00062 void SetThresholdAtMeanIntensity(bool on); 00063 00067 virtual void GenerateData() 00068 { 00069 if (this->GetInput()) 00070 { 00071 AccessByItk(this->GetInput(), GenerateData2); 00072 } 00073 } 00074 00075 protected: 00076 00080 HistogramMatching(); 00081 00085 virtual ~HistogramMatching(); 00086 00090 template < typename TPixel, unsigned int VImageDimension > 00091 void GenerateData2( itk::Image<TPixel, VImageDimension>* itkImage1); 00092 00093 bool m_ThresholdAtMeanIntensity; 00094 int m_NumberOfHistogramLevels; 00095 int m_NumberOfMatchPoints; 00096 }; 00097 00098 } // end namespace 00099 #endif // MITKHISTOGRAMMATCHING_H