imgfile.h
Go to the documentation of this file.
00001 /******************************************************************************
00002   Copyright (c)  2003-2007 by Turku PET Centre
00003 
00004   imgfile.h - definitions for imgfile.c
00005 
00006   Version:
00007   2003-07-17 Vesa Oikonen
00008   2003-07-21 VO
00009   2003-07-25 VO
00010   2003-07-26 VO
00011   2003-09-04 VO
00012   2003-10-04 VO
00013   2004-09-24 VO
00014   2006-10-30 VO
00015   2007-01-29 VO
00016   2007-03-25 VO
00017 
00018 
00019 ******************************************************************************/
00020 #ifndef _IMGFILE_H
00021 #define _IMGFILE_H
00022 /*****************************************************************************/
00023 #include "img.h"
00024 #include "ecat7.h"
00025 #include "ecat63.h"
00026 #include "analyze.h"
00027 #include "imgunit.h"
00028 /*****************************************************************************/
00029 extern int imgRead(const char *fname, IMG *img);
00030 extern int imgReadMainHeader(const char *fname, IMG *img);
00031 extern int imgWrite(const char *fname, IMG *img);
00032 extern int imgReadHeader(const char *fname, IMG *img);
00033 extern int imgReadNextFrame(char *fname, IMG *img);
00034 extern int imgReadFrame(const char *fname, int frame_to_read, IMG *img, int frame_index);
00035 extern int imgWriteFrame(const char *fname, int frame_to_write, IMG *img, int frame_index);
00036 extern void imgFormatFromFName(IMG *img, const char *fname);
00037 /*****************************************************************************/
00038 extern int ecat63ReadAllToImg(const char *fname, IMG *img);
00039 extern int ecat63WriteAllImg(const char *fname, IMG *img);
00040 extern int ecat63ReadPlaneToImg(const char *fname, IMG *img);
00041 extern int ecat63AddImg(const char *fname, IMG *img);
00042 extern void imgGetEcat63MHeader(IMG *img, ECAT63_mainheader *h);
00043 extern void imgSetEcat63MHeader(IMG *img, ECAT63_mainheader *h);
00044 extern int imgEcat63Supported(ECAT63_mainheader *h);
00045 extern int imgGetEcat63Fileformat(ECAT63_mainheader *h);
00046 extern int imgReadEcat63Header(const char *fname, IMG *img);
00047 extern int imgReadEcat63FirstFrame(const char *fname, IMG *img);
00048 extern int imgReadEcat63Frame(const char *fname, int frame_to_read, IMG *img, int frame_index);
00049 extern int imgWriteEcat63Frame(const char *fname, int frame_to_write, IMG *img, int frame_index);
00050 extern void imgSetEcat63SHeader(IMG *img, void *h);
00051 /*****************************************************************************/
00052 extern int imgReadEcat7(const char *fname, IMG *img);
00053 extern int imgWriteEcat7(const char *fname, IMG *img);
00054 extern int imgWrite2DEcat7(const char *fname, IMG *img);
00055 extern int imgWritePolarmap(const char *fname, IMG *img);
00056 /*****************************************************************************/
00057 extern void imgGetEcat7MHeader(IMG *img, ECAT7_mainheader *h);
00058 extern void imgSetEcat7MHeader(IMG *img, ECAT7_mainheader *h);
00059 extern int imgReadEcat7Header(const char *fname, IMG *img);
00060 extern int imgEcat7Supported(ECAT7_mainheader *h);
00061 extern int imgReadEcat7Frame(const char *fname, int frame_to_read, IMG *img, int frame_index);
00062 extern int imgReadEcat7FirstFrame(const char *fname, IMG *img);
00063 extern int imgGetEcat7Fileformat(ECAT7_mainheader *h);
00064 extern int imgWriteEcat7Frame(const char *fname, int frame_to_write, IMG *img, int frame_index);
00065 extern void imgSetEcat7SHeader(IMG *img, void *h);
00066 /*****************************************************************************/
00067 extern int imgReadAnalyze(const char *dbname, IMG *img);
00068 extern int imgWriteAnalyze(const char *dbname, IMG *img);
00069 extern int imgReadAnalyzeHeader(const char *dbname, IMG *img);
00070 extern int imgGetAnalyzeHeader(IMG *img, ANALYZE_DSR *h);
00071 extern int imgSetAnalyzeHeader(IMG *img, const char *dbname, ANALYZE_DSR *h, float fmin, float fmax);
00072 extern int imgReadAnalyzeFrame(const char *dbname, int frame_to_read, IMG *img, int frame_index);
00073 extern int imgReadAnalyzeFirstFrame(const char *fname, IMG *img);
00074 extern int imgWriteAnalyzeFrame(const char *fname, int frame_to_write, IMG *img, int frame_index, float fmin, float fmax);
00075 /*****************************************************************************/
00076 #endif /* _IMGFILE_H */
00077