[vtk-developers] [VTK 0012994]: vtkXMLMultiBlockDataWriter does not write names for leaf nodes of the multiblock dataset
Mantis Bug Tracker
mantis at public.kitware.com
Wed Mar 14 03:58:43 EDT 2012
The following issue has been SUBMITTED.
======================================================================
http://paraview.org/Bug/view.php?id=12994
======================================================================
Reported By: nikolay.zhavoronok
Assigned To:
======================================================================
Project: VTK
Issue ID: 12994
Category: (No Category)
Reproducibility: have not tried
Severity: minor
Priority: normal
Status: backlog
Project: TBD
Type: incorrect functionality
Resolution: open
Fixed in Version:
======================================================================
Date Submitted: 2012-03-14 03:58 EDT
Last Modified: 2012-03-14 03:58 EDT
======================================================================
Summary: vtkXMLMultiBlockDataWriter does not write names for
leaf nodes of the multiblock dataset
Description:
The following code will assign the name for 0 block, but will not write this
name into vtu file:
============================================
vtkNew<vtkUnstructuredGrid> ugrid;
vtkNew<vtkMultiBlockDataSet> mb;
mb->SetNumberOfBlocks( 1 );
mb->SetBlock( 0, ugrid.GetPointer() );
mb->GetMetaData( 0 )->Set(vtkCompositeDataSet::NAME(), "My Material 1");
mb->GetMetaData( 0 )->Print( std::cout ); // for debuggin to see the name
vtkXMLMultiBlockDataWriter *writer = vtkXMLMultiBlockDataWriter::New();
writer->SetInput( mb.GetPointer() );
writer->SetFileName("test.vtm");
writer->Write();
============================================
The problem is inside vtkXMLMultiBlockDataWriter.cxx, int
vtkXMLMultiBlockDataWriter::WriteComposite method iterates over multiblock data
set items, and writes names only for vtkCompositeDataSet datasets.
The fix looks easy, I am attaching the fixed file.
VTK Reader & Paraview support reading of leaf dataset names correctly, so the
problem is only in writer.
Thanks,
Nikolay
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2012-03-14 03:58 nikolay.zhavoronokNew Issue
2012-03-14 03:58 nikolay.zhavoronokFile Added: vtkXMLMultiBlockDataWriter.cxx
======================================================================
More information about the vtk-developers
mailing list