X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaVtk%2FvtkVectorsVisu.cpp;h=eee31ee946f37e4b0db21185288911eaaf46fc01;hb=3582c0f9b8380fde739856aa6a188da3262cf03b;hp=184bd0f2a0e24dbbba38b29090e5e36d8261a84c;hpb=b96d51834755b248c7faf57e9864804b826e00ac;p=creaVtk.git diff --git a/lib/creaVtk/vtkVectorsVisu.cpp b/lib/creaVtk/vtkVectorsVisu.cpp index 184bd0f..eee31ee 100644 --- a/lib/creaVtk/vtkVectorsVisu.cpp +++ b/lib/creaVtk/vtkVectorsVisu.cpp @@ -38,8 +38,23 @@ vtkVectorsVisu::vtkVectorsVisu() :vtkVectorsTensorsVisuBase() { _vtkarrowsource = vtkArrowSource::New(); +<<<<<<< HEAD _vtklinesource = vtkLineSource::New(); +======= +>>>>>>> master _vtkglyph = vtkGlyph3D::New(); + _vtklinesource = vtkLineSource::New(); + + double point1[3]; + double point2[3]; + point1[0]=1; + point1[1]=0; + point1[2]=0; + point2[0]=-1; + point2[1]=0; + point2[2]=0; + _vtklinesource->SetPoint1( point1 ); + _vtklinesource->SetPoint2( point2 ); } //------------------------------------------------------------------------------ @@ -51,15 +66,21 @@ vtkVectorsVisu::~vtkVectorsVisu() //------------------------------------------------------------------------------ void vtkVectorsVisu::Process() { +<<<<<<< HEAD +======= +>>>>>>> master if(_active==true) { #if VTK_MAJOR_VERSION <= 5 _vtkglyph->SetInput( GetDataObject() ); +<<<<<<< HEAD #else _vtkglyph->SetInputData( GetDataObject() ); #endif +======= +>>>>>>> master if(GetTypeForm()==1) // source Arrow { #if VTK_MAJOR_VERSION <= 5 @@ -76,10 +97,10 @@ void vtkVectorsVisu::Process() _vtkglyph->SetSourceData( _vtklinesource->GetOutput() ); #endif } - _vtkglyph->SetScaleModeToScaleByVector(); _vtkglyph->SetColorModeToColorByVector(); _vtkglyph->SetScaleFactor( GetScaleFactor() ); +<<<<<<< HEAD _vtkglyph->Update(); @@ -89,16 +110,19 @@ void vtkVectorsVisu::Process() _pdm->SetInputData( _vtkglyph->GetOutput()); #endif +======= + _vtkglyph->Update(); + _pdm->SetInput( _vtkglyph->GetOutput()); +>>>>>>> master vtkPointData *data = _vtkglyph->GetOutput()->GetPointData(); //printf("EED -------------------------------------------\n"); //_vtkglyph->GetOutput()->Print(std::cout); //printf("EED -------------------------------------------\n"); //data->Print(std::cout); -printf("EED -------------------------------------------\n"); int i,sizeDa = data->GetNumberOfArrays(); -printf("EED vtkVectorsVisu::Process sizeDa %d \n", sizeDa ); for (i=0;iGetArrayName(i) ); } @@ -114,6 +138,11 @@ for (i=0;iGetPointData()->AddArray( nda ); //EED2 _pdm->ScalarVisibilityOn(); +======= + data->GetArray(i)->Print(std::cout); +} + +>>>>>>> master _pdm->ScalarVisibilityOn(); _pdm->SetColorModeToMapScalars(); //_pdm->SetColorModeToDefault();