From a4ea6666ebd55839aef25e255d3337340c088284 Mon Sep 17 00:00:00 2001 From: espinosa Date: Wed, 15 Jul 2015 09:46:16 +0200 Subject: [PATCH] #2671 creaVtk Feature New Normal - VectorsExtraction --- .../src/bbcreaVtkVectorsExtraction.cxx | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkVectorsExtraction.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkVectorsExtraction.cxx index e753ae3..eae8d67 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkVectorsExtraction.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkVectorsExtraction.cxx @@ -39,19 +39,20 @@ void VectorsExtraction::Process() std::vector coord = bbGetInputCoordinates(); std::vector vec; + vec.push_back(0); + vec.push_back(0); + vec.push_back(0); + double ang1 = 0;//Angle 1 double ang2 = 0;//ANgle 2 - // double *v = static_cast (m_VectorImage->GetScalarPointer(coord[0],coord[1],coord[2])); - - //Find coordinate into the image m_idType = m_VectorImage->FindPoint(coord[0],coord[1],coord[2]); std::cout << m_idType; //Recuperate vector of vectorFieldImage velocity = vtkDoubleArray::SafeDownCast(m_VectorImage->GetPointData()->GetArray("velocity")); - velocity->Print(std::cout); + //velocity->Print(std::cout); std::cout<< "# components velocity: " << velocity->GetNumberOfComponents()<GetNumberOfTuples()<Print(std::cout); + ang1 = vec[0]*80; + ang2 = vec[1]*10; + //m_VectorImage->Print(std::cout); - bbSetOutputAngle1(ang1); - bbSetOutputAngle2(ang2); + bbSetOutputAngle1(ang1); + bbSetOutputAngle2(ang2); bbSetOutputVector(vec); }// if image != NULL -- 2.47.1