Commit ee39e0e8 authored by Vesa Oikonen's avatar Vesa Oikonen
Browse files

imgFormatFromFName() identifies common microPET extensions

parent 4b28df6b
......@@ -387,7 +387,7 @@ int imgWrite(
separated by file naming.
@returns enum imgformat (IMG_FORMAT_DICOM, ...), and IMG_FORMAT_UNKNOWN, when not certain.
@sa imgRead, imgWrite
@sa imgFormatIdentify, imgRead, imgWrite, micropetExists, niftiExists, anaExists
*/
imgformat imgFormatFromFName(
/** Name of file that is used to determine format. */
......@@ -442,6 +442,11 @@ imgformat imgFormatFromFName(
if(strcasecmp(exts, ".img")==0) return(IMG_FORMAT_E63);
if(strcasecmp(exts, ".pet.img")==0) return(IMG_FORMAT_MICROPET);
if(strcasecmp(exts, ".pet.img.hdr")==0) return(IMG_FORMAT_MICROPET);
if(strcasecmp(exts, ".ct.img")==0) return(IMG_FORMAT_MICROPET);
if(strcasecmp(exts, ".ct.img.hdr")==0) return(IMG_FORMAT_MICROPET);
/* Check certain in-house extensions */
if(strcasecmp(exts, ".bin")==0) return(IMG_FORMAT_FLAT);
if(strcasecmp(exts, ".mif")==0) return(IMG_FORMAT_FLAT);
......@@ -453,6 +458,7 @@ imgformat imgFormatFromFName(
/*****************************************************************************/
/** Identify the string representation of the IMG file format.
@return enum imgformat, or 0 (enum IMG_FORMAT_UNKNOWN) if not identified.
@sa imgFormatFromFName
@author Vesa Oikonen
*/
imgformat imgFormatIdentify(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment