[x3d-public] problem in nrrd example file header

Andreas Plesch andreasplesch at gmail.com
Mon Jan 1 17:32:41 PST 2018


It turns out that

http://savage.nps.edu/Savage/VolumeRendering/datasets/nrrd/mri_ventricles_segment.nrrd

has the same problem of a malformed header line, eg. an excess space
character in the spacings line.

Here is a corrected nrrd file:

https://cdn.glitch.com/405924cd-3c0d-476e-9b88-520a5610604c%2Fmri_ventricles_segment_fixed.nrrd?1514854259949

-Andreas

On Mon, Dec 18, 2017 at 4:18 PM, Andreas Plesch <andreasplesch at gmail.com> wrote:
> 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



-- 
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list