VTK/VTK 6 Migration/Removal of vtkPlot3DReader

From KitwarePublic
< VTK
Revision as of 14:38, 6 April 2012 by Berk (talk | contribs) (Created page with "= Removal of vtkPlot3DReader = In VTK 6, we changed or removed a few algorithms that previously produced variable number of outputs, which is not supported in VTK 6. Such algori...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Removal of vtkPlot3DReader

In VTK 6, we changed or removed a few algorithms that previously produced variable number of outputs, which is not supported in VTK 6. Such algorithms need to produce vtkMultiBlockDataSet instead. As part of this change, we removed vtkPLOT3DReader. In VTK 6, you should use vtkMultiBlockPLOT3DReader instead.

Example 1

Replace

vtkPLOT3DReader pl3d
    pl3d SetXYZFileName "$VTK_DATA_ROOT/Data/combxyz.bin"
    pl3d SetQFileName "$VTK_DATA_ROOT/Data/combq.bin"
    pl3d Update
vtkPlane plane
    eval plane SetOrigin [[pl3d GetOutput] GetCenter]
    plane SetNormal -0.287 0 0.9579

with

vtkMultiBlockPLOT3DReader pl3d
    pl3d SetXYZFileName "$VTK_DATA_ROOT/Data/combxyz.bin"
    pl3d SetQFileName "$VTK_DATA_ROOT/Data/combq.bin"
    pl3d Update
    set output [[pl3d GetOutput] GetBlock 0]
vtkPlane plane
    eval plane SetOrigin [$output GetCenter]

Note the use of [[pl3d GetOutput] GetBlock 0]. It is also possible to create a pipeline that works on one block (or more) by using the composite data pipeline and vtkExtractBlock filter.