/vol/vipdata/irtk/image++/include/irtkVesselness.h
00001 #ifndef _IRTKVESSEL_H
00002
00003 #define _IRTKVESSEL_H
00004
00005
00006
00007 template <class VoxelType> class irtkVessel : public irtkObject
00008 {
00009
00010 private:
00011
00013 Bool _DebugFlag;
00014 double _alpha;
00015 double _beta;
00016 double _c;
00017 double _r;
00018
00019
00020 double _sigmaMin;
00021 double _sigmaMax;
00022 double _vesselness;
00023 static double _sigma;
00024 irtkVector reference;
00025
00026 protected:
00027
00029 static irtkGenericImage<VoxelType>* _input;
00030
00031 irtkGenericImage<VoxelType> _imageXX;
00032 irtkGenericImage<VoxelType> _imageXY;
00033 irtkGenericImage<VoxelType> _imageXZ;
00034 irtkGenericImage<VoxelType> _imageYY;
00035 irtkGenericImage<VoxelType> _imageYZ;
00036 irtkGenericImage<VoxelType> _imageZZ;
00037
00038
00039 public:
00040 static irtkGenericImage<VoxelType> _probability;
00041 irtkHessianImage<VoxelType> hessianimage;
00042 static irtkGenericImage<VoxelType> _sigmaImage;
00043 irtkRealImage _vesselnessImage;
00044 static irtkGenericImage<VoxelType> _hxx;
00045 static irtkGenericImage<VoxelType> _hxy;
00046 static irtkGenericImage<VoxelType> _hxz;
00047 static irtkGenericImage<VoxelType> _hyy;
00048 static irtkGenericImage<VoxelType> _hyz;
00049 static irtkGenericImage<VoxelType> _hzz;
00050 static irtkGenericImage<VoxelType> _dx;
00051 static irtkGenericImage<VoxelType> _dy;
00052 static irtkGenericImage<VoxelType> _dz;
00053
00055 irtkVessel();
00056
00057
00059 virtual ~irtkVessel();
00060
00061 void SetReference(double, double, double);
00062 void ChangeReference();
00063
00065 void SetInput (irtkGenericImage<VoxelType> *);
00066
00067 void SetAlpha (double);
00068
00069 double GetAlpha();
00070
00071 void SetBeta (double);
00072
00073 double GetBeta();
00074
00075 void SetC (double);
00076
00077 double GetC();
00078
00079 void SetR(double);
00080
00081 double GetR();
00082
00083 void SetSigma (double);
00084
00085 static double GetSigma(double, double, double);
00086
00087 void SetSigmaRange(double, double);
00088
00089
00090 void Initialize();
00091
00092 static void increasingMagnitudeSort(int n, irtkVector& eigval, irtkMatrix& eigvec);
00093
00094 void GetHessian(irtkMatrix, double, double, double);
00095
00097 double Vesselness(double, double, double);
00098
00099
00100
00101 void Vesselness();
00102 void VesselnessFDM();
00103
00104
00105 void LorenzFilter();
00106
00107 void SatoFilter();
00108 static float Ridgeness(float p[3]);
00109 static float Ridgeness2(float p[3]);
00110 static void Dridgeness(float p[3], float derivative[3]);
00111 static void Dridgeness2(float p[3], float derivative[3]);
00112
00113
00114 void Traversal(float p[3]);
00115 void Traversal2(float p[3]);
00116
00117
00118
00119 void Extract(float*, float*, float stepsize);
00120
00121
00122 double erf(double);
00123
00124
00125 double erfc(double);
00126 void IntensityMeasure(irtkGenericImage<VoxelType> *,irtkGenericImage<VoxelType> *, double, double, double);
00127
00128 void CostImage(irtkGenericImage<VoxelType> *, irtkGenericImage<VoxelType> *, irtkGenericImage<VoxelType> *, double epsilon);
00129
00130
00132 char *NameOfClass();
00133
00135 SetMacro(DebugFlag, Bool);
00136
00138 GetMacro(DebugFlag, Bool);
00139
00141 void Debug(char *);
00142 };
00143
00144
00145 #endif
00146
00147