class VISU_MergeFilter;
class VISU_CommonCellsFilter;
+class vtkPassThroughFilter;
namespace VISU
{
//---------------------------------------------------------------
typedef vtkSmartPointer<VISU_MergeFilter> PMergeFilter;
typedef vtkSmartPointer<VISU_CommonCellsFilter> PCommonCellsFilter;
+ typedef vtkSmartPointer<vtkPassThroughFilter> PPassThroughFilter;
//---------------------------------------------------------------
typedef vtkSmartPointer<vtkPolyData> PPolyData;
#include <vtkPolyData.h>
#include <vtkCellType.h>
#include <vtkCell.h>
+#include <vtkPassThroughFilter.h>
namespace VISU
{
return mySource;
}
+ const PPassThroughFilter&
+ TUnstructuredGridHolder
+ ::GetFilter() const
+ {
+ if(!myFilter.GetPointer()){
+ myFilter = vtkPassThroughFilter::New();
+ myFilter->Delete();
+ myFilter->SetInputData( GetSource() );
+ }
+ return myFilter;
+ }
+
vtkUnstructuredGrid*
TUnstructuredGridHolder
::GetUnstructuredGridOutput()
TUnstructuredGridHolder
::GetOutputPort()
{
- return NULL;
+ return GetFilter()->GetOutputPort();
}
unsigned long int
const PUnstructuredGrid&
GetSource() const;
+ //! This method allow to create corresponding VTK filter by demand (not at once)
+ const PPassThroughFilter&
+ GetFilter() const;
+
virtual
vtkUnstructuredGrid*
GetUnstructuredGridOutput();
protected:
mutable PUnstructuredGrid mySource;
+ mutable PPassThroughFilter myFilter;
};