Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • ParaView ParaView
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,860
    • Issues 1,860
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 93
    • Merge requests 93
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ParaView
  • ParaViewParaView
  • Issues
  • #20341
Closed
Open
Created Nov 20, 2020 by Eric Lynch@celynchgt

Bug in vtkMultiBlockPLOT3DReader

There appears to be a bug in vtkMultiBlockPLOT3DReader, specifically in the way it guesses the format of the file. I’m using whatever version of VTK is distributed with ParaView 5.8.1.

First, I try to read the file with auto-detect turned on:

import vtk
reader = vtk.vtkMultiBlockPLOT3DReader()
reader.SetXYZFileName(‘CARTBody00001200.x’)
reader.AutoDetectFormatOn()
reader.Update()
40.633s) [main thread ]vtkMultiBlockPLOT3DRead:2504 ERR| vtkMultiBlockPLOT3DReader (0x1748090): Could not determine settings for file. Cannot read.

Since I know what “flavor” of Plot3d this is, I’ll try disabling auto-detect and specifying all the options myself:

reader = vtk.vtkMultiBlockPLOT3DReader()
reader.SetXYZFileName(‘CARTBody00001200.x’)
reader.BinaryFileOn()
reader.MultiGridOn()
reader.AutoDetectFormatOff()
reader.BinaryFileOn()
reader.MultiGridOn()
reader.HasByteCountOff()
reader.IBlankingOn()
reader.DoublePrecisionOff()
reader.SetByteOrderToBigEndian()
reader.Update()
( 324.724s) [main thread ]vtkMultiBlockPLOT3DRead:2504 ERR| vtkMultiBlockPLOT3DReader (0x15a8590): Could not determine settings for file. Cannot read.

I’ve tried reading the file manually with a small Python script, and everything appears to be in order with it. It appears that VTK tries to do the auto-detect regardless of what the user asked for. I've included a gzipped example dataset.

CARTBody00001200.x.gz

The specific issue with this file may be that it’s a C binary file with 512 blocks. If you byte-swap 512, you get 131072, which is a large but plausible number of blocks. That ends up confusing the endianness auto-detection.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking