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 mitkCalculateGrayValueStatisticsTool_h_Included
00019 #define mitkCalculateGrayValueStatisticsTool_h_Included
00020
00021 #include "mitkCommon.h"
00022 #include "MitkExtExports.h"
00023 #include "mitkSegmentationsProcessingTool.h"
00024
00025 #include <itkImage.h>
00026 #include <sstream>
00027
00028 namespace mitk
00029 {
00030
00040 class MitkExt_EXPORT CalculateGrayValueStatisticsTool : public SegmentationsProcessingTool
00041 {
00042 public:
00043
00044 Message<> StatisticsCompleted;
00045
00046 mitkClassMacro(CalculateGrayValueStatisticsTool, SegmentationsProcessingTool);
00047 itkNewMacro(CalculateGrayValueStatisticsTool);
00048
00049 virtual const char** GetXPM() const;
00050 virtual const char* GetName() const;
00051
00052 virtual std::string GetReport() const;
00053
00054
00055
00056
00057
00058 typedef itk::Statistics::Histogram<double> HistogramType;
00059 HistogramType::Pointer m_ITKHistogram;
00060
00061 HistogramType::ConstPointer GetHistogram();
00062
00063 typedef HistogramType::MeasurementType HistogramMeasurementType;
00064
00065 protected:
00066
00067 CalculateGrayValueStatisticsTool();
00068 virtual ~CalculateGrayValueStatisticsTool();
00069
00070 virtual void StartProcessingAllData();
00071 virtual bool ProcessOneWorkingData( DataNode* node );
00072 virtual void FinishProcessingAllData();
00073
00074 virtual std::string GetErrorMessage();
00075
00079 template<typename TPixel, unsigned int VImageDimension>
00080 void CalculateMinMax(itk::Image<TPixel, VImageDimension>* referenceImage, Image* segmentation,
00081 TPixel& minimum, TPixel& maximum);
00082
00087 template<typename TPixel, unsigned int VImageDimension>
00088 void ITKHistogramming(itk::Image<TPixel, VImageDimension>* referenceImage, Image* segmentation,
00089 std::stringstream& report);
00090
00091 std::stringstream m_CompleteReport;
00092
00093 };
00094
00095 }
00096
00097 #endif
00098