00001 00002 00003 #ifndef __VTK__VTK__OTSU__H__ 00004 #define __VTK__VTK__OTSU__H__ 00005 00006 00007 #include "vtkImageData.h" 00008 00009 class vtkOtsu 00010 { 00011 public: 00012 vtkOtsu(); 00013 virtual ~vtkOtsu(); 00014 double calculateOptimalThreshold(vtkImageData *volume, vtkImageData *region); 00015 private: 00016 double getCriteria(double threshold); 00017 00018 int voxelCount; 00019 int* histogram; 00020 double* criterias; 00021 00022 vtkImageData *volume; 00023 vtkImageData *region; 00024 00025 double sigmaT; 00026 double max; 00027 00028 }; 00029 00030 00031 00032 #endif // __VTK__VTK__OTSU__H__