]> Creatis software - bbtk.git/blob - packages/itkvtk/src/bbitkvtkGeodesicMeshDeformation.h
1ba0448086a545312586f212e4b2e42e619bca75
[bbtk.git] / packages / itkvtk / src / bbitkvtkGeodesicMeshDeformation.h
1 //===== 
2 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
3 //===== 
4 #ifndef __bbitkvtkGeodesicMeshDeformation_h_INCLUDED__
5 #define __bbitkvtkGeodesicMeshDeformation_h_INCLUDED__
6
7 #include "bbitkvtk_EXPORT.h"
8 #include "bbtkAtomicBlackBox.h"
9 #include "iostream"
10
11 #include "vtkPolyData.h"
12 #include "itkQuadEdgeMesh.h"
13 #include "itkFastMarchingThresholdStoppingCriterion.h"
14 //#include "itkFastMarchingQuadEdgeMeshFilterBase.h"
15 #include "itkFastMarchingQuadEdgeMeshFilterResultsBase.h"
16
17 namespace bbitkvtk
18 {
19
20 class bbitkvtk_EXPORT GeodesicMeshDeformation
21  : 
22    public bbtk::AtomicBlackBox
23 {
24   BBTK_BLACK_BOX_INTERFACE(GeodesicMeshDeformation,bbtk::AtomicBlackBox);
25 //===== 
26 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
27 //===== 
28   BBTK_DECLARE_INPUT(Active, bool);
29   BBTK_DECLARE_INPUT(TypeIn, int);
30   BBTK_DECLARE_INPUT(In,vtkPolyData*);
31   BBTK_DECLARE_INPUT(EdgeId, long);
32   BBTK_DECLARE_INPUT(S, double);
33   BBTK_DECLARE_INPUT(Center, std::vector<double>);
34   BBTK_DECLARE_INPUT(Direction, std::vector<double>);
35   //BBTK_DECLARE_OUTPUT(Out,double);
36   BBTK_PROCESS(Process);
37   void Process();
38   
39   using MeshType = itk::QuadEdgeMesh<double, 3>;
40   using FastMarchingType = itk::FastMarchingQuadEdgeMeshFilterResultsBase<MeshType, MeshType>;
41   
42         long                                                                    EdgeIdBack;
43         std::vector<int>                                        voiIdPoints;
44         std::vector<double>                                     backLstCenter;
45         vtkPolyData                                                     *polydata;
46         MeshType::Pointer                                               quadEdgeMesh;
47         double                                                                  sCurrent;
48         FastMarchingType::Pointer                               fmmFilter;
49         bool                                                                    firstTime;
50 //===== 
51 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
52 //===== 
53 };
54
55 BBTK_BEGIN_DESCRIBE_BLACK_BOX(GeodesicMeshDeformation,bbtk::AtomicBlackBox);
56 BBTK_NAME("GeodesicMeshDeformation");
57 BBTK_AUTHOR("InfoDev");
58 BBTK_DESCRIPTION("No Description.");
59 BBTK_CATEGORY("empty");
60 BBTK_INPUT(GeodesicMeshDeformation,Active,"(default true) true/false",bool,"");
61 BBTK_INPUT(GeodesicMeshDeformation,TypeIn,"(default 0) 0:Direction  1:Center",int,"");
62 BBTK_INPUT(GeodesicMeshDeformation,In,"vtk PolyData",vtkPolyData*,"");
63 BBTK_INPUT(GeodesicMeshDeformation,EdgeId,"Edge Id",long,"");
64 BBTK_INPUT(GeodesicMeshDeformation,S,"Deformation",double,"");
65 BBTK_INPUT(GeodesicMeshDeformation,Center,"[X,Y,Z]",std::vector<double>,"");
66 BBTK_INPUT(GeodesicMeshDeformation,Direction,"(default [1,0,0])   [X,Y,Z]",std::vector<double>,"");
67 BBTK_END_DESCRIBE_BLACK_BOX(GeodesicMeshDeformation);
68 //===== 
69 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
70 //===== 
71 }
72 // EO namespace bbitkvtk
73
74 #endif // __bbitkvtkGeodesicMeshDeformation_h_INCLUDED__
75