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

ecat63ml.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <ctype.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#include "include/swap.h"
#include "include/ecat63.h"

Functions

void ecat63InitMatlist (MATRIXLIST *mlist)
void ecat63EmptyMatlist (MATRIXLIST *mlist)
int ecat63ReadMatlist (FILE *fp, MATRIXLIST *ml)
void ecat63PrintMatlist (MATRIXLIST *ml)
int ecat63Matenter (FILE *fp, int matnum, int blkNr)
int mat_numcod (int frame, int plane, int gate, int data, int bed)
void mat_numdoc (int matnum, Matval *matval)
void ecat63SortMatlistByPlane (MATRIXLIST *ml)
void ecat63SortMatlistByFrame (MATRIXLIST *ml)
int ecat63CheckMatlist (MATRIXLIST *ml)
int ecat63DeleteLateFrames (MATRIXLIST *ml, int frame_nr)

Function Documentation

int ecat63CheckMatlist MATRIXLIST ml  ) 
 

Checks that all matrixlist entries have read/write status.

Returns:
Returns 0 if ok, or 1 if an entry is marked as deleted or unfinished.

int ecat63DeleteLateFrames MATRIXLIST ml,
int  frame_nr
 

Mark deleted the frames after the specified frame number. This can be used to delete sum images from the end of dynamic ECAT images.

Returns:
Returns the number of deleted matrices.

void ecat63EmptyMatlist MATRIXLIST mlist  ) 
 

Free memory allocated for ECAT matrix list

void ecat63InitMatlist MATRIXLIST mlist  ) 
 

Initiate ECAT matrix list. Call this once before first use.

int ecat63Matenter FILE *  fp,
int  matnum,
int  blkNr
 

Prepare matrix list for additional matrix data and return block number for matrix header, or <0 in case of an error. Directory records are written in big endian byte order. Set block_nr to the number of data blocks excluding header;

void ecat63PrintMatlist MATRIXLIST ml  ) 
 

Print ECAT matrix list on stdout.

int ecat63ReadMatlist FILE *  fp,
MATRIXLIST ml
 

Read ECAT matrix list. Matrix list must be initiated (once) before calling this.

Returns:
Returns 0 if ok, >0 in case of an error.

void ecat63SortMatlistByFrame MATRIXLIST ml  ) 
 

Sort matrixlist by frame and plane

void ecat63SortMatlistByPlane MATRIXLIST ml  ) 
 

Sort matrixlist by plane and frame

int mat_numcod int  frame,
int  plane,
int  gate,
int  data,
int  bed
 

Returns the matrix identifier

void mat_numdoc int  matnum,
Matval matval
 

Conversion of matrix identifier to numerical values


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