
Go to the source code of this file.
Data Structures | |
| struct | VOL_PIXEL |
| struct | VOL_RANGE |
| struct | VOL |
| struct | SVOL |
Functions | |
| void | volInit (VOL *vol) |
| void | volEmpty (VOL *vol) |
| int | volAllocate (VOL *vol, int planes, int rows, int columns) |
| int | img2vol (IMG *img, VOL *vol, int frame) |
| int | vol2img (VOL *vol, IMG *img, int frame) |
| void | volInfo (VOL *vol, FILE *fp) |
| void | volContents (VOL *vol, VOL_RANGE r, FILE *fp) |
| int | volMax (VOL *vol, VOL_RANGE r, VOL_PIXEL *p, float *maxv) |
| int | volAvg (VOL *vol, VOL_RANGE r, float *avg) |
| void | svolInit (SVOL *svol) |
| void | svolEmpty (SVOL *svol) |
| int | svolAllocate (SVOL *svol, int planes, int rows, int columns) |
| int | img2svol (IMG *img, SVOL *svol, int frame) |
| int | svol2img (SVOL *svol, IMG *img, int frame) |
| void | svolInfo (SVOL *svol, FILE *fp) |
Variables | |
| int | VOL_TEST |
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 322 of file vol.c.
References _volStatusMessage, SVOL::dimx, IMG::dimx, SVOL::dimy, IMG::dimy, SVOL::dimz, IMG::dimz, IMG_STATUS_OCCUPIED, IMG_STATUS_UNINITIALIZED, imgFrameMinMax(), IMG::m, SVOL::orientation, IMG::orientation, SVOL::scale_factor, SVOL::sizex, IMG::sizex, SVOL::sizey, IMG::sizey, SVOL::sizez, IMG::sizez, SVOL::statmsg, SVOL::status, IMG::status, svolAllocate(), SVOL::v, and VOL_TEST.

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 284 of file vol.c.
References _volStatusMessage, VOL::dimx, IMG::dimx, VOL::dimy, IMG::dimy, VOL::dimz, IMG::dimz, IMG_STATUS_OCCUPIED, IMG_STATUS_UNINITIALIZED, IMG::m, VOL::orientation, IMG::orientation, VOL::sizex, IMG::sizex, VOL::sizey, IMG::sizey, VOL::sizez, IMG::sizez, VOL::statmsg, VOL::status, IMG::status, VOL::v, VOL_TEST, and volAllocate().

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 401 of file vol.c.
References _volStatusMessage, SVOL::dimx, IMG::dimx, SVOL::dimy, IMG::dimy, SVOL::dimz, IMG::dimz, IMG_STATUS_OCCUPIED, IMG::m, SVOL::scale_factor, SVOL::statmsg, SVOL::status, IMG::status, SVOL::v, and VOL_TEST.
| 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 221 of file vol.c.
References SVOL::_col, SVOL::_pln, SVOL::_row, _volStatusMessage, SVOL::_vxl, SVOL::column, SVOL::dimx, SVOL::dimy, SVOL::dimz, IMG_STATUS_OCCUPIED, IMG_STATUS_UNINITIALIZED, SVOL::plane, SVOL::row, SVOL::statmsg, SVOL::status, svolEmpty(), SVOL::v, VOL_TEST, and SVOL::voxel.
Referenced by img2svol().

| void svolEmpty | ( | SVOL * | svol | ) |
Free memory allocated for short int volume.
| svol | short int volume structure |
Definition at line 120 of file vol.c.
References SVOL::_col, SVOL::_pln, SVOL::_row, _volStatusMessage, SVOL::_vxl, SVOL::column, SVOL::dimx, SVOL::dimy, SVOL::dimz, IMG_STATUS_INITIALIZED, IMG_STATUS_OCCUPIED, SVOL::orientation, SVOL::plane, SVOL::row, SVOL::scale_factor, SVOL::sizex, SVOL::sizey, SVOL::sizez, SVOL::statmsg, SVOL::status, SVOL::v, VOL_TEST, and SVOL::voxel.
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 455 of file vol.c.
References SVOL::dimx, SVOL::dimy, SVOL::dimz, IMG_STATUS_ERROR, IMG_STATUS_INITIALIZED, IMG_STATUS_UNINITIALIZED, SVOL::orientation, SVOL::scale_factor, SVOL::sizex, SVOL::sizey, SVOL::sizez, SVOL::statmsg, SVOL::status, and VOL_TEST.
| 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 68 of file vol.c.
References _volStatusMessage, SVOL::column, SVOL::dimx, SVOL::dimy, SVOL::dimz, IMG_STATUS_INITIALIZED, SVOL::orientation, SVOL::plane, SVOL::row, SVOL::scale_factor, SVOL::sizex, SVOL::sizey, SVOL::sizez, SVOL::statmsg, SVOL::status, SVOL::v, VOL_TEST, and SVOL::voxel.
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 367 of file vol.c.
References _volStatusMessage, VOL::dimx, IMG::dimx, VOL::dimy, IMG::dimy, VOL::dimz, IMG::dimz, IMG_STATUS_OCCUPIED, IMG::m, VOL::statmsg, VOL::status, IMG::status, VOL::v, and VOL_TEST.
| 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 156 of file vol.c.
References VOL::_col, VOL::_pln, VOL::_row, _volStatusMessage, VOL::_vxl, VOL::column, VOL::dimx, VOL::dimy, VOL::dimz, IMG_STATUS_OCCUPIED, IMG_STATUS_UNINITIALIZED, VOL::plane, VOL::row, VOL::statmsg, VOL::status, VOL::v, VOL_TEST, volEmpty(), and VOL::voxel.
Referenced by img2vol().

Calculates average voxel value inside specified volume range.
| vol | volume structure |
| r | volume range structure |
| avg | target for average value |
Definition at line 545 of file vol.c.
References VOL::dimx, VOL::dimy, VOL::dimz, IMG_STATUS_OCCUPIED, VOL::status, VOL::v, VOL_RANGE::x1, VOL_RANGE::x2, VOL_RANGE::y1, VOL_RANGE::y2, VOL_RANGE::z1, and VOL_RANGE::z2.
Prints matrix values inside specified range to file pointer.
| vol | volume structure |
| r | volume range structure |
| fp | target file pointer |
Definition at line 480 of file vol.c.
References VOL::dimx, VOL::dimy, VOL::dimz, IMG_STATUS_OCCUPIED, VOL::status, VOL::v, VOL_RANGE::x1, VOL_RANGE::x2, VOL_RANGE::y1, VOL_RANGE::y2, VOL_RANGE::z1, and VOL_RANGE::z2.
| void volEmpty | ( | VOL * | vol | ) |
Free memory allocated for volume.
| vol | volume structure |
Definition at line 91 of file vol.c.
References VOL::_col, VOL::_pln, VOL::_row, _volStatusMessage, VOL::_vxl, VOL::column, VOL::dimx, VOL::dimy, VOL::dimz, IMG_STATUS_INITIALIZED, IMG_STATUS_OCCUPIED, VOL::orientation, VOL::plane, VOL::row, VOL::sizex, VOL::sizey, VOL::sizez, VOL::statmsg, VOL::status, VOL::v, VOL_TEST, and VOL::voxel.
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 431 of file vol.c.
References VOL::dimx, VOL::dimy, VOL::dimz, IMG_STATUS_ERROR, IMG_STATUS_INITIALIZED, IMG_STATUS_UNINITIALIZED, VOL::orientation, VOL::sizex, VOL::sizey, VOL::sizez, VOL::statmsg, VOL::status, and VOL_TEST.
| void volInit | ( | VOL * | vol | ) |
Initiate volume before any use of VOL data; this should be called once.
| vol | pointer to volume structure |
Definition at line 45 of file vol.c.
References _volStatusMessage, VOL::column, VOL::dimx, VOL::dimy, VOL::dimz, IMG_STATUS_INITIALIZED, VOL::orientation, VOL::plane, VOL::row, VOL::sizex, VOL::sizey, VOL::sizez, VOL::statmsg, VOL::status, VOL::v, VOL_TEST, and VOL::voxel.
Finds max voxel inside specified volume range.
| vol | volume structure |
| r | volume range structure |
| p | volume pixel structure |
| maxv | target for maximum value |
Definition at line 513 of file vol.c.
References VOL::dimx, VOL::dimy, VOL::dimz, IMG_STATUS_OCCUPIED, VOL::status, VOL::v, VOL_PIXEL::x, VOL_RANGE::x1, VOL_RANGE::x2, VOL_PIXEL::y, VOL_RANGE::y1, VOL_RANGE::y2, VOL_PIXEL::z, VOL_RANGE::z1, and VOL_RANGE::z2.
| int VOL_TEST |
Definition at line 20 of file vol.h.
Referenced by img2svol(), img2vol(), svol2img(), svolAllocate(), svolEmpty(), svolInfo(), svolInit(), vol2img(), volAllocate(), volEmpty(), volInfo(), and volInit().
1.8.11