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 __Propagation_h_INCLUDED__
27 #define __Propagation_h_INCLUDED__
29 #include "vtkImageData.h"
32 #include "itkMatrix.h"
36 #include "manualContourModel.h"
45 void set_vec ( double val );
46 void set_var ( double val );
47 double get_vec ( int id );
50 void copyVector ( std::vector<Vector>*vec1, std::vector<Vector>*vec2 );
51 void printVector ( std::vector<Vector>*vec1 );
52 void set_x ( double val );
53 void set_y ( double val );
54 void set_z ( double val );
55 void set_plane ( int val );
56 double get_x ( int id );
58 double get_y ( int id );
60 double get_z ( int id );
64 std::vector<double> getVec();
69 std::vector<double> _vec;
70 std::vector<double> _vecX;
71 std::vector<double> _vecY;
72 std::vector<double> _vecZ;
75 class creaMaracasVisu_EXPORT PropContour
82 vtkImageData* method_RBF ( double rad, std::vector<double>*CoordX, std::vector<double>*CoordY,
83 std::vector<double>*CoordZ );
84 vtkImageData* method_RBF_3D ( double rad, std::vector<double>*CoordX, std::vector<double>*CoordY,
85 std::vector<double>*CoordZ );
86 vtkImageData* method_RBF_3D_ThinPlate ( double rad, std::vector<double>*CoordX, std::vector<double>*CoordY,
87 std::vector<double>*CoordZ );
90 int VectorDirection ( std::vector<double>*InX, std::vector<double>*InY, std::vector<double>*InZ );
91 void VectorOrder ( int dir, int posinic, std::vector<double>*InX, std::vector<double>*InY, std::vector<double>*InZ);
92 void ReadKeyContour ( FILE* fd );
93 void ResetKeyContours ( );
94 void SetKeyContours ( std::vector<double>*InX, std::vector<double>*InY, std::vector<double>*InZ );
95 vtkImageData* CalculeSplinePropagation ( );
96 void GetKeyContours ( std::vector<double>*KeyX, std::vector<double>*KeyY, std::vector<double>*KeyZ, std::vector<int>*KeyS );
97 void GetPropagatedContours ( std::vector<Vector>*planevec );
98 void GetIdContour ( int id, std::vector<double>*vecX, std::vector<double>*vecY, std::vector<double>*vecZ );
99 void SetInterpNumber ( int val );
100 int FindIdWithZ ( double z );
105 double RBF_WendLand ( double norm, double m_rad );
106 double RBF_ThinPlate ( double norm );
107 double RBF_ThinPlate_3D ( double norm );
110 void PreparePointsForSpline ( std::vector<double>*InX, std::vector<double>*InY, std::vector<double>*InZ, std::vector<int>*Sizes );
111 vtkImageData* method_Spline ( std::vector<double>*InX, std::vector<double>*InY, std::vector<double>*InZ, std::vector<int>*Sizes );
112 void ResetPlaneVector();
117 vtkImageData *imagedataValue;
118 manualContourModel *_mContourModel;
120 std::vector<double> _KeyContourX;
121 std::vector<double> _KeyContourY;
122 std::vector<double> _KeyContourZ;
123 std::vector<int> _KeyContourSizes;
125 std::vector<Vector> _planevector;
127 #endif // __Propagation_h_INCLUDED__