00001 /************************************************************************* 00002 * $Id: iddcmjpeg.h,v 1.1 2005/09/09 08:22:29 bellet Exp $ 00003 ************************************************************************** 00004 This software is governed by the CeCILL license under French law and 00005 abiding by the rules of distribution of free software. You can use, 00006 modify and/ or redistribute the software under the terms of the CeCILL 00007 license as circulated by CEA, CNRS and INRIA at the following URL 00008 "http://www.cecill.info". 00009 00010 As a counterpart to the access to the source code and rights to copy, 00011 modify and redistribute granted by the license, users are provided only 00012 with a limited warranty and the software's author, the holder of the 00013 economic rights, and the successive licensors have only limited 00014 liability. 00015 00016 In this respect, the user's attention is drawn to the risks associated 00017 with loading, using, modifying and/or developing or reproducing the 00018 software by the user in light of its specific status of free software, 00019 that may mean that it is complicated to manipulate, and that also 00020 therefore means that it is reserved for developers and experienced 00021 professionals having in-depth computer knowledge. Users are therefore 00022 encouraged to load and test the software's suitability as regards their 00023 requirements in conditions enabling the security of their systems and/or 00024 data to be ensured and, more generally, to use and operate it in the 00025 same conditions as regards security. 00026 00027 The fact that you are presently reading this means that you have had 00028 knowledge of the CeCILL license and that you accept its terms. 00029 00030 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de 00031 l'Image). All rights reserved. See License.txt for details. 00032 00033 Version 1.0 05/09/2005 00034 *************************************************************************/ 00035 00036 #include <stdio.h> 00037 //#include <glib.h> 00038 #include <string.h> 00039 00040 #define BOOL int 00041 00042 typedef struct { 00043 int HufSz; 00044 int HufCode; 00045 int HufVal; 00046 } HuffTable; 00047 00048 00049 typedef struct { 00050 unsigned char precision; 00051 int Himg; 00052 int Wimg; 00053 unsigned char NbComponent; 00054 long SofTabPos; 00055 } Sof; 00056 00057 00058 typedef struct { 00059 unsigned char CompCount; 00060 unsigned char CompId; 00061 unsigned char CompDc; 00062 unsigned char SpectralSelStart; 00063 unsigned char SpectralSelEnd; 00064 unsigned char SuccessiveAp; 00065 unsigned char Sospttrans; 00066 long SofTabPos; 00067 } Sos; 00068 00069 00070 typedef struct { 00071 unsigned long RestartInterval; 00072 BOOL MarkerFound; 00073 int MaxHuffVal; 00074 int MaxHuffSz; 00075 int* DataImg; 00076 unsigned char RawDHT[256]; 00077 unsigned char ValCurByte; 00078 unsigned char PosCurBit; 00079 FILE* infp; 00080 unsigned char RawDHTstart[256]; 00081 Sof lSof; 00082 Sos lSos; 00083 HuffTable lHuffTable[256]; 00084 } ClbJpeg; 00085 00086 00087 ClbJpeg*_IdDcmJpegRead (FILE *); 00088 void _IdDcmJpegFree (ClbJpeg *); 00089 int gdcm_read_JPEG_file (void *,FILE *); 00090 00091 00092 // 00093 00094 00095 00096 00097