|
TPCCLIB
|
Functions to basic processing with TPCCLIB image data structure. More...
Go to the source code of this file.
Functions | |
| char * | imgModalityDescr (imgmodality c) |
| char * | imgContentDescr (imgcontent c) |
| void | imgInit (IMG *img) |
| void | imgFree (IMG *img) |
| int | imgAllocate (IMG *img, const unsigned int dimz, const unsigned int dimy, const unsigned int dimx, const unsigned int dimt, TPCSTATUS *status) |
| int | imgHasData (IMG *img) |
| int | imgHasTimes (IMG *img) |
| int | imgHasCounts (IMG *img) |
| int | imgHasWeights (IMG *img) |
| void | imgContents (IMG *img, FILE *fp) |
| unsigned long long | imgNaNs (IMG *img, int fix) |
| int | imgMinMax (IMG *img, float *minvalue, float *maxvalue) |
| int | imgXRange (IMG *img, double *xmin, double *xmax) |
Functions to basic processing with TPCCLIB image data structure.
Definition in file image.c.
| int imgAllocate | ( | IMG * | img, |
| const unsigned int | dimz, | ||
| const unsigned int | dimy, | ||
| const unsigned int | dimx, | ||
| const unsigned int | dimt, | ||
| TPCSTATUS * | status ) |
Allocates memory for image data. Old contents are not saved.
| img | Pointer to initialized image structure; old contents are deleted. |
| dimz | Nr of image planes to allocate. |
| dimy | Nr of image rows to allocate. |
| dimx | Nr of image columns to allocate. |
| dimt | Nr of image time frames (samples) to allocate. |
| status | Pointer to status data; enter NULL if not needed. |
Definition at line 126 of file image.c.
Referenced by imgReadDICOM(), and imgReadNifti().
| char * imgContentDescr | ( | imgcontent | c | ) |
Return pointer to content type of the image data.
| c | IMG content code |
Definition at line 51 of file image.c.
Referenced by imgContents(), and imgFillOHeader().
| void imgContents | ( | IMG * | img, |
| FILE * | fp ) |
Print general information on the contents of the IMG data structure.
| img | Pointer to IMG structure. |
| fp | File pointer for output; usually stdout. |
Definition at line 293 of file image.c.
| void imgFree | ( | IMG * | img | ) |
Free memory allocated for IMG. All data is cleared.
| img | Pointer to IMG structure. |
Definition at line 107 of file image.c.
Referenced by imgAllocate(), imgRead(), imgReadDICOM(), and imgReadNifti().
| int imgHasCounts | ( | IMG * | img | ) |
Verify that IMG contains prompts and randoms.
| img | Pointer to image structure. |
Definition at line 251 of file image.c.
Referenced by imgContents(), and imgToSIF().
| int imgHasData | ( | IMG * | img | ) |
Verify that image data actually contains pixel data.
| img | Pointer to image structure. |
Definition at line 218 of file image.c.
Referenced by imgContents(), imgCopyHeader(), imgFillOHeader(), imgHasTimes(), imgMinMax(), imgSetNiftiHeader(), imgWrite(), imgWriteNifti(), and imgXRange().
| int imgHasTimes | ( | IMG * | img | ) |
Verify that IMG contains frame times.
| img | Pointer to image structure. |
Definition at line 235 of file image.c.
Referenced by imgContents(), imgToSIF(), and imgWriteNifti().
| int imgHasWeights | ( | IMG * | img | ) |
Check if image contains weights as indicated by the 'weighting' field.
| img | Pointer to image structure. |
Definition at line 278 of file image.c.
Referenced by imgContents().
| void imgInit | ( | IMG * | img | ) |
Initiate the IMG structure before any use.
| img | Pointer to IMG structure. |
Definition at line 64 of file image.c.
Referenced by imgFree().
| int imgMinMax | ( | IMG * | img, |
| float * | minvalue, | ||
| float * | maxvalue ) |
Searches the min and max pixel value in the image data.
| img | Pointer to IMG structure from where min and max pixel values are searched. |
| minvalue | Pointer to min pixel value; Enter NULL if not needed. |
| maxvalue | Pointer to max pixel value; Enter NULL if not needed. |
Definition at line 396 of file image.c.
Referenced by imgSetNiftiHeader().
| char * imgModalityDescr | ( | imgmodality | c | ) |
Return pointer to modality of the image data.
| c | IMG modality code |
Definition at line 27 of file image.c.
Referenced by imgContents(), and imgFillOHeader().
| unsigned long long imgNaNs | ( | IMG * | img, |
| int | fix ) |
Searches the image data for missing pixel values, optionally setting those to zero.
| img | Pointer to IMG structure. |
| fix | Set (1) or do not set (0) missing pixels to zero. |
| int imgXRange | ( | IMG * | img, |
| double * | xmin, | ||
| double * | xmax ) |
Get the range of x values (times) in the image data.
Data is not modified. Data does not need to be sorted.
| img | Pointer to IMG structure. |
| xmin | Pointer to variable for min x value (NULL if not needed). |
| xmax | Pointer to variable for max x value (NULL if not needed). |
Definition at line 430 of file image.c.