00001 /* 00002 ** Copyright (C) 1993/1994, OFFIS, Oldenburg University and CERIUM 00003 ** 00004 ** This software and supporting documentation were 00005 ** developed by 00006 ** 00007 ** Institut OFFIS 00008 ** Bereich Kommunikationssysteme 00009 ** Westerstr. 10-12 00010 ** 26121 Oldenburg, Germany 00011 ** 00012 ** Fachbereich Informatik 00013 ** Abteilung Prozessinformatik 00014 ** Carl von Ossietzky Universitaet Oldenburg 00015 ** Ammerlaender Heerstr. 114-118 00016 ** 26111 Oldenburg, Germany 00017 ** 00018 ** CERIUM 00019 ** Laboratoire SIM 00020 ** Faculte de Medecine 00021 ** 2 Avenue du Pr. Leon Bernard 00022 ** 35043 Rennes Cedex, France 00023 ** 00024 ** for CEN/TC251/WG4 as a contribution to the Radiological 00025 ** Society of North America (RSNA) 1993 Digital Imaging and 00026 ** Communications in Medicine (DICOM) Demonstration. 00027 ** 00028 ** THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND NEITHER OFFIS, 00029 ** OLDENBURG UNIVERSITY NOR CERIUM MAKE ANY WARRANTY REGARDING 00030 ** THE SOFTWARE, ITS PERFORMANCE, ITS MERCHANTABILITY OR 00031 ** FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER 00032 ** DISEASES OR ITS CONFORMITY TO ANY SPECIFICATION. THE 00033 ** ENTIRE RISK AS TO QUALITY AND PERFORMANCE OF THE SOFTWARE 00034 ** IS WITH THE USER. 00035 ** 00036 ** Copyright of the software and supporting documentation 00037 ** is, unless otherwise stated, jointly owned by OFFIS, 00038 ** Oldenburg University and CERIUM and free access is hereby 00039 ** granted as a license to use this software, copy this 00040 ** software and prepare derivative works based upon this 00041 ** software. However, any distribution of this software 00042 ** source code or supporting documentation or derivative 00043 ** works (source code and supporting documentation) must 00044 ** include the three paragraphs of this copyright notice. 00045 ** 00046 */ 00047 /* 00048 ** 00049 ** Author: Andrew Hewett Created: 11-08-93 00050 ** 00051 ** Module: diutil 00052 ** 00053 ** Purpose: 00054 ** This file contains the interface to 00055 ** some general useful dicom utility routines 00056 ** 00057 ** Module Prefix: DU_ 00058 ** 00059 ** 00060 ** Last Update: $Author: meichel $ 00061 ** Update Date: $Date: 2005/12/08 16:02:22 $ 00062 ** Source File: $Source: /share/dicom/cvs-depot/dcmtk/dcmnet/include/dcmtk/dcmnet/diutil.h,v $ 00063 ** CVS/RCS Revision: $Revision: 1.7 $ 00064 ** Status: $State: Exp $ 00065 ** 00066 ** CVS/RCS Log at end of file 00067 */ 00068 00069 #ifndef DIUTIL_H 00070 #define DIUTIL_H 00071 00072 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00073 00074 #include "dcmtk/dcmnet/dicom.h" 00075 #include "dcmtk/dcmdata/dcdatset.h" 00076 #include "dcmtk/dcmnet/dimse.h" 00077 00078 char* DU_stripTrailingSpaces(char *s); 00079 char* DU_stripLeadingSpaces(char *s); 00080 char* DU_stripLeadingAndTrailingSpaces(char *s); 00081 00082 OFBool DU_getStringDOElement(DcmItem *obj, DcmTagKey t, char *s); 00083 OFBool DU_putStringDOElement(DcmItem *obj, DcmTagKey t, const char *s); 00084 OFBool DU_getShortDOElement(DcmItem *obj, DcmTagKey t, Uint16 *us); 00085 OFBool DU_putShortDOElement(DcmItem *obj, DcmTagKey t, Uint16 us); 00086 00087 OFBool DU_findSOPClassAndInstanceInDataSet( 00088 DcmItem *obj, 00089 char* sopClass, 00090 char* sopInstance, 00091 OFBool tolerateSpacePaddedUIDs = OFFalse); 00092 00093 OFBool DU_findSOPClassAndInstanceInFile( 00094 const char *fname, 00095 char* sopClass, 00096 char* sopInstance, 00097 OFBool tolerateSpacePaddedUIDs = OFFalse); 00098 00099 unsigned long DU_fileSize(const char *fname); 00100 00101 const char *DU_cstoreStatusString(Uint16 statusCode); 00102 const char *DU_cfindStatusString(Uint16 statusCode); 00103 const char *DU_cmoveStatusString(Uint16 statusCode); 00104 const char *DU_cgetStatusString(Uint16 statusCode); 00105 00106 #endif 00107 00108 /* 00109 ** CVS Log 00110 ** $Log: diutil.h,v $ 00111 ** Revision 1.7 2005/12/08 16:02:22 meichel 00112 ** Changed include path schema for all DCMTK header files 00113 ** 00114 ** Revision 1.6 2002/11/25 18:00:37 meichel 00115 ** Converted compile time option to leniently handle space padded UIDs 00116 ** in the Storage Service Class into command line / config file option. 00117 ** 00118 ** Revision 1.5 2000/02/03 11:50:11 meichel 00119 ** Moved UID related functions from dcmnet (diutil.h) to dcmdata (dcuid.h) 00120 ** where they belong. Renamed access functions to dcmSOPClassUIDToModality 00121 ** and dcmGuessModalityBytes. 00122 ** 00123 ** Revision 1.4 1999/06/10 10:56:35 meichel 00124 ** Adapted imagectn to new command line option scheme. 00125 ** Added support for Patient/Study Only Q/R model and C-GET (experimental). 00126 ** 00127 ** Revision 1.3 1998/01/14 14:37:06 hewett 00128 ** Added basic support for the Structured Reporting (SR) SOP Classes. 00129 ** 00130 ** Revision 1.2 1997/07/21 08:40:11 andreas 00131 ** - Replace all boolean types (BOOLEAN, CTNBOOLEAN, DICOM_BOOL, BOOL) 00132 ** with one unique boolean type OFBool. 00133 ** 00134 ** Revision 1.1.1.1 1996/03/26 18:38:45 hewett 00135 ** Initial Release. 00136 ** 00137 ** 00138 */