[vtkusers] Weird things when reading multiblock data with vtkPLOT3DReader

Mikko Korhonen mjkorhon at gmail.com
Sun May 20 17:42:16 EDT 2007


    Hi,

I'm trying to read multiblock data with vtkPLOT3DReader using
it's numbered outputs. I'm getting something that is close to original
but not quite true. I have compared the same data with ensight and
vtkPLOT3DReader,
and at least the two first blocks give exactly the same results, however
other blocks are somehow distorted.
Well, I'm not exactly sure if using outputs for reading multiple block's is
supported at all. Anyway, any ideas what is going on?

Code:

  char* xyzname = "XYZ.BIN";
  char* qname = "THE.BIN";

  vtkPLOT3DReader* reader = vtkPLOT3DReader::New();
  reader->SetXYZFileName(xyzname);
  reader->SetQFileName(qname);
  reader->SetMultiGrid(1);
  reader->SetBinaryFile(1);
  reader->SetHasByteCount(1);
  reader->SetByteOrderToLittleEndian();
  reader->SetScalarFunctionNumber(100);
  reader->SetVectorFunctionNumber(200);
//   reader->AddFunction(153);
  reader->Update();

  vtkStructuredGrid* sg=vtkStructuredGrid::New();
  sg->ShallowCopy(reader->GetOutput(12-1));

Results, compared with ensight:
http://www.aero.hut.fi/~mjkorhon/vtk/


Mikko





More information about the vtkusers mailing list