On 07/03/2013 12:06 PM, Williams, Norman K wrote:
> Hey, I wrote the original NIFTIImageIO.

Awesome! Thank you.

> 
> Looking at the source, NIFTIImageIO doesn't mess with byte swapping at
> all; it expects niftilib to handle that byte order issues.

I may have tricked myself into seeing the bug in the first place.
What's the opposite of a schroedinbug?

ParaView certainly has this bug. I hope I just confused files I
converted with PV with the files I converted with ITK.

> 
> And niftilib's documentation indicates that byte swapping is handled
> internally:
> 
> nifti_image_read http://bit.ly/14NLSeb
> nifti_image_load http://bit.ly/1b7KoQt

I dutifully searched the ITK source for every nifti_image_read where I
found that we never did the read, and for every nifti_read_header where
we always ignore the swap variable. I didn't look for nifti_image_load.

> 
> As for your patch I can't see in ITK where it ever does anything with the
> m_ByteOrder flag.  Are you saying that setting this flag magically makes
> ITK reading of your NIfTI files work?
> 

A lot of ITK, and C++ for that matter, looks like magic to me.

Since I only found places where we read the image information I assumed
some other class that knows about m_ByteOrder but not
m_NiftiImage->byteorder did the raw read... It was stupid.

I'll check again with the ADNI data as soon as ITK rebuilds without my
patch.

Thank you for looking into this.

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-developers

Reply via email to