[x3d-public] problem in nrrd example file header

Andreas Plesch andreasplesch at gmail.com
Mon Dec 18 13:18:55 PST 2017


I am working on ImageTexture3D support for x3dom using the existing
ImageTextureAtlas node and https://github.com/scijs/nrrd-js as a
parser.

It turns out the the parser is very strict, and so discovered a
malformed header line in
https://savage.nps.edu/Savage/VolumeRendering/datasets/nrrd/mri_ventricles.nrrd
used in http://www.web3d.org/x3d/content/examples/Basic/VolumeRendering/BasicVentriclesIndex.html

Specifically, the header line
'spacings:  NaN 0.009 0.009 0.009'

has _two_ space character after the colon delimiter. Exactly _one_
space is allowed, however, as described here:

http://teem.sourceforge.net/nrrd/format.html#general.2
second paragraph:
... a string "<field>" identifying the field (called the field
identifier), then a colon followed by a single space ": ", and then
the information describing the field "<desc>" (called the field
descriptor) ...

The second space then acts as a separator making the first value in
the array an empty string which causes throwing when attempting to
parse as a float.

I made an attempt at fixing the header by removing one space and made
the file available here:

https://cdn.glitch.com/af228b45-6772-432d-a549-74f9f447b2c3%2Fmri_ventricles2.nrrd?1513631507711

-Andreas

-- 
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list