Author: rick reynolds (---.nimh.nih.gov)
Date: 04-27-09 19:03
Hi All,
Sean's and Cinly's comments about the common FAT16 using only
uppercase are enough of a systemic justification for me to see
allowing uppercase extensions in the library. So I am making
that change now and will post it tomorrow. It is a non-trivial
change.
Basically, if the user (or program) specifies a filename that
has an uppercase extension, the library will accept and look
for or return uppercase names.
--------------------------------------------
Examples:
Requesting myfile.nii will find any of myfile.nii, myfile.hdr,
myfile.img, or .gz versions, in that order. That includes such
operations as reading an existing image or bricks, creating the
filenames and testing them. This is how the library previously
worked, too.
Requesting myfile.NII will find any of myfile.NII, myfile.HDR,
myfile.IMG or .GZ versions, in that order.
Requesting myfile.NII.gz will fail. Mixing extension cases has
not been allowed. Requesting myfile.NiI is "right out" (quote
from Monty Python, meaning unacceptable). :)
--------------------------------------------
This directly affects the library functions...
nifti_is_complete_filename
nifti_validfilename
nifti_find_file_extension
nifti_is_gzfile
nifti_makebasename
nifti_findhdrname
nifti_findimgname
nifti_makehdrname
nifti_makeimgname
nifti_set_filenames
nifti_type_and_names_match
... which in turn affects top-level functions like nifti_image_read,
of course.
--------------------------------------------
Note that the user/programmer still has to be accurate on case-
sensitive systems. If .NII exists, asking for .nii will not find
it (but asking for .HDR would, for example).
--------------------------------------------
I hope this seems okay to everyone. Please post any additional
comments or questions. I'll post another message when the update
is available (tomorrow).
Mathieu, thanks for the suggestion. Sean and Cinly, thanks for
the comments.
- rick
|
|