]> Creatis software - bbtk.git/blob - packages/vtk/src/bbvtkPointsXYZtoVTKPoints.cxx
Feature #1886 Black boxes to measure lengths on images. Look into
[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
17         //std::cout << "RaC PointsXYZtoVTKPoints::Process START"<< std::endl;
18         std::vector<int> lstPointsX = bbGetInputLstPointsX();
19         std::vector<int> lstPointsY = bbGetInputLstPointsY();
20         std::vector<int> lstPointsZ = bbGetInputLstPointsZ();
21
22         if(_points==NULL)
23                 _points=vtkPoints::New();
24         else
25                 _points->Reset();//CLEAR
26
27         for (int i =0; i < lstPointsX.size(); ++i)
28         {
29                 double point[3];
30                 point[0]=lstPointsX[i];
31                 point[1]=lstPointsY[i];
32                 point[2]=lstPointsZ[i];
33                 _points->InsertPoint(i,point);
34         }
35         bbSetOutputPoints(_points);
36
37         //std::cout << "RaC PointsXYZtoVTKPoints::Process END"<< std::endl;
38   
39 }
40 //===== 
41 // 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)
42 //===== 
43 void PointsXYZtoVTKPoints::bbUserSetDefaultValues()
44 {
45
46
47   
48 }
49 //===== 
50 // 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)
51 //===== 
52 void PointsXYZtoVTKPoints::bbUserInitializeProcessing()
53 {
54
55
56   
57 }
58 //===== 
59 // 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)
60 //===== 
61 void PointsXYZtoVTKPoints::bbUserFinalizeProcessing()
62 {
63
64         _points->Delete();
65   
66 }
67 }
68 // EO namespace bbvtk
69
70