[Insight-users] Can't read DWI file (NRRD format, from MIDAS dataset)
Tiago Brizolara da Rosa
yarroo at yahoo.com
Wed Jun 20 01:12:18 EDT 2012
Hi all,
I'm trying to read a DWI from MIDAS dataset (01025-dwi.nhdr, with data located in 01025-dwi.raw.gz) and I'm getting an exception that ITK throws at itkNrrdImageIO.cxx, line 263:
if (nrrdLoad(nrrd, this->GetFileName(), nio) != 0)
{
char *err = biffGetDone(NRRD); // would be nice to free(err)
itkExceptionMacro("ReadImageInformation: Error reading "
<< this->GetFileName() << ":\n" << err);
}
It happens two times reading this file. If I don't catch the exceptions, the header information is read correctly, but the image content is not read.
But in the same dataset, the mask image, also in NRRD format (01025-t2w_mask.nrrd, wich includes the data in gzip encoding in the same file), is being read correctly. I compared both sessions and saw a difference between the two cases:
- while reading the image that works (01025-t2w_mask.nrrd):
In formatNRRD.c, line 145 nio->dataFNArr->len is 0, so the else if (nio->dataFNArr->len) is skipped
- while reading 01025-dwi.nhdr/01025-dwi.raw.gz:
nio->dataFNArr->len is 1. Then, if (nio->dataFNArr->len) is entered. Then fname becomes "./01025-dwi.raw.gz" and, then, the function returns an error, that is propagated and then the mentionated exception is thrown.
I hope I put some useful information and I would be very glad for any help!
I'm using: ITK 3.8 (we can't upgrade now, but if someone knows any fix for this issue in newer versions, let me know); Windows 7, 64-bit; Visual C++ 2010
Thanks in advance,
Tiago Brizolara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120619/93cffe93/attachment.htm>
More information about the Insight-users
mailing list