Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

vol.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <time.h>
#include "include/img.h"
#include "include/imgproc.h"
#include "include/petc99.h"
#include "include/vol.h"

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 *p, float *maxv)
int volAvg (VOL *vol, VOL_RANGE r, float *avg)

Variables

char * _volStatusMessage []

Function Documentation

int img2svol IMG img,
SVOL svol,
int  frame
 

Copy one time frame (1..dimt) from 4D image to 3D short int volume. Svol can be but need not to be allocated. Returns 0 if ok.

int img2vol IMG img,
VOL vol,
int  frame
 

Copy one time frame (1..dimt) from 4D image to 3D volume. Vol can be but need not to be allocated. Returns 0 if ok.

int svol2img SVOL svol,
IMG img,
int  frame
 

Copy 3D short int volume as one time frame (1..dimt) into 4D image. Img must be allocated. Returns 0 if ok.

int svolAllocate SVOL svol,
int  planes,
int  rows,
int  columns
 

Allocate memory for 3D short int volume. Returns 0 if ok.

void svolEmpty SVOL svol  ) 
 

Free memory allocated for short int volume.

void svolInfo SVOL svol,
FILE *  fp
 

Prints short int volume information to specified file pointer, e.g. stdout

void svolInit SVOL svol  ) 
 

Initiate short int volume before any use of SVOL data; this should be called once.

int vol2img VOL vol,
IMG img,
int  frame
 

Copy 3D volume as one time frame (1..dimt) into 4D image. Img must be allocated. Returns 0 if ok.

int volAllocate VOL vol,
int  planes,
int  rows,
int  columns
 

Allocate memory for 3D image volume. Returns 0 if ok.

int volAvg VOL vol,
VOL_RANGE  r,
float *  avg
 

Calculates average voxel value inside specified volume range. Returns 0 if ok.

void volContents VOL vol,
VOL_RANGE  r,
FILE *  fp
 

Prints matrix values inside specified range to file pointer.

void volEmpty VOL vol  ) 
 

Free memory allocated for volume.

void volInfo VOL vol,
FILE *  fp
 

Prints volume information to specified file pointer, e.g. stdout

void volInit VOL vol  ) 
 

Initiate volume before any use of VOL data; this should be called once.

int volMax VOL vol,
VOL_RANGE  r,
VOL_PIXEL p,
float *  maxv
 

Finds max voxel inside specified volume range. Returns 0 if ok.


Variable Documentation

char* _volStatusMessage[]
 

Initial value:

 {
   "ok",
   "fault in calling routine",
   "out of memory"
}


Generated on Fri Jan 21 16:17:42 2005 for libPET by  doxygen 1.4.1