]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/kernel/PlanesOperations.h
#3262 creaMaracasVisu Feature New Normal - Export LookupTable fron ColorLayerImageV...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / kernel / PlanesOperations.h
1 /*# ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la Sant�)
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
8 #
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.
15 #
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
20 #  liability.
21 #
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 # ------------------------------------------------------------------------ */
25
26 #ifndef PlanesOperations_H_
27 #define PlanesOperations_H_
28
29 #include <math.h>
30
31 #include <iostream>
32 #include <vector>
33
34 using namespace std;
35
36 class PlanesOperations  {
37
38 public:
39         PlanesOperations();     
40         ~PlanesOperations();    
41         
42         
43
44     double* getCrossProduct(double* vect0,double* vect1);
45     double getDotProduct(double* vect0,double* vect1);
46     double* getNormal(double* vect);
47     double getMagnitud(double* vect);
48     double* makeVector(double *podouble0, double* podouble1);
49
50     void getCrossProduct(double* vect0,double* vect1, double* vectres);
51     void getNormal(double* vect, double* vectnorm);
52     void makeVector(double* podouble0, double* podouble1, double* vectres);
53     /**
54     *    Adds to vectors, the result is in vectres;
55     *@param double* vect0, the first vector
56     *@param double* vect1, the second vector
57     *@param double* vectres, the resulting vector
58     */
59     void addVectors(double* vect0, double* vect1, double*vectres);
60     /**
61     *    multiply a vector with a given scalar
62     *@param double* vect0, the vector
63     *@param double scalar, the scalar value
64     *@param double* vectres, the resulting vector
65     */
66     void scalarVector(double* vect0, double scalar, double*vectres);
67     
68     vector<double> getCrossProduct(vector<double> vect0,vector<double> vect1);
69     double  getDotProduct(vector<double> vect0,vector<double> vect1);
70     vector<double> getNormal(vector<double> vect);
71     double  getMagnitud(vector<double> vect);
72     vector<double> makeVector(vector<double> podouble0, vector<double> podouble1);
73     /**
74     *    Adds to vectors, the result is in vectres;
75     *@param double* vect0, the first vector
76     *@param double* vect1, the second vector
77     *@param double* vectres, the resulting vector
78     */
79     vector<double> addVectors(vector<double> vect0, vector<double> vect1);
80     /**
81     *    multiply a vector with a given scalar
82     *@param double* vect0, the vector
83     *@param double scalar, the scalar value
84     *@param double* vectres, the resulting vector
85     */
86     vector<double> scalarVector(vector<double> vect0, double scalar);
87         
88 };
89
90 #endif /*PlanesOperations_H_*/