/* * The Npic library * * Copyright (C) 2003 Edouard Thiel * * This library is free software under the terms of the * GNU Lesser General Public License (LGPL) version 2.1. */ /* * files_pan.h - 07/12/2007 * * PAN - multidimensionnal image format from Pandore library * * see http://www.greyc.ensicaen.fr/EquipeImage/Pandore/ */ #ifndef NPIC__FILES_PAN_H #define NPIC__FILES_PAN_H /* PUBLIC */ int NpicWritePAN (Npic_image *np, const char *filename, Npic_file_compress comp); Npic_image *NpicReadPAN (const char *filename, Npic_file_compress comp); int NpicInfoPAN (const char *filename, Npic_file_compress comp); /* PRIVATE */ /* Adapted from pandore:include/panfile.h */ #define NPIC_PAN_MAGIC "PANDORE04" enum { /* DO NOT CHANGE THIS ORDERING */ NPIC_PAN_Unknown, NPIC_PAN_Collection, NPIC_PAN_Img1duc, NPIC_PAN_Img1dsl, NPIC_PAN_Img1dsf, NPIC_PAN_Img2duc, NPIC_PAN_Img2dsl, NPIC_PAN_Img2dsf, NPIC_PAN_Img3duc, NPIC_PAN_Img3dsl, NPIC_PAN_Img3dsf, NPIC_PAN_Reg1d, NPIC_PAN_Reg2d, NPIC_PAN_Reg3d, NPIC_PAN_Graph2d, NPIC_PAN_Graph3d, NPIC_PAN_Imc2duc, NPIC_PAN_Imc2dsl, NPIC_PAN_Imc2dsf, NPIC_PAN_Imc3duc, NPIC_PAN_Imc3dsl, NPIC_PAN_Imc3dsf, NPIC_PAN_Imx1duc, NPIC_PAN_Imx1dsl, NPIC_PAN4_Imx1dul, NPIC_PAN_Imx1dsf, NPIC_PAN_Imx2duc, NPIC_PAN_Imx2dsl, NPIC_PAN4_Imx2dul, NPIC_PAN_Imx2dsf, NPIC_PAN_Imx3duc, NPIC_PAN_Imx3dsl, NPIC_PAN4_Imx3dul, NPIC_PAN_Imx3dsf, NPIC_PAN_Point1d, NPIC_PAN_Point2d, NPIC_PAN_Point3d, NPIC_PAN_Dimension1d, NPIC_PAN_Dimension2d, NPIC_PAN_Dimension3d }; /* Bynary header for PAN file */ typedef struct { char magic[12]; /* The magic number (12 bytes). */ Npic_sint32 potype; /* The object type (4 bytes). */ char ident[9]; /* The author name (9 bytes + 1 complement \0). */ char date[10]; /* The creation date (10 bytes). */ char unused[1]; /* Unused */ } Npic_pan_header; typedef struct { char magic[16]; /* The magic number. */ Npic_sint32 potype; /* The object type. */ char ident[16]; /* The author name. */ char date[16]; /* The creation date. */ int nband, ndep, nrow, ncol; /* Image size */ int swap; /* TRUE if values have to be byte-swapped */ int npic_type; /* The equivalent NPIC type */ int npic_dim; /* The NPIC dimension */ } Npic_pan_info; int NpicPANWriteFile (Npic_image *np, FILE *f1, const char *filename, const char *funcname); Npic_image *NpicPANReadFile (FILE *f1, const char *filename, const char *funcname); int NPicPANReadInfo (FILE *f1, Npic_pan_info *info); int NpicPANReadDatas (Npic_image *np, FILE *f1, int swap); int NpicPANPrintInfo (const char *filename, Npic_pan_info *info); const char *NpicPANPotypeName (Npic_sint32 potype); #endif /* NPIC__FILES_PAN_H */