|
TPCCLIB
|
Storing and processing of 3D PET image volume data with no time information (frames). More...
#include "libtpcimgio.h"Go to the source code of this file.
Functions | |
| void | volInit (VOL *vol) |
| void | svolInit (SVOL *svol) |
| void | volEmpty (VOL *vol) |
| void | svolEmpty (SVOL *svol) |
| int | volAllocate (VOL *vol, int planes, int rows, int columns) |
| int | svolAllocate (SVOL *svol, int planes, int rows, int columns) |
| int | img2vol (IMG *img, VOL *vol, int frame) |
| int | img2svol (IMG *img, SVOL *svol, int frame) |
| int | vol2img (VOL *vol, IMG *img, int frame) |
| int | svol2img (SVOL *svol, IMG *img, int frame) |
| void | volInfo (VOL *vol, FILE *fp) |
| void | svolInfo (SVOL *svol, FILE *fp) |
| void | volContents (VOL *vol, VOL_RANGE r, FILE *fp) |
| int | volMax (VOL *vol, VOL_RANGE *r, VOL_PIXEL *maxp, float *maxv, VOL_PIXEL *minp, float *minv) |
| int | volAvg (VOL *vol, VOL_RANGE *r, float *avg) |
| int | vrdReorder (VOL_RANGE *vol_range) |
| int | vrdVxlNr (VOL_RANGE *vol_range) |
| int | string_to_xyz (char *str, int *x, int *y, int *z) |
| int | vrd2vol (VOL_RANGE *r, VOL *vol, float in, float out, char *status) |
| int | vrdRead (char *vrdfile, VOL_RANGE *vol_range, char *status) |
Variables | |
| int | VOL_TEST |
| char * | _volStatusMessage [] |
Storing and processing of 3D PET image volume data with no time information (frames).
Definition in file vol.c.
Copy one time frame (1..dimt) from 4D image to 3D short int volume. Svol can be but need not to be allocated.
| img | image structure |
| svol | short volume structure |
| frame | frame number [1..number of frames] |
Definition at line 305 of file vol.c.
Copy one time frame (1..dimt) from 4D image to 3D volume. Vol can be but need not to be allocated.
| img | image structure |
| vol | volume structure |
| frame | frame number [1..number of frames] |
Definition at line 267 of file vol.c.
| int string_to_xyz | ( | char * | str, |
| int * | x, | ||
| int * | y, | ||
| int * | z ) |
Read pixel location from a string representation of it.
| str | String in format x,y,z or x y z ; this string is not changed |
| x | Pixel location in x dimension |
| y | Pixel location in y dimension |
| z | Pixel location in z dimension |
Definition at line 653 of file vol.c.
Referenced by vrdRead().
Copy 3D short int volume as one time frame (1..dimt) into 4D image. Img must be allocated.
| svol | short volume structure |
| img | image structure |
| frame | frame number [1..img->dimt] |
Definition at line 385 of file vol.c.
| int svolAllocate | ( | SVOL * | svol, |
| int | planes, | ||
| int | rows, | ||
| int | columns ) |
Allocate memory for 3D short int volume. Returns 0 if ok.
| svol | short volume structure |
| planes | number of planes [>=1] |
| rows | number of rows [>=1] |
| columns | number of columns [>=1] |
Definition at line 204 of file vol.c.
Referenced by img2svol().
| void svolEmpty | ( | SVOL * | svol | ) |
Free memory allocated for short int volume.
| svol | short int volume structure |
Definition at line 103 of file vol.c.
Referenced by svolAllocate().
| void svolInfo | ( | SVOL * | svol, |
| FILE * | fp ) |
Prints short int volume information to specified file pointer, e.g. stdout
| svol | short volume structure |
| fp | target file pointer |
Definition at line 439 of file vol.c.
| void svolInit | ( | SVOL * | svol | ) |
Initiate short int volume before any use of SVOL data; this should be called once.
| svol | short int volume structure |
Definition at line 50 of file vol.c.
Copy 3D volume as one time frame (1..dimt) into 4D image. Img must be allocated.
| vol | volume structure |
| img | image structure |
| frame | frame number [1..number of frames] |
Definition at line 351 of file vol.c.
| int volAllocate | ( | VOL * | vol, |
| int | planes, | ||
| int | rows, | ||
| int | columns ) |
Allocate memory for 3D image volume. Returns 0 if ok.
| vol | volume structure |
| planes | number of planes [>=1] |
| rows | number of rows [>=1] |
| columns | number of columns [>=1] |
Definition at line 139 of file vol.c.
Referenced by img2vol().
Calculates average voxel value inside specified volume range.
| vol | Pointer to VOL image structure |
| r | Pointer to volume range inside VOL; enter NULL if whole VOL is used |
| avg | Target for mean value |
Prints matrix values inside specified range to file pointer.
| vol | volume structure |
| r | volume range structure |
| fp | target file pointer |
Definition at line 464 of file vol.c.
| void volEmpty | ( | VOL * | vol | ) |
Free memory allocated for volume.
| vol | volume structure |
Definition at line 74 of file vol.c.
Referenced by volAllocate().
| void volInfo | ( | VOL * | vol, |
| FILE * | fp ) |
Prints volume information to specified file pointer, e.g. stdout
| vol | volume structure |
| fp | target file pointer |
Definition at line 415 of file vol.c.
| void volInit | ( | VOL * | vol | ) |
Initiate volume before any use of VOL data; this should be called once.
| vol | pointer to volume structure |
| int volMax | ( | VOL * | vol, |
| VOL_RANGE * | r, | ||
| VOL_PIXEL * | maxp, | ||
| float * | maxv, | ||
| VOL_PIXEL * | minp, | ||
| float * | minv ) |
Finds max and/or min voxel inside specified volume range.
| vol | Pointer to VOL image structure |
| r | Pointer to volume range inside VOL; enter NULL if whole VOL is used |
| maxp | Pixel where max pixel position is written; NULL if not needed |
| maxv | Target for max value; NULL if not needed |
| minp | Pixel where min pixel position is written; NULL if not needed |
| minv | Target for min value; NULL if not needed |
Definition at line 492 of file vol.c.
Set volume voxel values based on volume range definition.
| r | Image volume range. |
| vol | Pre-allocated image volume data structure. |
| in | Value to write into voxels inside the given volume range; enter nanf("") to not change the values. |
| out | Value to write into voxels outside the given volume range; enter nanf("") to not change the values. |
| status | Pointer to a string (allocated for at least 64 chars) where error message or other execution status will be written; enter NULL, if not needed |
Definition at line 681 of file vol.c.
| int vrdRead | ( | char * | vrdfile, |
| VOL_RANGE * | vol_range, | ||
| char * | status ) |
Read Volume Range Definition File.
| vrdfile | Volume Range Definition File filename, which contains image volume corners (x y z) in IFT format: corner1 = x y z corner2 = x y z |
| vol_range | Image volume range |
| status | Pointer to a string (allocated for at least 64 chars) where error message or other execution status will be written; enter NULL, if not needed |
Definition at line 742 of file vol.c.
| int vrdReorder | ( | VOL_RANGE * | vol_range | ) |
Reorder Volume Range Definition.
| vol_range | Image volume range; start and end range are set in correct order |
Definition at line 607 of file vol.c.
| int vrdVxlNr | ( | VOL_RANGE * | vol_range | ) |
Get the number of voxels in Volume Range Definition.
| vol_range | Image volume range; start and end range must be in correct order |
| char* _volStatusMessage[] |
Status (error) messages from volume processing
Definition at line 13 of file vol.c.
Referenced by img2svol(), img2vol(), svol2img(), svolAllocate(), svolEmpty(), svolInit(), vol2img(), volAllocate(), volEmpty(), and volInit().
| int VOL_TEST |
Verbose prints from Vol functions
Definition at line 6 of file vol.c.
Referenced by img2svol(), img2vol(), svol2img(), svolAllocate(), svolEmpty(), svolInfo(), svolInit(), vol2img(), volAllocate(), volEmpty(), volInfo(), and volInit().