Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

Morpho6c.h

00001 /*
00002 OpenMorpho Library - Mathematical Morphology (Image processing) Library
00003 Copyright (C) 2000  Laurent Najman
00004 
00005 This program is free software; you can redistribute it and/or
00006 modify it under the terms of the GNU General Public License
00007 as published by the Free Software Foundation; either version 2
00008 of the License, or (at your option) any later version.
00009 
00010 This program is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 GNU General Public License for more details.
00014 
00015 You should have received a copy of the GNU General Public License
00016 along with this program; if not, write to the Free Software
00017 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00018 
00019 You can contact the author at
00020         mailto:laurent@najman.org
00021 and download the latest version at
00022         http://www.laurentnajman,org
00023 */
00024 
00025 // Morpho6c.h: interface for the Morpho6c class.
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 // to be able to use the std limits, we have to get rid of max and min macro
00041 // This is a bug of VC5++ compiler
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_)

Generated at Sun May 12 19:04:22 2002 for OpenMorpho by doxygen1.2.0 written by Dimitri van Heesch, © 1997-2000