00001 /************************************************************************* 00002 * $Id: idicont.h,v 1.1 2005/09/09 08:22:30 bellet Exp $ 00003 ************************************************************************** 00004 This software is governed by the CeCILL license under French law and 00005 abiding by the rules of distribution of free software. You can use, 00006 modify and/ or redistribute the software under the terms of the CeCILL 00007 license as circulated by CEA, CNRS and INRIA at the following URL 00008 "http://www.cecill.info". 00009 00010 As a counterpart to the access to the source code and rights to copy, 00011 modify and redistribute granted by the license, users are provided only 00012 with a limited warranty and the software's author, the holder of the 00013 economic rights, and the successive licensors have only limited 00014 liability. 00015 00016 In this respect, the user's attention is drawn to the risks associated 00017 with loading, using, modifying and/or developing or reproducing the 00018 software by the user in light of its specific status of free software, 00019 that may mean that it is complicated to manipulate, and that also 00020 therefore means that it is reserved for developers and experienced 00021 professionals having in-depth computer knowledge. Users are therefore 00022 encouraged to load and test the software's suitability as regards their 00023 requirements in conditions enabling the security of their systems and/or 00024 data to be ensured and, more generally, to use and operate it in the 00025 same conditions as regards security. 00026 00027 The fact that you are presently reading this means that you have had 00028 knowledge of the CeCILL license and that you accept its terms. 00029 00030 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de 00031 l'Image). All rights reserved. See License.txt for details. 00032 00033 Version 1.0 05/09/2005 00034 *************************************************************************/ 00035 00036 /************************************************************************* 00037 * PROJET : LIBIDO * 00038 * NOM DU MODULE : idicont.h * TYPE : fichier inclus 00039 * AUTEUR : Clarysse P. * CREATION : 15/02/92 00040 * VERSION : 1.0 * REVISION : / / 00041 * LANGAGE : C * 00042 * * 00043 ************************************************************************** 00044 * Insertion dans libido : 00045 * par : le : 00046 * virification libido : 00047 * par : le : 00048 ************************************************************************** 00049 * 00050 * Description : Declaration relatives au filtre IMACONT.C, FIMAEXTR.C, 00051 * FIMAHYST.C de recherche de contours dans une image 00052 * de gradient. 00053 * 00054 ************************************************************************** 00055 * 00056 * MODULES UTILISES : 00057 * 00058 ************************************************************************** 00059 * | | 00060 * REVISIONS : DATE | AUTEUR | DESCRIPTION 00061 *---------------------|--------------|------------------------------------ 00062 * 00063 **************************************************************************/ 00064 #ifndef __IDICONT_H__ 00065 #define __IDICONT_H__ 00066 00067 #define FLT_ZERO 1e-18 /* Valeur Zero */ 00068 #define NDGMAX 255 /* Niveau des points de contour */ 00069 00070 /* Structure de base de type point */ 00071 struct point { 00072 short x; 00073 short y; 00074 short z; 00075 short val; 00076 }; 00077 00078 typedef struct point * POINT_PTR; 00079 00080 /* Structure de noeud */ 00081 struct node { 00082 struct node * father; 00083 struct node * son; 00084 struct point * info; 00085 }; 00086 00087 typedef struct node * NODE; 00088 00089 00090 /* Structure de l'image tangente */ 00091 00092 typedef struct __tgdir__{ 00093 float tgalpha; 00094 #ifdef SWIG 00095 unsigned int sens; 00096 #else 00097 unsigned int sens:1; 00098 #endif 00099 } TGDIR; 00100 00101 typedef TGDIR ** PPIMAGE_TGDIR; 00102 00103 00104 /* Macros */ 00105 /* Fonction carree */ 00106 #define sqr(x) ((x) * (x)) 00107 00108 /* Test par rapport au zero machine */ 00109 #define TestZero(val) (fabs((double)(val)) < FLT_ZERO) 00110 00111 /* Test d'inclusion d'une variable entre 2 bornes */ 00112 #define TestDansInterval(x, i, s) ((x)>=(i) && (x)<=(s)) 00113 00114 /* prototypes de FIMAEXTR.C */ 00115 00116 00117 PPIMAGE_TGDIR TangentImage (PPIMAGE_FLOAT, PPIMAGE_FLOAT); 00118 void TangentImageFree (PPIMAGE_TGDIR, int); 00119 int CoTangentImage (PPIMAGE_TGDIR, int, int); 00120 00121 #ifndef SWIG 00122 PPIMAGE_UCHAR IdImaExtremSearch (PPIMAGE_UCHAR, PPIMAGE_TGDIR, int); 00123 #endif 00124 00125 void _IdFreeLinesOfPlane (void**, int); 00126 00127 /* Prototypes de FIMAHYST.C */ 00128 00129 int BtScanTree (NODE, PPIMAGE_UCHAR, PPIMAGE_UCHAR, PPIMAGE_TGDIR, 00130 double, int [],long* BOTH, PPIMAGE_UCHAR); 00131 int PathTrace (NODE, PPIMAGE_UCHAR); 00132 int ExistingPoint (NODE, struct point *, PPIMAGE_UCHAR); 00133 NODE BtCreateNode (NODE, size_t); 00134 NODE BtFreeNode (NODE); 00135 #endif 00136