Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals

iddcm.h

Go to the documentation of this file.
00001 /************************************************************************* 00002 * $Id: iddcm.h,v 1.1 2005/09/09 08:22:28 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 #ifndef _IDDCM_H 00037 #define _IDDCM_H 00038 00039 #include "idcommon.h" 00040 #include <stdio.h> 00041 #include "idswig.h" 00042 #include "idliste.h" 00043 00044 #include "idima-ido.h" 00045 00046 00047 #ifdef _MSC_VER 00048 #ifndef __CYGWIN__ 00049 #include <Basetsd.h> 00050 #endif 00051 #endif 00052 00053 // ======================================================================================= 00054 00055 00056 typedef struct { 00057 int Gr; // numero de groupe 00058 int Num; // numero elem 00059 size_t LgrLueElem; // Longueur Lue 00060 size_t LgrElem; // Longueur retenue pour l'exploration 00061 int Swap; // 1 si l'elem a ete swappé -> Est-ce positionne correctement ? 00062 int Offset; // offset ( a partir début fichier) 00063 char *VR; // VR de l'element 00064 char *DicomDescr; // Definition trouvee dans Dicom Dictionnary 00065 int TypeDonnee; // 0 : char ; 1 : short int; 2 : long int; 00066 char *valeurElem; // pointeur sur le début de la valeur (dans tous les cas) 00067 uint32_t valInt; // n'a de sens que si Swap != 0 et lgrLueElem=4 // GROS SOUCIS 00068 uint16_t valShort; // n'a de sens que si Swap != 0 et lgrLueElem=2 // utiliser str2num(valeurElem,... 00069 00070 } _ID_DCM_ELEM; 00071 00072 00073 typedef struct { 00074 00075 char * filename; // nom du fichier 00076 FILE * fp; 00077 long int taille_fich; 00078 int nbElem; // Nbre de dicom elements dans l'entete. 00079 00080 char * _message; 00081 00082 int sw; // code Swap (0, 4321, 2143, 3412) 00083 int net2host; // =1 : meme ordre; =0 ordre inverse 00084 int ACR_LIBIDO; 00085 int __ExplicitVR; 00086 int __TrueDicom; 00087 00088 int grPixelTrouve; 00089 unsigned short int grPixel; 00090 unsigned short int numPixel; 00091 int PixelsTrouves; 00092 long int PixelPosition; 00093 00094 unsigned short int __NumeroGroupePrecedent; 00095 char * deb; // zone qui recevra de debut de l'entete 00096 long int offsetCourant; 00097 _ID_DCM_ELEM *pleCourant; 00098 00099 PLIST plist; 00100 00101 } ID_DCM_HDR; 00102 00103 00104 00105 00106 // ======================================================================================= 00107 00108 #define str2num(str, typeNum) *((typeNum *)(str)) 00109 00110 ID_DCM_HDR * IdDcmHdrAlloc (void); 00111 void IdDcmHdrFree (ID_DCM_HDR *); 00112 00113 00114 #define IdDcmGetPixelOffset(e) ((e)->PixelPosition) 00115 #define IdDcmGetPFileName(e) ((e)->filename) 00116 00117 00118 ID_DCM_HDR *IdDcmGetHeader (char *); 00119 int IdDcmIsAcrLibido (ID_DCM_HDR *); 00120 int IdDcmIsJpegLossless (ID_DCM_HDR *); 00121 int IdDcmIsUncompressed (ID_DCM_HDR *); 00122 ID_DCM_HDR *IdDcmIsDcmReadable (char *); 00123 00124 void *IdDcmReadFile (char * , int ); 00125 void *IdDcmReadFileFromDcmHdr (ID_DCM_HDR *, int ); 00126 void *IdDcmMultiFrameReadFile (char *, int , int , int ); 00127 void *IdDcmMultiFrameReadFileFromDcmHdr (ID_DCM_HDR *, int , int , int ); 00128 void *IdDcmReadFileIntoVector (char *, int , int , int , void * ); 00129 void *IdDcmReadFileIntoVectorFromDcmHdr (ID_DCM_HDR *, int , int , int , void * ); 00130 00131 int IdDcmWriteFile (ID_DCM_HDR * , PPIMAGE ); 00132 00133 char ** IdDcmInquireImageInfoFromFile (char *); 00134 char ** IdDcmInquireImageInfoFromDcmHdr (ID_DCM_HDR *); 00135 int IdDcmPrintImageInfo (char **); 00136 void IdDcmAffDcmHdr (ID_DCM_HDR *, int, int); 00137 00138 00139 int IdDcmInquireInfoFromFile (char *, unsigned short int * OUTPUT, 00140 unsigned short int * OUTPUT, 00141 unsigned short int * OUTPUT, int * OUTPUT, 00142 int * OUTPUT, int * OUTPUT, int * OUTPUT, 00143 int * OUTPUT, int * OUTPUT, int * OUTPUT, 00144 int * OUTPUT, int * OUTPUT, int * OUTPUT, 00145 int * OUTPUT); 00146 00147 int IdDcmInquireInfoFromDcmHdr (ID_DCM_HDR *, unsigned short int * OUTPUT, 00148 unsigned short int * OUTPUT, 00149 unsigned short int * OUTPUT, int * OUTPUT, 00150 int * OUTPUT, int * OUTPUT, int * OUTPUT, 00151 int * OUTPUT, int * OUTPUT, int * OUTPUT, 00152 int * OUTPUT, int * OUTPUT, int * OUTPUT, 00153 int * OUTPUT); 00154 00155 char * _IdDcmReadElementFromLabel(char *libelle, ID_DCM_HDR * e, 00156 char * vr, void *buff); 00157 00158 00159 #endif

Generated on Wed Oct 19 09:28:33 2005 for SIMRI3D by doxygen 1.3.7