]> Creatis software - creaVtk.git/commitdiff
#2671 creaVtk Feature New Normal - VectorsExtraction
authorespinosa <Monica.Espinosa@creatis.insa-lyon.fr>
Wed, 15 Jul 2015 07:46:16 +0000 (09:46 +0200)
committerespinosa <Monica.Espinosa@creatis.insa-lyon.fr>
Wed, 15 Jul 2015 07:46:16 +0000 (09:46 +0200)
bbtk_creaVtk_PKG/src/bbcreaVtkVectorsExtraction.cxx

index e753ae38515c463e790784035831ee3a2a574c84..eae8d6767875548d4c35c5c1bc5f99e049598359 100644 (file)
@@ -39,19 +39,20 @@ void VectorsExtraction::Process()
       std::vector<double> coord           = bbGetInputCoordinates();
       std::vector<double> 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<double *> (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()<<std::endl;
       std::cout<< "# tuples velocity: " << velocity->GetNumberOfTuples()<<std::endl;
@@ -65,12 +66,12 @@ void VectorsExtraction::Process()
 
       //Miss calcule of angles -----
 
-      ang1 = vec[0];
-               ang2 = vec[1];
-               m_VectorImage->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