X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk_creaVtk_PKG%2Fsrc%2FbbcreaVtkVectorsExtraction.cxx;h=eae8d6767875548d4c35c5c1bc5f99e049598359;hb=a4ea6666ebd55839aef25e255d3337340c088284;hp=e753ae38515c463e790784035831ee3a2a574c84;hpb=cf3087440ef51f6ed4bfd1cdda5b8a14148bc51d;p=creaVtk.git 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