ReadVTK.jl icon indicating copy to clipboard operation
ReadVTK.jl copied to clipboard

Constraint on the VTK version

Open henry2004y opened this issue 2 years ago • 5 comments

Hi,

While testing to read one ImageData generated by ParaView 5.11, I noticed that the VTK file version was asserted to be v"1.0". The file version generated by ParaView 5.11 is 2.2, and the latest VTK version is 3.0.

I am wondering if there is a reason for only supporting version 1.0? If I remove

@assert version == v"1.0"

it seems that the reader still works in my limited attempts.

Thanks!

henry2004y avatar Oct 07 '23 13:10 henry2004y

I checked and indeed, there is no official VTK XML spec file findable on the internet. We thus do not know what version 1 or higher (or lower) really means. Thus, feel free to create a PR that removes this check and we will be happy to merge it.

sloede avatar Oct 07 '23 18:10 sloede

I know nothing about the specific differences, but let's hope it doesn't break anything.

The VTKFileFormats briefly mentioned that v1.0 and v2.0 is compatible with v3.0, and some older names are discouraged (e.g. aspect ratio in v1.0 v.s. spacing in v2.0 for structured points). I do not see any real difference.

henry2004y avatar Oct 07 '23 20:10 henry2004y

The VTKFileFormats briefly mentioned that v1.0 and v2.0 is compatible with v3.0, and some older names are discouraged (e.g. aspect ratio in v1.0 v.s. spacing in v2.0 for structured points). I do not see any real difference.

Yes, but they refer to the legacy formats, while we only support the XML file formats, for which no version information has ever been released publicly (see also https://gitlab.kitware.com/vtk/vtk/-/issues/17675).

sloede avatar Oct 08 '23 05:10 sloede

I use a rather recent version of VTK (9.3.0 from https://archlinux.org/packages/extra/x86_64/vtk) and the written image data has version 0.1. Would it be possible to further relax the version and essentially accept everything until the different versions are documented?

MarDiehl avatar Jun 10 '24 22:06 MarDiehl

Yes, that's fine with me. If you create a PR that removes the checks, I'll merge it 😊

sloede avatar Jun 11 '24 04:06 sloede