From: ouv Date: Fri, 5 Apr 2013 11:02:11 +0000 (+0000) Subject: Issue 0051837: TC7.2.0: The generated from table presentation not visible in VTK... X-Git-Tag: before_mergefrom_V6_main_12Apr13~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=24a493e8ebe112b72dce99ba853e904c0a848bbf;p=modules%2Fvisu.git Issue 0051837: TC7.2.0: The generated from table presentation not visible in VTK scene. --- diff --git a/src/CONVERTOR/VISU_TableReader.cxx b/src/CONVERTOR/VISU_TableReader.cxx index 1fb98131..2c6b3e89 100644 --- a/src/CONVERTOR/VISU_TableReader.cxx +++ b/src/CONVERTOR/VISU_TableReader.cxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -449,13 +450,16 @@ void VISU::ImportCSVTable(const char* theFileName, TTableContainer& theContainer VISU::TTableIDMapper ::TTableIDMapper(): myOutput( vtkPolyData::New() ), + myFilter( vtkPassThroughFilter::New() ), myXAxisPosition( -1 ) -{} +{ +} VISU::TTableIDMapper ::~TTableIDMapper() { myOutput->Delete(); + myFilter->Delete(); } vtkPolyData* @@ -468,6 +472,13 @@ VISU::TTableIDMapper return myOutput; } +vtkAlgorithmOutput* +VISU::TTableIDMapper +::GetOutputPort() +{ + return myFilter->GetOutputPort(); +} + long unsigned int VISU::TTableIDMapper ::GetMemorySize() @@ -577,5 +588,7 @@ VISU::TTableIDMapper aFilter->Update(); myOutput->ShallowCopy( aFilter->GetOutput() ); aFilter->Delete(); + + myFilter->SetInputData( myOutput ); } diff --git a/src/CONVERTOR/VISU_TableReader.hxx b/src/CONVERTOR/VISU_TableReader.hxx index ca5dc9db..6d287607 100644 --- a/src/CONVERTOR/VISU_TableReader.hxx +++ b/src/CONVERTOR/VISU_TableReader.hxx @@ -37,6 +37,8 @@ #include #include +class vtkPassThroughFilter; + namespace VISU { //--------------------------------------------------------------- @@ -82,7 +84,7 @@ namespace VISU virtual vtkAlgorithmOutput* - GetOutputPort() { return NULL; } + GetOutputPort(); virtual long unsigned int @@ -97,6 +99,7 @@ namespace VISU protected: vtkIdType myXAxisPosition; vtkPolyData* myOutput; + vtkPassThroughFilter* myFilter; }; typedef MED::SharedPtr PTableIDMapper;