composite data set iterator seems buggy with vtkOverlappingAMR
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
If you run the following code snippet,
vtkNew imageSource; imageSource->Update();
vtkOverlappingAMR* amr = vtkOverlappingAMR::SafeDownCast(imageSource->GetOutputDataObject(0)); vtkCompositeDataIterator * iter = amr->NewIterator(); iter->InitTraversal(); while ( !iter->IsDoneWithTraversal() ) { vtkAMRBox box =amr->GetAMRBox(iter); vtkUniformGrid* grid = vtkUniformGrid::SafeDownCast(iter->GetCurrentDataObject()); assert(grid); int numCells = grid->GetNumberOfCells(); cout<<"AMR box info: "<<"level "<<box.GetLevel()<<", Block: "<<box.GetBlockId()<<endl; iter->GoToNextItem(); }
You get the output:
AMR box info: level 0, Block: 0 AMR box info: level 0, Block: 0 AMR box info: level 0, Block: 1
Notice that the first and the second block has identical (level, block) pair. This is not right.