[Paraview] paraview can't read back its own VTK grids with FieldData?

Favre Jean jfavre at cscs.ch
Mon May 23 08:27:17 EDT 2011


Hello

When using ParaView (v 3.11) to write data in the legacy format, I cannot read the files back, if they contain Field Data.

I have noticed that Paraview writes the Field Data before the DIMENSIONS tag, and when it reads the file back, it complains and cannot draw any data. I have noticed that the order of writing of the different tags matters greatly. I.e., the DIMENSIONS tag must be written before the FIELD data.

I edited  VTK/IO/vtkStructuredGridWriter.cxx and swapped a few lines of code, i.e.

 *fp << "DATASET STRUCTURED_GRID\n";

  input->GetDimensions(dim);
  *fp << "DIMENSIONS " << dim[0] << " " << dim[1] << " " << dim[2] << "\n";

  if (!this->WriteDataSetData(fp, input))
    {
........
    }

and ParaView can now read its own data. 

Can this cosmetic change be applied to all legacy writers, or is there something against it?
-----------------
Jean M. Favre
Scientific Computing Research
Swiss National Supercomputing Center
CH-6928 Manno
Switzerland


More information about the ParaView mailing list