]> Creatis software - creaVtk.git/blob - bbtk_creaVtk_PKG/src/bbcreaVtkHeartAngles.cxx
2284 creaVtk Feature New Normal Plane Source 2014-02-03 16:49
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkHeartAngles.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 "bbcreaVtkHeartAngles.h"
5 #include "bbcreaVtkPackage.h"
6 #include "creaVtkHeartAngles.h"
7
8 namespace bbcreaVtk
9 {
10
11 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,HeartAngles)
12 BBTK_BLACK_BOX_IMPLEMENTATION(HeartAngles,bbtk::AtomicBlackBox);
13 //===== 
14 // 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)
15 //===== 
16 void HeartAngles::Process()
17 {
18         std::cout << "CFT HeartAngles::Process() Start"<<std::endl;
19         creaVtkHeartAngles ha;
20         
21         //ha.calculateImages (bbGetInputImage(), bbGetInputPlanePoint()[0], bbGetInputPlanePoint()[1], bbGetInputPlanePoint()[2], bbGetInputVector()[0], bbGetInputVector()[1], bbGetInputVector()[2], bbGetInputNormal()[0], bbGetInputNormal()[1], bbGetInputNormal()[2], bbGetInputPoint2()[0], bbGetInputPoint2()[1], bbGetInputPoint2()[2]);
22 //      bbSetOutputAlphaImage(ha.getAlphaImage());
23         double p2x = bbGetInputNormal()[0]+ bbGetInputPlanePoint()[0];
24         double p2y = bbGetInputNormal()[1]+ bbGetInputPlanePoint()[1];
25         double p2z = bbGetInputNormal()[2]+ bbGetInputPlanePoint()[2];
26
27         double Nx = bbGetInputNormal()[0];
28         double Ny = bbGetInputNormal()[1];
29         double Nz = bbGetInputNormal()[2];
30
31         double Px = bbGetInputPlanePoint()[0];
32         double Py = bbGetInputPlanePoint()[1];
33         double Pz = bbGetInputPlanePoint()[2];
34
35         ha.calculateImages (bbGetInputImage(), Px, Py, Pz, Nx, Ny, Nz, p2x, p2y, p2z);
36         bbSetOutputAlphaImage(ha.getAlphaImage());
37         bbSetOutputBetaImage(ha.getBetaImage());
38         std::cout << "CFT HeartAngles::Process() End"<<std::endl;
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 HeartAngles::bbUserSetDefaultValues()
44 {
45   
46 }
47 //===== 
48 // 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)
49 //===== 
50 void HeartAngles::bbUserInitializeProcessing()
51 {
52
53 //  THE INITIALIZATION METHOD BODY :
54 //    Here does nothing 
55 //    but this is where you should allocate the internal/output pointers 
56 //    if any 
57
58   
59 }
60 //===== 
61 // 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)
62 //===== 
63 void HeartAngles::bbUserFinalizeProcessing()
64 {
65
66 //  THE FINALIZATION METHOD BODY :
67 //    Here does nothing 
68 //    but this is where you should desallocate the internal/output pointers 
69 //    if any
70   
71 }
72 }
73 // EO namespace bbcreaVtk
74
75