[Paraview] Multiple levels of vtkMultiBlockDataSets
Favre Jean
jfavre at cscs.ch
Thu Jun 9 12:29:53 EDT 2011
Yes it is possible. I have it running since several years.
source code:
vtkMultiBlockDataSet* mb = vtkMultiBlockDataSet::SafeDownCast(doOutput);
vtkMultiBlockDataSet *volumes, *boundaries, *solid0, *solid1, *solid2, *solid3;
volumes = vtkMultiBlockDataSet::New();
mb->SetBlock(0, volumes);
volumes->Delete();
mb->GetMetaData((unsigned int)0)->Set(vtkCompositeDataSet::NAME(), "volumes");
boundaries = vtkMultiBlockDataSet::New();
mb->SetBlock(1, boundaries);
boundaries->Delete();
mb->GetMetaData((unsigned int)1)->Set(vtkCompositeDataSet::NAME(), "boundaries");
if(boundaries)
{
solid0 = vtkMultiBlockDataSet::New();
boundaries->SetBlock(0, solid0);
solid0->Delete();
boundaries->GetMetaData((unsigned int)0)->Set(vtkCompositeDataSet::NAME(), "solid_wall");
}
etc...
-----------------
Jean M. Favre
Swiss National Supercomputing Center
More information about the ParaView
mailing list