vtkPichonFastMarchingPDF.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __PichonFastMarchingPDF_h
00010 #define __PichonFastMarchingPDF_h
00011
00012 #include "vtkSlicerBaseLogic.h"
00013
00014 #ifdef _WIN32
00015
00016 #include <float.h>
00017 #define isnan(x) _isnan(x)
00018 #define finite(x) _finite(x)
00019
00020 #ifndef min
00021 #define min(a,b) (((a)<(b))?(a):(b))
00022 #endif
00023
00024 #ifndef M_PI
00025 #define M_PI 3.1415926535898
00026 #endif
00027
00028 #include <deque>
00029
00030 #else
00031
00032 #if defined(sun) || defined(__sun)
00033 #include <math.h>
00034 #include <ieeefp.h>
00035 #endif
00036 #include <deque>
00037
00038 #endif
00039
00040 #include <vtkObject.h>
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050 class VTK_SLICER_BASE_LOGIC_EXPORT vtkPichonFastMarchingPDF : public vtkObject
00051 {
00052 public:
00053
00054 double getMean( void ) { return mean; };
00055 double getSigma2( void ) { return sigma2; };
00056
00057
00058 vtkPichonFastMarchingPDF(){};
00059 vtkPichonFastMarchingPDF( int realizationMax );
00060 ~vtkPichonFastMarchingPDF();
00061
00062 static vtkPichonFastMarchingPDF* New();
00063
00064 void setMemory( int mem );
00065 void setUpdateRate( int rate );
00066
00067 bool willUseGaussian( void );
00068
00069 void reset( void );
00070 void update( void );
00071
00072 double value( int k );
00073 void addRealization( int k );
00074
00075
00076
00077
00078
00079
00080 void show( void );
00081
00082 const char* GetClassName(void)
00083 {return "vtkPichonFastMarchingPDF"; };
00084
00085
00086
00087 friend class vtkFastMarching;
00088
00089
00090 double sigma2SmoothPDF;
00091
00092 int realizationMax;
00093
00094 int counter;
00095 int memorySize;
00096 int updateRate;
00097
00099 int *bins;
00100 int nRealInBins;
00101
00102 double *smoothedBins;
00103
00104 double * coefGauss;
00105
00106
00107 std::deque<int> inBins;
00108 std::deque<int> toBeAdded;
00109
00110
00112 double m1;
00113 double m2;
00114
00116 double sigma2;
00117 double mean;
00118
00119 double valueHisto( int k );
00120 double valueGauss( int k );
00121
00122 };
00123
00124 #endif
00125