00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023
00024
00025
00026 00028
00029 #if !defined(AFX_MORPHO6C_H__BEF94A63_86B8_11D4_B181_BE991C280449__INCLUDED_)
00030 #define AFX_MORPHO6C_H__BEF94A63_86B8_11D4_B181_BE991C280449__INCLUDED_
00031
00032 #ifndef SWIG // Remove whatever is not needed by SWIG
00033
00034 #if _MSC_VER >= 1000
00035 #pragma once
00036 #endif // _MSC_VER >= 1000
00037
00038
00039 #include "ImageGrey.h"
00040
00041
00042 #undef min
00043 #undef max
00044 #include <limits>
00045 using namespace std;
00046
00047 #include <Morpho.h>
00048
00049 #endif // SWIG
00050
00051 #ifndef SWIG
00052
00053 class CBasin {
00054 public:
00056 PIXEL alt;
00058 PIXEL dyn;
00060 PIXEL label;
00062 CBasin *is_flooded_by;
00064 int count_pass;
00065
00066 CBasin() {
00067 alt = 0;
00068 dyn = numeric_limits<PIXEL>::max();
00069 is_flooded_by = NULL;
00070 label = 0;
00071 count_pass = 0;
00072 };
00073 virtual ~CBasin() {};
00074 };
00075
00076 #endif //SWIG
00077
00098 class CMorpho6c : public CMorpho
00099 {
00101 void upstreamPoints (CImageGrey *in, CImageGrey *out);
00103 void crestPoints (CImageGrey *in, CImageGrey *out);
00104
00106 inline void wshed_process_point(LPPIXEL p, LPPIXEL pp, short pr,
00107 QPixelT * qpixel, QShortT * qparity,
00108 char *flag);
00110 virtual CImageGrey * dilate(CImageGrey *in, CImageGrey *out);
00112 virtual CImageGrey * erode(CImageGrey *in, CImageGrey *out);
00113
00114 public:
00115 CMorpho6c();
00116 virtual ~CMorpho6c();
00117
00119 CImageGrey * chamfer(CImageGrey *in, short mode = 0);
00121 CImageGrey *geodesicErosion(CImageGrey *mark, CImageGrey *ref, int border);
00123 CImageGrey *geodesicDilation(CImageGrey *mark, CImageGrey *ref, int border);
00124
00126 CImageGrey * watershed(CImageGrey *in);
00128 CImageGrey * watershed2(CImageGrey *in);
00130 CImageGrey * watershedSaliency(CImageGrey *in);
00131
00133 CImageGrey * skeleton_anchor (CImageGrey *in, CImageGrey *anchor);
00135 CImageGrey * skeletonTalbotVincent (CImageGrey *in, CImageGrey *anchor);
00137 CImageGrey * skeletonMeyer(CImageGrey *in);
00138
00140 CImageGrey * connectedComponents(CImageGrey *in);
00141 };
00142
00143 #endif // !defined(AFX_MORPHO6C_H__BEF94A63_86B8_11D4_B181_BE991C280449__INCLUDED_)