1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 # This software is governed by the CeCILL-B license under French law and
10 # abiding by the rules of distribution of free software. You can use,
11 # modify and/ or redistribute the software under the terms of the CeCILL-B
12 # license as circulated by CEA, CNRS and INRIA at the following URL
13 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 # or in the file LICENSE.txt.
16 # As a counterpart to the access to the source code and rights to copy,
17 # modify and redistribute granted by the license, users are provided only
18 # with a limited warranty and the software's author, the holder of the
19 # economic rights, and the successive licensors have only limited
22 # The fact that you are presently reading this means that you have had
23 # knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
26 #ifndef __contoursIntersection_h_INCLUDED__
27 #define __contoursIntersection_h_INCLUDED__
29 #include "vectorFunctions.h"
31 class contoursIntersection
34 contoursIntersection ( );
35 ~contoursIntersection ( );
36 double Slope ( double x0, double y0,
37 double x1, double y1 );
38 double Normal ( double x0, double y0,
39 double *m, double xi );
40 void Intersection ( double x01, double y01,
41 double x02, double y02,
43 double *x, double *y );
44 void SetContour1 ( std::vector<double>*InX1,
45 std::vector<double>*InY1,
46 std::vector<double>*InZ1 );
47 void SetContour2 ( std::vector<double>*InX2,
48 std::vector<double>*InY2,
49 std::vector<double>*InZ2 );
50 //All the intersections between the two set contour
51 void InterBetweenContours ( std::vector<double>*OutX,
52 std::vector<double>*OutY,
53 std::vector<double>*OutZ );
54 //All the possible intersections between the contours
55 void PossibleIntersections ( std::vector<double>*OutX,
56 std::vector<double>*OutY,
57 std::vector<double>*OutZ );
58 //Logical intersections between the two set contours
59 void IntersectionPoints ( std::vector<double>*OutX,
60 std::vector<double>*OutY,
61 std::vector<double>*OutZ );
62 //Set the parameter data for stimate the error between the contours
63 void SetErrorParameter ( double val );
64 //The error between the contours
65 int GetErrorBetweenContours ( double error );
67 std::vector<double> _InX1;
68 std::vector<double> _InY1;
69 std::vector<double> _InZ1;
70 std::vector<double> _InX2;
71 std::vector<double> _InY2;
72 std::vector<double> _InZ2;