/home/jpiovano/src/Odyssee++/trunk/Libs/LevelSet/src/SegmentationModule/BalloonModule.h
Go to the documentation of this file.00001
00009 #ifndef BALLOONMODULE_H
00010 #define BALLOONMODULE_H
00011
00012 #include <SegmentationModule/SegmentationModule.h>
00013
00014 namespace segmentation {
00015
00023 template<unsigned DIM, typename Pixel = float>
00024 class BalloonModule : public SegmentationModule<DIM, Pixel>
00025 {
00026 public:
00027
00028 typedef SegmentationModule<DIM, Pixel> base;
00029 typedef typename base::LevelSet LevelSet;
00030 typedef typename base::Index Index;
00031 typedef typename base::Schemes Schemes;
00032
00035
00037 BalloonModule(float _weight=1.f
00038 );
00039
00041 virtual ~BalloonModule();
00042
00044
00046
00048 float value(const LevelSet & phi, const Index & ind);
00050 float energy(const LevelSet & phi, const Index & ind);
00051 };
00052
00053
00055
00056
00057
00058 template <unsigned DIM, typename Pixel>
00059 BalloonModule<DIM, Pixel>::BalloonModule(float _weight)
00060 :SegmentationModule<DIM, Pixel>(_weight, false)
00061 { }
00062
00063 template <unsigned DIM, typename Pixel>
00064 BalloonModule<DIM, Pixel>::~BalloonModule()
00065 { }
00066
00067
00069
00070
00071
00072 template <unsigned DIM, typename Pixel>
00073 float BalloonModule<DIM, Pixel>::value(const LevelSet & phi, const Index & ind)
00074 {
00075 return Schemes::norm_gradient(phi,ind);
00076 }
00077
00078 template <unsigned DIM, typename Pixel>
00079 float BalloonModule<DIM, Pixel>::energy(const LevelSet & phi, const Index & ind)
00080 {
00081 return 0;
00082 }
00083 }
00084
00085 #endif // BALLOONMODULE_H