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

roi.h File Reference

#include "roi_Imadeus_IO.h"

Go to the source code of this file.

Defines

#define ROI_RECTANGULAR   0
#define ROI_CIRCULAR   1
#define ROI_ELLIPSE   2
#define ROI_TRACE   3

Typedefs

typedef _RoiList RoiList

Functions

const char * libpet_roi_version (void)
void roi_init (ROI_list *rl)
void roi_empty (ROI_list *rl)
void roi_delete (ROI_list *rl, ROI *roi)
void roi_delete_n (ROI_list *rl, int index)
int roi_read (const char *fname, ROI_list *rl)
int roi_save (const char *fname, ROI_list *rl)
int roi_append (FILE *fp, ROI *roi)
int roi_append_n (FILE *fp, ROI_list *rl, int ind)
int roi_onoff (ROI *roi, int dimx, int dimy, float zoom, char **m)
int roi_compute_rect (ROI *roi)
int roi_compute_circle (ROI *roi)
int roi_compute_ellipse (ROI *roi)
void roi_print (ROI *roi)
int jsqrt (int n)

Variables

char roierrmsg [128]


Define Documentation

#define ROI_CIRCULAR   1
 

#define ROI_ELLIPSE   2
 

#define ROI_RECTANGULAR   0
 

#define ROI_TRACE   3
 


Typedef Documentation

typedef struct _RoiList RoiList
 

A linked list for ROIs


Function Documentation

int jsqrt int  n  ) 
 

const char* libpet_roi_version void   ) 
 

int roi_append FILE *  fp,
ROI roi
 

int roi_append_n FILE *  fp,
ROI_list rl,
int  ind
 

int roi_compute_circle ROI roi  ) 
 

int roi_compute_ellipse ROI roi  ) 
 

int roi_compute_rect ROI roi  ) 
 

void roi_delete ROI_list rl,
ROI roi
 

Deletes ROI from roilist

void roi_delete_n ROI_list rl,
int  ind
 

Deletes the index:th ROI

void roi_empty ROI_list rl  ) 
 

Allocated memory is freed, all data is cleared.

void roi_init ROI_list rl  ) 
 

Before any use, this should be called, but not later.

int roi_onoff ROI roi,
int  dimx,
int  dimy,
float  zoom,
char **  m
 

The matrix is filled with 0's (outside of ROI) and 1's (inside the ROI border). If ROI extends outside image borders, those points are ignored. Matrix coordinates are up-to-bottom and left-to-right.

Returns:
Function returns 0, if everything is OK.
Parameters:
roi  Definitions for one region-of-interest
dimx  Image matrix x dimension
dimy  Image matrix y dimension
zoom  Image zoom
m  Allocated memory for output matrix[dimx][dimy]

void roi_print ROI roi  ) 
 

Prints the contents of (individual) roi data structure.

int roi_read const char *  fname,
ROI_list rl
 

Adds ROI file contents (all ROIs) to specified data structure.

Returns:
Returns 0, if OK.

int roi_save const char *  fname,
ROI_list rl
 


Variable Documentation

char roierrmsg[128]
 

The ROI library error message


Generated on Fri May 13 14:26:31 2005 by  doxygen 1.4.1