On Tue, Jul 2, 2013 at 8:54 PM, Kevin H. Hobbs <[email protected]> wrote:
> On 07/02/2013 04:10 PM, Matt McCormick wrote:
>> Hi Kevin,
>>
>> Thanks for the report.  I have created an issue [1] in the issue
>> tracker to keep track of the issue.
>>
>> Thanks,
>> Matt
>>
>> [1] https://issues.itk.org/jira/browse/ITK-3165
>>
>
> I have the start of a patch :
>
> diff --git a/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx
> b/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx
> index 3836a29..498eb3e 100644
> --- a/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx
> +++ b/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx
> @@ -1257,6 +1257,16 @@ NiftiImageIO
>    EncapsulateMetaData< std::string >(this->GetMetaDataDictionary(),
>                                       ITK_FileNotes, description);
>
> +  // Set byte order
> +  if( this->m_NiftiImage->byteorder == 1 ) // LSB_FIRST
> +    {
> +    this->m_ByteOrder = LittleEndian;
> +    }
> +  if( this->m_NiftiImage->byteorder == 2 ) // MSB_FIRST
> +    {
> +    this->m_ByteOrder = BigEndian;
> +    }
> +
>    // We don't need the image anymore
>    nifti_image_free(this->m_NiftiImage);
>    this->m_NiftiImage = 0;
>
> "It works for me" but I've only looked at one image on one machine and I
> don't really know the implications of setting this member variable.
>

Very cool.  Do you have a small test big endian Nifti image that can
be used in additional test cases?

Thanks,
Matt
_______________________________________________
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