[x3d-public] problem in nrrd example file header

Don Brutzman brutzman at nps.edu
Tue Jan 2 00:30:57 PST 2018


Thanks for further checking Andreas.

Nicholas (cc:ed) is originator of these files.  Have also copied Medical working group since these are relevant examples.

I will be happy to post updates to these files but am hoping that we all proceed consistently to avoid versionitis later.  Further most are large (indeed overwhelming usual .zip distributions) so it is good to get them all sorted out correctly together.

v/r Don

On 1/1/2018 5:32 PM, Andreas Plesch wrote:
> 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
> 
> 
> 


all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list