]> Creatis software - creaVtk.git/blobdiff - bbtk_creaVtk_PKG/src/bbcreaVtkHeartAngles.cxx
2209 creaVtk Feature New Normal Correction of Heart Angles Box 2013-12-13 16:50
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkHeartAngles.cxx
index b0c90795d463c4b9ea8c018f1dfc990fc7927369..fc496d08768fb74c82d5611f1dc9da366ecbf8e3 100644 (file)
@@ -3,6 +3,8 @@
 //===== 
 #include "bbcreaVtkHeartAngles.h"
 #include "bbcreaVtkPackage.h"
+#include "creaVtkHeartAngles.h"
+
 namespace bbcreaVtk
 {
 
@@ -13,7 +15,27 @@ BBTK_BLACK_BOX_IMPLEMENTATION(HeartAngles,bbtk::AtomicBlackBox);
 //===== 
 void HeartAngles::Process()
 {
+       std::cout << "CFT HeartAngles::Process() Start"<<std::endl;
+       creaVtkHeartAngles ha;
+       
+       //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]);
+//     bbSetOutputAlphaImage(ha.getAlphaImage());
+       double p2x = bbGetInputNormal()[0]+ bbGetInputPlanePoint()[0];
+       double p2y = bbGetInputNormal()[1]+ bbGetInputPlanePoint()[1];
+       double p2z = bbGetInputNormal()[2]+ bbGetInputPlanePoint()[2];
+
+       double Nx = bbGetInputNormal()[0];
+       double Ny = bbGetInputNormal()[1];
+       double Nz = bbGetInputNormal()[2];
+
+       double Px = bbGetInputPlanePoint()[0];
+       double Py = bbGetInputPlanePoint()[1];
+       double Pz = bbGetInputPlanePoint()[2];
 
+       ha.calculateImages (bbGetInputImage(), Px, Py, Pz, Nx, Ny, Nz, p2x, p2y, p2z);
+       bbSetOutputAlphaImage(ha.getAlphaImage());
+       bbSetOutputBetaImage(ha.getBetaImage());
+       std::cout << "CFT HeartAngles::Process() End"<<std::endl;
 }
 //===== 
 // 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)