00001 #ifndef __RMeanCurvatureFilter__ 00002 #define __RMeanCurvatureFilter__ 00003 00022 #include <stdio.h> 00023 00024 #include "AnImage.hpp" 00025 #include "AbsRImageFilter.hpp" 00026 00027 #include "AbsRImageFlow.hpp" 00028 00029 class RMeanCurvatureFilter : public AbsRImageFilter 00030 { 00031 protected: 00032 00033 RImage* I0; // origin image 00034 RImage* I; // current image 00035 00036 double lambda; // used for linear constrains around the origin 00037 00038 int niterations; 00039 double alpha; 00040 00041 AbsRImageFlow* meanCurvature; 00042 00043 protected: 00044 00045 virtual void operations(RImage& result); 00046 virtual void operations(AnImage& mask, RImage& result); 00047 00048 public: 00049 00050 RMeanCurvatureFilter(int n, double ralpha, double alambda=0.0, bool projectif=true); 00051 RMeanCurvatureFilter(int n, double ralpha, double alambda=0.0, double beta=0.0001); 00052 virtual ~RMeanCurvatureFilter(){ delete meanCurvature; } 00053 00054 virtual void setMask(int n, int* xp, int* yp){ xm=xp; ym=yp; nMask=n; } 00055 00056 00057 virtual RImage* filter(RImage* src, RImage* dest=0); 00058 virtual RImage* selectedFilter(AnImage* mask, RImage* src, RImage* dest=0); 00059 00060 virtual void report(FILE* file){} 00061 }; 00062 00063 00064 #endif