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

ecat7ml.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/ecat7.h"

Functions

void ecat7InitMatlist (ECAT7_MATRIXLIST *mlist)
void ecat7EmptyMatlist (ECAT7_MATRIXLIST *mlist)
int ecat7ReadMatlist (FILE *fp, ECAT7_MATRIXLIST *ml)
void ecat7PrintMatlist (ECAT7_MATRIXLIST *ml)
int ecat7EnterMatrix (FILE *fp, int matrix_id, int block_nr)
int ecat7_val_to_id (int frame, int plane, int gate, int data, int bed)
void ecat7_id_to_val (int matrix_id, ECAT7_Matval *matval)
void ecat7SortMatlistByPlane (ECAT7_MATRIXLIST *ml)
void ecat7SortMatlistByFrame (ECAT7_MATRIXLIST *ml)
int ecat7CheckMatlist (ECAT7_MATRIXLIST *ml)
int ecat7DeleteLateFrames (ECAT7_MATRIXLIST *ml, int frame_nr)

Function Documentation

void ecat7_id_to_val int  matrix_id,
ECAT7_Matval matval
 

Conversion of matrix identifier to numerical values

int ecat7_val_to_id int  frame,
int  plane,
int  gate,
int  data,
int  bed
 

Returns the matrix identifier

int ecat7CheckMatlist ECAT7_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 ecat7DeleteLateFrames ECAT7_MATRIXLIST ml,
int  frame_nr
 

Mark deleted the frames after the specified frame number.

Returns:
Returns the number of deleted matrices.

void ecat7EmptyMatlist ECAT7_MATRIXLIST mlist  ) 
 

Free memory allocated for ECAT matrix list.

int ecat7EnterMatrix FILE *  fp,
int  matrix_id,
int  block_nr
 

Prepare matrix list for additional matrix data and return block number for matrix header. Directory records are written in big endian byte order. Set block_nr to the number of data blocks + (nr of header blocks - 1)

Returns:
Returns the block number for matrix header, or <0 in case of an error.

void ecat7InitMatlist ECAT7_MATRIXLIST mlist  ) 
 

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

void ecat7PrintMatlist ECAT7_MATRIXLIST ml  ) 
 

Print ECAT matrix list on stdout.

int ecat7ReadMatlist FILE *  fp,
ECAT7_MATRIXLIST ml
 

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

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

void ecat7SortMatlistByFrame ECAT7_MATRIXLIST ml  ) 
 

Sort matrixlist by frame and plane

void ecat7SortMatlistByPlane ECAT7_MATRIXLIST ml  ) 
 

Sort matrixlist by plane and frame


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