[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vtk-developers
Subject:    [vtk-developers] EnSight reader changes
From:       Berk Geveci <berk.geveci () kitware ! com>
Date:       2005-09-06 20:37:21
Message-ID: 431DFE01.3000907 () kitware ! com
[Download RAW message or body]

Amy and I have been working on changing EnSight reader so that instead of
creating multiple outputs, it will create one composite output
(vtkHierarchicalDataSet). EnSight reader has always been a problem because,
unlike other VTK readers, it has to be updated before it's outputs can be
accessed:

vtkSomeEnSightReader reader
reader SetFileName foo
reader Update

set numOuts [reader GetNumberOfOutputs]

vtkSomeFilter filter
filter SetInput [reader GetOutput N]

With the addition of composite datasets to VTK, this is no longer
necessary. Multi-block/part readers  can now have one output and produce one
vtkHierarchicalDataSet that contains all the blocks.
The drawback is that some of the user code will have to change in two ways:

1. EnSight readers will now have 1 output
2. Processing composite datasets requires either using special filters or
having a composite data-aware consumer (for example mapper or geometry
filter)

Here is an example pipeline:

vtkSomeEnSightReader reader
reader SetFileName foo

vtkContourFilter contour
contour SetInputConnection [reader GetOutputPort]

vtkHierarchicalPolyDataMapper mapper
mapper SetInputConnection [contour GetOutputPort]

or

vtkHierarchicalDataSetGeometryFilter geom
geom SetInputConnection [contour GetOutputPort]

vtkPolyDataMapper mapper
mapper SetInputConnection [geom GetOutputPort]

We plan to commit the changes either later this week or early next
week. This change will not be in VTK 5.0. Once we commit the change, I will
point out some tests/examples that demonstrate how the user code should be
changed.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic