|
TPCCLIB
|
IO functions for image data. More...
Go to the source code of this file.
Functions | |
| char * | imgFormatDescr (imgformat c) |
| char * | imgDefaultExtension (imgformat c) |
| int | imgRead (IMG *img, const char *fname, TPCSTATUS *status) |
| int | imgWrite (IMG *img, const char *fname, TPCSTATUS *status) |
| imgformat | imgFormatFromFName (const char *fname, TPCSTATUS *status) |
| imgformat | imgFormatIdentify (const char *s) |
| char * imgDefaultExtension | ( | imgformat | c | ) |
Return pointer to default image file name extension based on the format code.
| c | IMG format code |
Definition at line 67 of file imageio.c.
| char * imgFormatDescr | ( | imgformat | c | ) |
Return pointer to image file format description with the format code.
| c | IMG format code |
Definition at line 36 of file imageio.c.
Referenced by imgContents(), imgFillOHeader(), imgReadNifti(), and imgWrite().
Determine IMG file format from file name.
If file name is actually name of an existing path, then DICOM is assumed. Non-existing path can be identified as path only if it ends with '/'.
Note that NIfTI dual file format, Analyze, and microPET files can not be separated by file naming.
| fname | Name of file that is used to determine format. |
| status | Pointer to status data; enter NULL if not needed. |
Definition at line 394 of file imageio.c.
Referenced by imgWrite().
| imgformat imgFormatIdentify | ( | const char * | s | ) |
Identify the string representation of the IMG file format.
| s | IMG format as a string |
Definition at line 466 of file imageio.c.
Read image file into IMG structure.
| img | Pointer to initialized image structure; old contents are deleted. |
| fname | Pointer to the file name, possibly path in case of DICOM. |
| status | Pointer to status data; enter NULL if not needed. |
Definition at line 82 of file imageio.c.
Write image file from IMG structure.
| img | Pointer to image structure. |
| fname | Pointer to the file name, possibly path in case of DICOM. |
| status | Pointer to status data; enter NULL if not needed. |
Definition at line 214 of file imageio.c.