Message Boards Message Boards

How to import structured points gray values from VTK files

Hi,

I am trying to import a VTK file that only contains a list of structured points. The header looks like this:

# vtk DataFile Version 3.0 vtk output BINARY DATASET STRUCTURED_POINTS DIMENSIONS 112 112 111 SPACING 0.964286 0.964286 0.964286 ORIGIN 30.6738 -71.649 -125.537 POINT_DATA 1392384 SCALARS scalars float LOOKUP_TABLE default

And this is followed by 1392384 numbers (floats) in Binary so unreadable for me, which are gray values. Now, if I tell Mathematica to Import this file, it gives me only Cuboids with two coordinates, but the gray values are omitted, I guess. I cannot find anything related to the gray values in the imported structure. Is there a way to tell Mathematica the proper way of importing such a file? Or am I missing something?

POSTED BY: Hans van Assen
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract