]> Creatis software - bbtk.git/blob - packages/vtk/src/bbvtkPointsXYZtoVTKPoints.cxx
#3008 BBTK Feature New Normal - Active option in box vtk::IsoSurfaceExtractor
[bbtk.git] / packages / vtk / src / bbvtkPointsXYZtoVTKPoints.cxx
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 #include "bbvtkPointsXYZtoVTKPoints.h"
5 #include "bbvtkPackage.h"
6 namespace bbvtk
7 {
8
9 BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,PointsXYZtoVTKPoints)
10 BBTK_BLACK_BOX_IMPLEMENTATION(PointsXYZtoVTKPoints,bbtk::AtomicBlackBox);
11 //===== 
12 // 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)
13 //===== 
14 void PointsXYZtoVTKPoints::Process()
15 {
16         std::vector<int> lstPointsX = bbGetInputLstPointsX();
17         std::vector<int> lstPointsY = bbGetInputLstPointsY();
18         std::vector<int> lstPointsZ = bbGetInputLstPointsZ();
19         if(_points==NULL)
20         {
21                 _points=vtkPoints::New();
22         } else {
23                 _points->Reset();//CLEAR
24         }
25         double point[3];
26         point[0]=0;
27         point[1]=0;
28         point[2]=0;
29         for (int i =0; i < lstPointsX.size(); ++i)
30         {
31                 point[0]=lstPointsX[i];
32                 if (lstPointsY.size()>i) { point[1]=lstPointsY[i]; }
33                 if (lstPointsZ.size()>i) { point[2]=lstPointsZ[i]; }
34                 _points->InsertPoint(i,point);
35         }
36         bbSetOutputPoints(_points);
37 }
38 //===== 
39 // 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)
40 //===== 
41 void PointsXYZtoVTKPoints::bbUserSetDefaultValues()
42 {
43   _points=NULL;
44 }
45 //===== 
46 // 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)
47 //===== 
48 void PointsXYZtoVTKPoints::bbUserInitializeProcessing()
49 {
50
51
52   
53 }
54 //===== 
55 // 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)
56 //===== 
57 void PointsXYZtoVTKPoints::bbUserFinalizeProcessing()
58 {
59
60         _points->Delete();
61   
62 }
63 }
64 // EO namespace bbvtk
65
66