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