[vtkusers] Converting vtkMultiBlockDataSet into vtkDataObject

Jean Favre jfavre at cscs.ch
Thu Oct 11 15:37:27 EDT 2007


off the top of my head, I would suggest something like that:

assume "mblocks" is your EnSight multiblock data, then

vtkMultiGroupDataIterator *dsiter  = (vtkMultiGroupDataIterator*)
mblocks->GetOutput()->NewIterator();
dsiter->GoToFirstItem();

while (!dsiter->IsDoneWithTraversal())
{
 vtkDataSet* ds =
vtkDataSet::SafeDownCast(dsiter->GetCurrentDataObject());
 // do what you want with each individual block pointed to by ds
 dsiter->GoToNextItem();
}

JF





More information about the vtkusers mailing list