From: Eduardo DAVILA Date: Thu, 17 Aug 2017 15:48:31 +0000 (+0200) Subject: #3110 creaVtk Bug New Normal - branch vtk7itk4 compilation with vtk7 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=8bfff910147ed9b3e76f839f63abee27da8860b5;p=creaVtk.git #3110 creaVtk Bug New Normal - branch vtk7itk4 compilation with vtk7 --- diff --git a/bbtk_creaVtk_PKG/bbs/appli/exampleVectorsVisu.bbg b/bbtk_creaVtk_PKG/bbs/appli/exampleVectorsVisu.bbg index b39e036..f85616b 100644 --- a/bbtk_creaVtk_PKG/bbs/appli/exampleVectorsVisu.bbg +++ b/bbtk_creaVtk_PKG/bbs/appli/exampleVectorsVisu.bbg @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.4 BBG BlackBox Diagram file -# - /home/davila/Creatis/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleVectorsVisu.bbg +# - /tmpEED/creaTools2/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleVectorsVisu.bbg # ---------------------------------- APP_START @@ -9,12 +9,12 @@ DESCRIPTION:Description ?? AUTHOR:Author ?? COMPLEXBOX:FALSE COMPLEXINPUTS:0 -BOXES:8 +BOXES:10 BOX vtk:MaskPoint:Box01 ISEXEC:FALSE -87.126923:-1.070619:-900.000000 --41.551923:-11.070619:-900.000000 +-50.976923:-11.070619:-900.000000 PORT Ratio:"1" FIN_BOX @@ -22,7 +22,7 @@ BOX creaVtk:VectorsVisu:Box02 ISEXEC:FALSE -38.604946:-35.505673:-900.000000 -6.970054:-45.505673:-900.000000 +-0.979946:-45.505673:-900.000000 PORT ScaleFactor:"100" FIN_BOX @@ -30,7 +30,7 @@ BOX creaMaracasVisu:ViewerNV:Box03 ISEXEC:FALSE 27.598176:-3.687687:-900.000000 -73.173176:-13.687687:-900.000000 +91.318176:-13.687687:-900.000000 PORT nTypeView:"5" FIN_BOX @@ -38,7 +38,7 @@ BOX wx:CommandButton:Box04 ISEXEC:FALSE 0.713746:16.059283:-900.000000 -46.288746:6.059283:-900.000000 +43.488746:6.059283:-900.000000 PORT Label:"Run" FIN_BOX @@ -46,7 +46,7 @@ BOX wx:LayoutSplit:Box05 ISEXEC:TRUE 20.586047:-67.968368:-900.000000 -66.161047:-77.968368:-900.000000 +59.666047:-77.968368:-900.000000 PORT Proportion:"10" FIN_BOX @@ -54,23 +54,37 @@ BOX wx:FileSelector:Box06 ISEXEC:FALSE -79.676950:57.942181:-900.000000 --34.101950:47.942181:-900.000000 +-42.301950:47.942181:-900.000000 FIN_BOX BOX vtk:LoadHola:Box07 ISEXEC:FALSE 68.757525:22.245082:-900.000000 -114.332525:12.245082:-900.000000 +104.307525:12.245082:-900.000000 FIN_BOX BOX vtk:StructuredPointsReader:Box08 ISEXEC:FALSE -77.679349:22.958827:-900.000000 --6.504349:12.958827:-900.000000 +-28.979349:12.958827:-900.000000 PORT In:"/home/davila/Creatis/creaVtk/data/Vectors.vtk" FIN_BOX -CONNECTIONS:7 +BOX +std:ConcatStrings:Box09 +ISEXEC:FALSE +-9.468286:43.584173:-900.000000 +30.256714:33.584173:-900.000000 +PORT +In2:"/creaVtk/Vectors.vtk" +FIN_BOX +BOX +std:Configuration:Box10 +ISEXEC:FALSE +8.566544:63.723067:-900.000000 +47.991544:53.723067:-900.000000 +FIN_BOX +CONNECTIONS:9 CONNECTION Box01:Out:Box02:In NumberOfControlPoints:0 @@ -92,4 +106,10 @@ NumberOfControlPoints:0 CONNECTION Box08:Out:Box01:In NumberOfControlPoints:0 +CONNECTION +Box10:DataPath:Box09:In1 +NumberOfControlPoints:0 +CONNECTION +Box09:Out:Box08:In +NumberOfControlPoints:0 APP_END diff --git a/bbtk_creaVtk_PKG/bbs/appli/exampleVectorsVisu.bbs b/bbtk_creaVtk_PKG/bbs/appli/exampleVectorsVisu.bbs index aab35e2..0b0627a 100644 --- a/bbtk_creaVtk_PKG/bbs/appli/exampleVectorsVisu.bbs +++ b/bbtk_creaVtk_PKG/bbs/appli/exampleVectorsVisu.bbs @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.4 BBS BlackBox Script -# - /home/davila/Creatis/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleVectorsVisu.bbs +# - /tmpEED/creaTools2/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/appli/exampleVectorsVisu.bbs # ---------------------------------- # BBTK GEditor Script @@ -12,33 +12,39 @@ include vtk include creaVtk include creaMaracasVisu include wx +include std author "Author ??" description "Description ??" category "" -new MaskPoint Box01 +new vtk:MaskPoint Box01 set Box01.Ratio "1" -new VectorsVisu Box02 +new creaVtk:VectorsVisu Box02 set Box02.ScaleFactor "100" -new ViewerNV Box03 +new creaMaracasVisu:ViewerNV Box03 set Box03.nTypeView "5" -new CommandButton Box04 +new wx:CommandButton Box04 set Box04.Label "Run" -new LayoutSplit Box05 +new wx:LayoutSplit Box05 set Box05.Proportion "10" -new FileSelector Box06 +new wx:FileSelector Box06 -new LoadHola Box07 +new vtk:LoadHola Box07 -new StructuredPointsReader Box08 +new vtk:StructuredPointsReader Box08 set Box08.In "/home/davila/Creatis/creaVtk/data/Vectors.vtk" +new std:ConcatStrings Box09 + set Box09.In2 "/creaVtk/Vectors.vtk" + +new std:Configuration Box10 + connect Box01.Out Box02.In @@ -54,6 +60,10 @@ connect Box07.Out Box03.In connect Box08.Out Box01.In +connect Box10.DataPath Box09.In1 + +connect Box09.Out Box08.In + # Complex input ports diff --git a/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbg b/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbg index c1e5411..8ee2308 100644 --- a/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbg +++ b/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbg @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.4 BBG BlackBox Diagram file -# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbg +# - /tmpEED/creaTools2/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbg # ---------------------------------- APP_START @@ -28,78 +28,62 @@ COMPLEX_PORT renderer -52.117833:88.203991:-900.000000 FIN_COMPLEX_PORT -BOXES:10 +BOXES:8 BOX creaVtk:VectorsVisu:Box00 ISEXEC:FALSE -2.817636:-56.941435:-900.000000 -42.757364:-66.941435:-900.000000 +34.807364:-66.941435:-900.000000 FIN_BOX BOX creaVtk:PlaneWidget:Box01 ISEXEC:FALSE -66.409855:2.022991:-900.000000 --20.834855:-7.977009:-900.000000 +-27.884855:-7.977009:-900.000000 FIN_BOX BOX vtk:ProbeFilter:Box03 ISEXEC:FALSE -29.657798:-23.712064:-900.000000 -15.917202:-33.712064:-900.000000 +6.742202:-33.712064:-900.000000 FIN_BOX BOX vtk:vtkImageDataPointerRelay:Box04 ISEXEC:FALSE 31.994878:59.395975:-900.000000 -103.169878:49.395975:-900.000000 +84.169878:49.395975:-900.000000 FIN_BOX BOX std:MagicBox:Box05 ISEXEC:FALSE -63.018802:49.434694:-900.000000 --17.443802:39.434694:-900.000000 +-26.943802:39.434694:-900.000000 FIN_BOX BOX creaVtk:PlaneVectorViso_Interface:Box06 ISEXEC:FALSE 53.843860:42.438188:-900.000000 -125.018860:32.438188:-900.000000 +105.768860:32.438188:-900.000000 PORT typeFormsStr:"Line Arrow" FIN_BOX BOX -std:ExecSystemCommand:Box11 -ISEXEC:FALSE -90.911957:-18.902735:-900.000000 -162.086957:-28.902735:-900.000000 -PORT -In:"echo pppppppp" -FIN_BOX -BOX vtk:UpdateRender:Box13 ISEXEC:FALSE -129.325679:-71.617843:-900.000000 --83.750679:-81.617843:-900.000000 +-89.000679:-81.617843:-900.000000 PORT Active:"true" PORT BoxProcessMode:"Reactive" FIN_BOX BOX -std:ExecSystemCommand:Box14 -ISEXEC:FALSE --68.601930:-72.048687:-900.000000 -2.573070:-82.048687:-900.000000 -PORT -In:"echo ccccccccccccccccc" -FIN_BOX -BOX std:SharedMemory:Box15 ISEXEC:FALSE -79.072661:-36.761184:-900.000000 --33.497661:-46.761184:-900.000000 +-37.897661:-46.761184:-900.000000 FIN_BOX -CONNECTIONS:22 +CONNECTIONS:21 CONNECTION Box03:Out:Box00:In NumberOfControlPoints:0 @@ -146,15 +130,9 @@ CONNECTION Box06:typeForm:Box00:TypeForm NumberOfControlPoints:0 CONNECTION -Box06:boxChange:Box11:BoxExecute -NumberOfControlPoints:0 -CONNECTION Box05:Out:Box13:Renderer NumberOfControlPoints:0 CONNECTION -Box15:Out:Box14:BoxExecute -NumberOfControlPoints:0 -CONNECTION Box15:Out:Box00:BoxExecute NumberOfControlPoints:0 CONNECTION @@ -166,4 +144,7 @@ NumberOfControlPoints:0 CONNECTION Box15:Out:Box13:BoxExecute NumberOfControlPoints:0 +CONNECTION +Box01:BoxChange:Box15:In2 +NumberOfControlPoints:0 APP_END diff --git a/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbs b/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbs index 9cfe787..b22e2a9 100644 --- a/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbs +++ b/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbs @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box) -# - /home/davila/Creatis/creaTools/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbs +# - /tmpEED/creaTools2/creatools_source/creaVtk/bbtk_creaVtk_PKG/bbs/boxes/PlaneVectorVisu_Widget.bbs # ---------------------------------- include std @@ -16,30 +16,24 @@ description "Description ??" category "" -new VectorsVisu Box00 +new creaVtk:VectorsVisu Box00 -new PlaneWidget Box01 +new creaVtk:PlaneWidget Box01 -new ProbeFilter Box03 +new vtk:ProbeFilter Box03 -new vtkImageDataPointerRelay Box04 +new vtk:vtkImageDataPointerRelay Box04 -new MagicBox Box05 +new std:MagicBox Box05 -new PlaneVectorViso_Interface Box06 +new creaVtk:PlaneVectorViso_Interface Box06 set Box06.typeFormsStr "Line Arrow" -new ExecSystemCommand Box11 - set Box11.In "echo pppppppp" - -new UpdateRender Box13 +new vtk:UpdateRender Box13 set Box13.Active "true" set Box13.BoxProcessMode "Reactive" -new ExecSystemCommand Box14 - set Box14.In "echo ccccccccccccccccc" - -new SharedMemory Box15 +new std:SharedMemory Box15 connect Box03.Out Box00.In @@ -54,12 +48,11 @@ connect Box06.Opacity Box00.Opacity connect Box06.ScaleFactor Box00.ScaleFactor connect Box06.Ratio Box01.Resolution connect Box06.typeForm Box00.TypeForm -connect Box06.boxChange Box11.BoxExecute connect Box05.Out Box13.Renderer -connect Box15.Out Box14.BoxExecute connect Box15.Out Box00.BoxExecute connect Box06.boxChange Box15.In1 connect Box15.Out Box13.BoxExecute +connect Box01.BoxChange Box15.In2 # Complex input ports input vtkImageData Box04.In " " diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkVectorsVisu.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkVectorsVisu.cxx index 080382f..062e8e7 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkVectorsVisu.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkVectorsVisu.cxx @@ -26,20 +26,6 @@ void VectorsVisu::Process() // * TYPE is the C++ type of the input/output // (the one provided in the attribute 'type' of the tag 'input') -printf("EED VectorsVisu::Process Start \n"); - -if ( bbGetInputActive()==true) -{ - printf("EED VectorsVisu::Process active = true \n"); -} else { - printf("EED VectorsVisu::Process active = false \n"); -} - - printf("EED VectorsVisu::Process In = %p\n",bbGetInputIn() ); - printf("EED VectorsVisu::Process ScaleFactor = %f\n",bbGetInputScaleFactor() ); - printf("EED VectorsVisu::Process Opacity = %f\n",bbGetInputOpacity() ); - printf("EED VectorsVisu::Process Renderer = %p\n",bbGetInputRenderer() ); - vectorsvisu.SetActive( bbGetInputActive() ); vectorsvisu.SetDataObject( bbGetInputIn() ); vectorsvisu.SetScaleFactor( bbGetInputScaleFactor() ); @@ -48,7 +34,6 @@ if ( bbGetInputActive()==true) vectorsvisu.SetTypeForm( bbGetInputTypeForm() ); vectorsvisu.Process(); bbSetOutputOut( vectorsvisu.GetProp3D() ); -printf("EED VectorsVisu::Process End\n"); } //===== diff --git a/lib/creaVtk/vtkTensorsVisu.cpp b/lib/creaVtk/vtkTensorsVisu.cpp index 81bcef7..9a53519 100644 --- a/lib/creaVtk/vtkTensorsVisu.cpp +++ b/lib/creaVtk/vtkTensorsVisu.cpp @@ -52,7 +52,6 @@ vtkTensorsVisu::~vtkTensorsVisu() //------------------------------------------------------------------------ void vtkTensorsVisu::Process() { -printf("EED vtkTensorsVisu::Process() start\n"); if (_active==true) { if(GetTypeForm()==2) // source superquadratic @@ -62,18 +61,21 @@ printf("EED vtkTensorsVisu::Process() start\n"); #if VTK_MAJOR_VERSION <= 5 tg->SetSource(superquadratic->GetOutput()); #else + superquadratic->Update(); tg->SetSourceData(superquadratic->GetOutput()); #endif } else if(GetTypeForm()==1) { // source sphere #if VTK_MAJOR_VERSION <= 5 tg->SetSource(ss->GetOutput()); #else + ss->Update(); tg->SetSourceData(ss->GetOutput()); #endif } else { // source cube #if VTK_MAJOR_VERSION <= 5 tg->SetSource(cs->GetOutput()); #else + cs->Update(); tg->SetSourceData(cs->GetOutput()); #endif } @@ -87,9 +89,6 @@ printf("EED vtkTensorsVisu::Process() start\n"); // tg->SetScaling(25); tg->SetScaleFactor( GetScaleFactor() ); -printf("EED vtkTensorsVisu::Process() 1\n"); - - //The normals are needed to generate the right colors and if // not used some of the glyphs are black. //EED 2017-01-01 Migration VTK7 @@ -97,30 +96,18 @@ printf("EED vtkTensorsVisu::Process() 1\n"); pdn->SetInput(tg->GetOutput()); _pdm->SetInput( pdn->GetOutput() ); #else -printf("EED vtkTensorsVisu::Process() 1.1\n"); pdn->SetInputData(tg->GetOutput()); -printf("EED vtkTensorsVisu::Process() 1.2\n"); + pdn->Update(); _pdm->SetInputData( pdn->GetOutput() ); _pdm->Update(); #endif -printf("EED vtkTensorsVisu::Process() 1.3\n"); _actor->SetMapper( _pdm ); -printf("EED vtkTensorsVisu::Process() 1.4\n"); _actor->GetProperty()->SetOpacity( GetOpacity() ); - - - -printf("EED vtkTensorsVisu::Process() 1.5\n"); tg->SetColorModeToEigenvalues(); // tg->SetColorModeToScalars(); -printf("EED vtkTensorsVisu::Process() 1.6\n"); tg->Update(); -printf("EED vtkTensorsVisu::Process() 1.7\n"); - - - //EED 2017-01-01 Migration VTK7 #if VTK_MAJOR_VERSION <= 5 pd = tg->GetOutput(); @@ -131,9 +118,7 @@ printf("EED vtkTensorsVisu::Process() 1.7\n"); #endif pod = pd->GetPointData(); -printf("EED vtkTensorsVisu::Process() 1.8\n"); pod->Update(); -printf("EED vtkTensorsVisu::Process() 1.9\n"); tg->Update(); vtkPolyData *pd_pdn = pdn->GetOutput(); @@ -142,7 +127,6 @@ printf("EED vtkTensorsVisu::Process() 1.9\n"); vtkPolyData *pd_tg = tg->GetOutput(); vtkPointData *pointdata_tg = pd_tg->GetPointData(); -printf("EED vtkTensorsVisu::Process() 1.20\n"); vtkPolyData *pd_do = (vtkPolyData*)GetDataObject(); vtkPointData *pointdata_do = pd_do->GetPointData(); @@ -151,18 +135,12 @@ printf("EED vtkTensorsVisu::Process() 1.20\n"); vtkIdType numSourcePts; // vtkIdType numSourceCells; -printf("EED vtkTensorsVisu::Process() 1.22\n"); vtkPoints *sourcePts = tg->GetSource()->GetPoints(); -printf("EED vtkTensorsVisu::Process() 1.23\n"); numSourcePts = sourcePts->GetNumberOfPoints(); // numSourceCells = tg->GetSource()->GetNumberOfCells(); - -printf("EED vtkTensorsVisu::Process() 2\n"); - - vtkDataArray *tensorsArray = pointdata_do->GetArray("tensors"); if (tensorsArray) { @@ -218,12 +196,6 @@ printf("EED vtkTensorsVisu::Process() 2\n"); tg->Update(); } // if tensorsArray - - - - -printf("EED vtkTensorsVisu::Process() 3\n"); - _pdm->ScalarVisibilityOn(); _pdm->SetColorModeToMapScalars(); //_pdm->SetColorModeToDefault(); @@ -255,15 +227,7 @@ printf("EED vtkTensorsVisu::Process() 3\n"); } */ - - } // _active -printf("EED vtkTensorsVisu::Process() 4\n"); - - VisibilityActor(); - -printf("EED vtkTensorsVisu::Process() END\n"); - - + VisibilityActor(); } diff --git a/lib/creaVtk/vtkVectorsTensorsVisuBase.cpp b/lib/creaVtk/vtkVectorsTensorsVisuBase.cpp index 0322efc..094eebc 100644 --- a/lib/creaVtk/vtkVectorsTensorsVisuBase.cpp +++ b/lib/creaVtk/vtkVectorsTensorsVisuBase.cpp @@ -26,13 +26,8 @@ */ #include "vtkVectorsTensorsVisuBase.h" - - #include "vtkObjectFactory.h" - - - vtkStandardNewMacro(vtkLookupTableDirectionVector); // Construct with range=(0,1); and hsv ranges set up for rainbow color table @@ -48,14 +43,11 @@ vtkLookupTableDirectionVector::~vtkLookupTableDirectionVector() { } - - unsigned char *vtkLookupTableDirectionVector::MapValue(double v) { //int idx = this->GetIndex(v); - //return (this->Table->GetPointer(0) + 4*idx); - + //return (this->Table->GetPointer(0) + 4*idx); return 0; } @@ -151,7 +143,6 @@ inIncr=3; } - //---------------------------------------------------------------------------- void vtkLookupTableDirectionVector::MapScalarsThroughTable2(void *input, unsigned char *output, @@ -305,8 +296,6 @@ void vtkVectorsTensorsVisuBase::Process() // virtual { } - - //------------------------------------------------------------------------------ void vtkVectorsTensorsVisuBase::VisibilityActor() { @@ -328,7 +317,6 @@ void vtkVectorsTensorsVisuBase::VisibilityActor() } // if _active==false } - //------------------------------------------------------------------------------ void vtkVectorsTensorsVisuBase::SetColorLaw(int colorlaw) { diff --git a/lib/creaVtk/vtkVectorsTensorsVisuBase.h b/lib/creaVtk/vtkVectorsTensorsVisuBase.h index 1c9ba9e..831fc2c 100644 --- a/lib/creaVtk/vtkVectorsTensorsVisuBase.h +++ b/lib/creaVtk/vtkVectorsTensorsVisuBase.h @@ -28,7 +28,6 @@ #ifndef _VTKVECTORSTENSORSVISUBASE_H_ #define _VTKVECTORSTENSORSVISUBASE_H_ - #include "vtkActor.h" #include "vtkLookupTable.h" #include "vtkPolyDataMapper.h" @@ -36,15 +35,11 @@ #include "vtkSmartPointer.h" #include "vtkVectorNorm.h" - //--------------------------------------------- // Class Name: vtkVectorsTensorsVisuBase // [classdescription] //--------------------------------------------- - - - class /*VTK_COMMON_EXPORT*/ vtkLookupTableDirectionVector : public vtkScalarsToColors { public: @@ -71,14 +66,11 @@ public: void MapScalarsThroughTable2(void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputIncrement); - - + protected: - - double TableRange[2]; + double TableRange[2]; vtkLookupTableDirectionVector(int sze=256, int ext=256); ~vtkLookupTableDirectionVector(); - private: vtkLookupTableDirectionVector(const vtkLookupTableDirectionVector&); // Not implemented. @@ -86,18 +78,6 @@ private: }; - - - - - - - - - - - - class vtkVectorsTensorsVisuBase { @@ -117,16 +97,16 @@ public : void SetColorLaw(int); void SetColor(std::vector); - bool GetActive(); + bool GetActive(); vtkDataObject* GetDataObject(); - vtkRenderer* GetRenderer(); + vtkRenderer* GetRenderer(); double GetScaleFactor(); double GetOpacity(); vtkProp3D* GetProp3D(); int GetTypeForm(); virtual void Process(); - void VisibilityActor(); + void VisibilityActor(); @@ -140,25 +120,21 @@ protected: //Methods and attributes only visible by this class //--------------------------------------------- private: - bool _actorAdded; - - double _scalefactor; - double _opacity; - vtkDataObject *_dataobject; - vtkRenderer *_renderer; - int _typeForm; - + bool _actorAdded; + double _scalefactor; + double _opacity; + vtkDataObject *_dataobject; + vtkRenderer *_renderer; + int _typeForm; protected: - bool _firsttime; - bool _active; - - vtkSmartPointer _pdm; - vtkSmartPointer _actor; - vtkLookupTableDirectionVector *_LutEED; + bool _firsttime; + bool _active; + vtkSmartPointer _pdm; + vtkSmartPointer _actor; + vtkLookupTableDirectionVector *_LutEED; int _colorlaw; double _colorR,_colorG,_colorB; - }; //-end of _VTKVECTORSTENSORSVISUBASE_H_------------------------------------------------------ diff --git a/lib/creaVtk/vtkVectorsVisu.cpp b/lib/creaVtk/vtkVectorsVisu.cpp index 416a426..45276a5 100644 --- a/lib/creaVtk/vtkVectorsVisu.cpp +++ b/lib/creaVtk/vtkVectorsVisu.cpp @@ -42,16 +42,15 @@ vtkVectorsVisu::vtkVectorsVisu() _vtkglyph = vtkGlyph3D::New(); } - //------------------------------------------------------------------------------ vtkVectorsVisu::~vtkVectorsVisu() { } + //------------------------------------------------------------------------------ void vtkVectorsVisu::Process() { -printf("EED vtkVectorsVisu::Process Start\n"); if(_active==true) { @@ -64,14 +63,16 @@ printf("EED vtkVectorsVisu::Process Start\n"); if(GetTypeForm()==1) // source Arrow { #if VTK_MAJOR_VERSION <= 5 - _vtkglyph->SetSource( _vtkarrowsource->GetOutput() ); + _vtkglyph->SetSource( _vtkarrowsource->GetOutput() ); #else - _vtkglyph->SetSourceData( _vtkarrowsource->GetOutput() ); + _vtkarrowsource->Update(); + _vtkglyph->SetSourceData( _vtkarrowsource->GetOutput() ); #endif } else { // source Line #if VTK_MAJOR_VERSION <= 5 _vtkglyph->SetSource( _vtklinesource->GetOutput() ); #else + _vtklinesource->Update(); _vtkglyph->SetSourceData( _vtklinesource->GetOutput() ); #endif } @@ -79,8 +80,6 @@ printf("EED vtkVectorsVisu::Process Start\n"); _vtkglyph->SetScaleModeToScaleByVector(); _vtkglyph->SetColorModeToColorByVector(); _vtkglyph->SetScaleFactor( GetScaleFactor() ); -printf("EED vtkVectorsVisu::Process A\n" ); - _vtkglyph->Update(); @@ -117,10 +116,6 @@ for (i=0;iGetPointData()->AddArray( nda ); //EED2 _pdm->ScalarVisibilityOn(); - - - - _pdm->ScalarVisibilityOn(); _pdm->SetColorModeToMapScalars(); //_pdm->SetColorModeToDefault(); @@ -132,8 +127,6 @@ for (i=0;iSetVectorModeToRGBColors(); //_LutEED->SetVectorModeToMagnitud(); - - // _pdm->SetScalarModeToUsePointFieldData(); _pdm->SetLookupTable( _LutEED ); _pdm->SelectColorArray( "GlyphVector" ); @@ -151,11 +144,5 @@ for (i=0;i