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

oldroi.c File Reference

#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include "oldroi.h"
#include "petc99.h"

Functions

void roiDel (ROI_list *rl, int ind)
int roiRead (const char *fname, ROI_list *rl)
int roiComputeCirc (ROI *roi)
int roiComputeElli (ROI *roi)
int roiFillGaps (int *x, int *y, int nr, int **ffx, int **ffy)
int roiOnOff (ROI *roi, int dimx, int dimy, float zoom, char **m)
int roiSave (const char *fname, ROI_list *rl)
int roiAppend (char *fname, ROI_list *rl, int ind)

Function Documentation

int roiAppend char *  fname,
ROI_list rl,
int  ind
 

int roiComputeCirc ROI roi  ) 
 

int roiComputeElli ROI roi  ) 
 

void roiDel ROI_list rl,
int  ind
 

If ind=0, all ROIs in list are deleted keeping memory allocated, else only one ROI is deleted (ind=1, first ROI) keeping memory allocated.

int roiFillGaps int *  x,
int *  y,
int  nr,
int **  ffx,
int **  ffy
 

Fills the gaps between ROI points; join them with new points. Allocates memory for new point data in fx and fy.

Returns:
Returns the number of new points or =< 0, if error.

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

The matrix is filled with 0's (outside of ROI), 1's (on the ROI border), and 2'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 reconstruction zoom
m  Allocated memory for output matrix[dimx][dimy]

int roiRead const char *  fname,
ROI_list rl
 

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

Returns:
Returns 0, if OK.

int roiSave const char *  fname,
ROI_list rl
 


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