[vtkusers] how to render vtkMultiBlockDataSet?
David Doria
daviddoria at gmail.com
Wed Jan 5 09:24:28 EST 2011
On Wed, Jan 5, 2011 at 9:14 AM, Nelson <gnjoseph at gmail.com> wrote:
>
> Hi David,
>
> I think it may be of type "vtkMultiBlockDataSet"
Right, that is the type of reader->GetOutput(), but as far as I know
you need to get and render each block separately.
We need to know the type of each block so we can get them with:
vtkUnstructuredGrid* ug =
vtkUnstructuredGrid::SafeDownCast(reader->GetOutput()->GetBlock(0));
Unfortunately, your file seems to have 0 blocks:
std::cout << "Number of blocks: " <<
reader->GetOutput()->GetNumberOfBlocks() << std::endl;
which may also be why ParaView crashes.
David
More information about the vtkusers
mailing list