]> Creatis software - creaRigidRegistration.git/blob - PackRecalage/src/bbPackRecalageGridOnImageGenerator.cxx
23cb540786cd2280c3e6251da80973ba665254d4
[creaRigidRegistration.git] / PackRecalage / src / bbPackRecalageGridOnImageGenerator.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 "bbPackRecalageGridOnImageGenerator.h"
5 #include "bbPackRecalagePackage.h"
6 namespace bbPackRecalage
7 {
8
9 BBTK_ADD_BLACK_BOX_TO_PACKAGE(PackRecalage,GridOnImageGenerator)
10 BBTK_BLACK_BOX_IMPLEMENTATION(GridOnImageGenerator,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 GridOnImageGenerator::Process()
15 {
16         std::cout << "GridOnImageGenerator" << std::endl;
17         //Variables
18         vtkImageData* inImage = NULL;
19         vtkImageData* outputImage = NULL;
20         double gridSpcX = 0, gridSpcY = 0, gridSpcZ = 0;
21
22         //Get inputs
23         inImage = bbGetInputIn();
24         gridSpcX = bbGetInputGridSpcX();
25         gridSpcY = bbGetInputGridSpcY();
26         gridSpcZ = bbGetInputGridSpcZ();
27
28         //Grid on image generator
29         gridOnImageGenerator = new MyGridOnImageGenerator(inImage, gridSpcX, gridSpcY, gridSpcZ);
30
31         outputImage = gridOnImageGenerator->getGridOnImage();
32     bbSetOutputOut( outputImage );
33     std::cout << "GridOnImageGenerator ... OK" << std::endl;
34   
35 }
36 //===== 
37 // 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)
38 //===== 
39 void GridOnImageGenerator::bbUserSetDefaultValues()
40 {
41    bbSetInputIn(NULL);
42    bbSetInputGridSpcX(0);
43    bbSetInputGridSpcY(0);
44    bbSetInputGridSpcZ(0);
45 }
46 //===== 
47 // 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)
48 //===== 
49 void GridOnImageGenerator::bbUserInitializeProcessing()
50 {
51
52 //  THE INITIALIZATION METHOD BODY :
53 //    Here does nothing 
54 //    but this is where you should allocate the internal/output pointers 
55 //    if any 
56
57   
58 }
59 //===== 
60 // 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)
61 //===== 
62 void GridOnImageGenerator::bbUserFinalizeProcessing()
63 {
64
65         if(gridOnImageGenerator != NULL)
66                 delete gridOnImageGenerator;
67   
68 }
69 }
70 // EO namespace bbPackRecalage
71
72