|
TPCCLIB
|
Functions for processing ECAT matrix list. More...
#include "tpcclibConfig.h"#include <stdio.h>#include <stdlib.h>#include <math.h>#include <time.h>#include <string.h>#include "tpcextensions.h"#include "tpcift.h"#include "tpcecat.h"Go to the source code of this file.
Functions | |
| void | ecatMListInit (ECAT_MATRIXLIST *ml) |
| void | ecatMListFree (ECAT_MATRIXLIST *ml) |
| void | ecatMListReadId (int format, unsigned int id, ECAT_MATVAL *mv) |
| unsigned int | ecatMListMakeId (int format, unsigned int frame, unsigned int plane, unsigned int gate, unsigned int data, unsigned int bed) |
| unsigned int | ecatMValToId (int format, ECAT_MATVAL *mv) |
| int | ecatMListRead (int format, FILE *fp, ECAT_MATRIXLIST *ml, TPCSTATUS *status) |
| void | ecatMListPrint (int format, ECAT_MATRIXLIST *ml, FILE *fp) |
Functions for processing ECAT matrix list.
Definition in file ecatmatrixlist.c.
| void ecatMListFree | ( | ECAT_MATRIXLIST * | ml | ) |
Free memory allocated for ECAT matrix list. All contents are destroyed.
| ml | Pointer to matrix list. |
Definition at line 38 of file ecatmatrixlist.c.
Referenced by ecatMListRead().
| void ecatMListInit | ( | ECAT_MATRIXLIST * | ml | ) |
Initiate the ECAT matrix list struct before any use.
| ml | Pointer to matrix list. |
Definition at line 23 of file ecatmatrixlist.c.
| unsigned int ecatMListMakeId | ( | int | format, |
| unsigned int | frame, | ||
| unsigned int | plane, | ||
| unsigned int | gate, | ||
| unsigned int | data, | ||
| unsigned int | bed ) |
Make matrix identifier (matnum) code for specific matrix.
| format | ECAT format: 6 or 7. |
| frame | Frame [0..511] for ECAT7, [0..4095] for ECAT6. |
| plane | Plane [0..1023] for ECAT7, [0..255] for ECAT6. |
| gate | Gate [0..63]. |
| data | Data [0..7] for ECAT7, [0..3] for ECAT6. |
| bed | Bed position [0..15]. |
Definition at line 84 of file ecatmatrixlist.c.
Referenced by ecatMValToId().
| void ecatMListPrint | ( | int | format, |
| ECAT_MATRIXLIST * | ml, | ||
| FILE * | fp ) |
Print ECAT matrix list.
| format | ECAT format: 6 or 7. |
| ml | Pointer to matrix list to print. |
| fp | File pointer to print to; usually stdout. |
Definition at line 250 of file ecatmatrixlist.c.
| int ecatMListRead | ( | int | format, |
| FILE * | fp, | ||
| ECAT_MATRIXLIST * | ml, | ||
| TPCSTATUS * | status ) |
Read ECAT matrix list from ECAT file.
| format | ECAT format: 6 or 7. |
| fp | File pointer of file, opened with fp=fopen(filename, "rb"), to read the matrix list from. |
| ml | Pointer to initiated matrix list; any previous content is deleted. |
| status | Pointer to status data; enter NULL if not needed. |
Definition at line 140 of file ecatmatrixlist.c.
| void ecatMListReadId | ( | int | format, |
| unsigned int | id, | ||
| ECAT_MATVAL * | mv ) |
Read matrix identifier code (matnum) into matrix value structure.
| format | ECAT format: 6 or 7. |
| id | Matrix identifier code (matnum) to decode. |
| mv | Pointer to data structure in where frame, plane etc numbers are written. |
Definition at line 52 of file ecatmatrixlist.c.
Referenced by ecatMListPrint().
| unsigned int ecatMValToId | ( | int | format, |
| ECAT_MATVAL * | mv ) |
Make matrix identifier (matnum) code for specific matrix.
| format | ECAT format: 6 or 7. |
| mv | Pointer to data structure from where frame, plane etc numbers are read. |
Definition at line 124 of file ecatmatrixlist.c.