Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Server maintenance on Tue 24.5. at 12:00.
Estimated downtime less than 30 minutes.
Open sidebar
Vesa Oikonen
tpcclib
Commits
ee39e0e8
Commit
ee39e0e8
authored
Jun 02, 2020
by
Vesa Oikonen
Browse files
imgFormatFromFName() identifies common microPET extensions
parent
4b28df6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
v2/libtpcimage/imageio.c
View file @
ee39e0e8
...
...
@@ -387,7 +387,7 @@ int imgWrite(
separated by file naming.
@returns enum imgformat (IMG_FORMAT_DICOM, ...), and IMG_FORMAT_UNKNOWN, when not certain.
@sa img
Read, imgWrite
@sa img
FormatIdentify, 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
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment