Author: Ron Kneusel (---.ittvis.com)
Date: 03-25-09 13:14
Greetings!
I am in the process of trying to wrap some of the fsliolib routines in IDL. The ultimate goal will be a DLM that users can download from our user contrib site. Right now, this is a part-time side effort and I'm starting with simple reading of NIfTI format files.
My first tests, however are producing confusing results and I hope that someone more familiar with the code can clarify what I'm seeing.
I have downloaded the sample NIfTI data sets (renamed one as "avg.hdr.gz", etc) and am attempting to read the header. If I use the fsl_api_driver in the examples directory to peek at a voxel (which calls FslReadHeader) it works nicely:
$./fsl_api_driver peek avg.hdr.gz 0 0 1 0
Location 0 0 1 0: 9.0000
However, if I call my IDL wrapper to do the same thing, which simply extracts the filename string and passes it to FslReadHeader() I get:
IDL> f = nifti_ReadHeader('avg.hdr.gz')
% Loaded DLM: NIFTI.
** ERROR (nifti_image_read): failed to find header file for 'avg.nii.gz'
Error:: FslReadHeader: error reading header information
The thing above I find curious is that while I pass in 'avg.hdr.gz' NIfTI reports the error while looking for 'avg.nii.gz'. Strange (to me).
Does anyone know why this might be happening? The fsl_api_driver code does not appear to be doing any sort of initialization. I did modify fsliolib slightly to not look for environment variables and set the default output type to FSL_TYPE_NIFTI_GZ but this version of the library is being used by the fsl_api_driver app as well so I suspect that the change is benign enough.