]> Creatis software - creaRigidRegistration.git/blob - PackRecalage/src/bbPackRecalageAddImageToVector.cxx
#3468 CompareImages new version
[creaRigidRegistration.git] / PackRecalage / src / bbPackRecalageAddImageToVector.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 "bbPackRecalageAddImageToVector.h"
5 #include "bbPackRecalagePackage.h"
6
7 namespace bbPackRecalage
8 {
9
10 BBTK_ADD_BLACK_BOX_TO_PACKAGE(PackRecalage,AddImageToVector)
11 BBTK_BLACK_BOX_IMPLEMENTATION(AddImageToVector,bbtk::AtomicBlackBox);
12 //===== 
13 // 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)
14 //===== 
15 void AddImageToVector::Process()
16 {
17
18 // THE MAIN PROCESSING METHOD BODY
19 //   Here we simply set the input 'In' value to the output 'Out'
20 //   And print out the output value
21 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
22 //    void bbSet{Input|Output}NAME(const TYPE&)
23 //    const TYPE& bbGet{Input|Output}NAME() const 
24 //    Where :
25 //    * NAME is the name of the input/output
26 //      (the one provided in the attribute 'name' of the tag 'input')
27 //    * TYPE is the C++ type of the input/output
28 //      (the one provided in the attribute 'type' of the tag 'input')
29
30 //    bbSetOutputOut( bbGetInputIn() );
31 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
32    std::vector<vtkImageData*> lstImages=bbGetInputImageVector();
33    if (bbGetInputIn0()!=NULL) { lstImages.push_back( bbGetInputIn0() ); }
34    if (bbGetInputIn1()!=NULL) { lstImages.push_back( bbGetInputIn1() ); }
35    if (bbGetInputIn2()!=NULL) { lstImages.push_back( bbGetInputIn2() ); }
36    if (bbGetInputIn3()!=NULL) { lstImages.push_back( bbGetInputIn3() ); }
37    if (bbGetInputIn4()!=NULL) { lstImages.push_back( bbGetInputIn4() ); }
38    if (bbGetInputIn5()!=NULL) { lstImages.push_back( bbGetInputIn5() ); }
39    if (bbGetInputIn6()!=NULL) { lstImages.push_back( bbGetInputIn6() ); }
40    if (bbGetInputIn7()!=NULL) { lstImages.push_back( bbGetInputIn7() ); }
41    if (bbGetInputIn8()!=NULL) { lstImages.push_back( bbGetInputIn8() ); }
42    if (bbGetInputIn9()!=NULL) { lstImages.push_back( bbGetInputIn9() ); }
43    bbSetOutputOut(lstImages);  
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 AddImageToVector::bbUserSetDefaultValues()
49 {
50
51 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
52 //    Here we initialize the input 'In' to 0
53    bbSetInputIn0(NULL);
54    bbSetInputIn1(NULL);
55    bbSetInputIn2(NULL);
56    bbSetInputIn3(NULL);
57    bbSetInputIn4(NULL);
58    bbSetInputIn5(NULL);
59    bbSetInputIn6(NULL);
60    bbSetInputIn7(NULL);
61    bbSetInputIn8(NULL);
62    bbSetInputIn9(NULL);
63    std::vector<vtkImageData*> lstImages;
64    bbSetInputImageVector(lstImages);  
65 }
66 //===== 
67 // 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)
68 //===== 
69 void AddImageToVector::bbUserInitializeProcessing()
70 {
71
72 //  THE INITIALIZATION METHOD BODY :
73 //    Here does nothing 
74 //    but this is where you should allocate the internal/output pointers 
75 //    if any 
76
77   
78 }
79 //===== 
80 // 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)
81 //===== 
82 void AddImageToVector::bbUserFinalizeProcessing()
83 {
84
85 //  THE FINALIZATION METHOD BODY :
86 //    Here does nothing 
87 //    but this is where you should desallocate the internal/output pointers 
88 //    if any
89   
90 }
91 }
92 // EO namespace bbPackRecalage
93
94