00001 /* 00002 * 00003 * Copyright (C) 2000-2005, OFFIS 00004 * 00005 * This software and supporting documentation were developed by 00006 * 00007 * Kuratorium OFFIS e.V. 00008 * Healthcare Information and Communication Systems 00009 * Escherweg 2 00010 * D-26121 Oldenburg, Germany 00011 * 00012 * THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND OFFIS MAKES NO WARRANTY 00013 * REGARDING THE SOFTWARE, ITS PERFORMANCE, ITS MERCHANTABILITY OR 00014 * FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES OR 00015 * ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND 00016 * PERFORMANCE OF THE SOFTWARE IS WITH THE USER. 00017 * 00018 * Module: dcmsr 00019 * 00020 * Author: Joerg Riesmeier 00021 * 00022 * Purpose: 00023 * classes: DSRDateTimeTreeNode 00024 * 00025 * Last Update: $Author: meichel $ 00026 * Update Date: $Date: 2005/12/08 16:05:02 $ 00027 * CVS/RCS Revision: $Revision: 1.11 $ 00028 * Status: $State: Exp $ 00029 * 00030 * CVS/RCS Log at end of file 00031 * 00032 */ 00033 00034 00035 #ifndef DSRDTITN_H 00036 #define DSRDTITN_H 00037 00038 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00039 00040 #include "dcmtk/dcmsr/dsrdoctn.h" 00041 #include "dcmtk/dcmsr/dsrstrvl.h" 00042 00043 00044 /*---------------------* 00045 * class declaration * 00046 *---------------------*/ 00047 00050 class DSRDateTimeTreeNode 00051 : public DSRDocumentTreeNode, 00052 public DSRStringValue 00053 { 00054 00055 public: 00056 00061 DSRDateTimeTreeNode(const E_RelationshipType relationshipType); 00062 00068 DSRDateTimeTreeNode(const E_RelationshipType relationshipType, 00069 const OFString &stringValue); 00070 00073 virtual ~DSRDateTimeTreeNode(); 00074 00078 virtual void clear(); 00079 00084 virtual OFBool isValid() const; 00085 00092 virtual OFCondition print(ostream &stream, 00093 const size_t flags) const; 00094 00101 virtual OFCondition writeXML(ostream &stream, 00102 const size_t flags, 00103 OFConsole *logStream) const; 00104 00105 // --- static helper function --- 00106 00116 static OFString &getValueFromXMLNodeContent(const DSRXMLDocument &doc, 00117 DSRXMLCursor cursor, 00118 OFString &dateTimeValue, 00119 const OFBool clearString = OFTrue); 00120 00121 00122 protected: 00123 00129 virtual OFCondition readContentItem(DcmItem &dataset, 00130 OFConsole *logStream); 00131 00137 virtual OFCondition writeContentItem(DcmItem &dataset, 00138 OFConsole *logStream) const; 00139 00145 virtual OFCondition readXMLContentItem(const DSRXMLDocument &doc, 00146 DSRXMLCursor cursor); 00147 00158 virtual OFCondition renderHTMLContentItem(ostream &docStream, 00159 ostream &annexStream, 00160 const size_t nestingLevel, 00161 size_t &annexNumber, 00162 const size_t flags, 00163 OFConsole *logStream) const; 00164 00165 00166 private: 00167 00168 // --- declaration of default/copy constructor and assignment operator 00169 00170 DSRDateTimeTreeNode(); 00171 DSRDateTimeTreeNode(const DSRDateTimeTreeNode &); 00172 DSRDateTimeTreeNode &operator=(const DSRDateTimeTreeNode &); 00173 }; 00174 00175 00176 #endif 00177 00178 00179 /* 00180 * CVS/RCS Log: 00181 * $Log: dsrdtitn.h,v $ 00182 * Revision 1.11 2005/12/08 16:05:02 meichel 00183 * Changed include path schema for all DCMTK header files 00184 * 00185 * Revision 1.10 2004/01/16 09:58:21 joergr 00186 * Adapted XML output format of Date, Time and Datetime to XML Schema (ISO) 00187 * requirements. 00188 * 00189 * Revision 1.9 2003/09/15 14:18:54 joergr 00190 * Introduced new class to facilitate checking of SR IOD relationship content 00191 * constraints. Replaced old implementation distributed over numerous classes. 00192 * 00193 * Revision 1.8 2003/08/07 12:35:55 joergr 00194 * Added readXML functionality. 00195 * 00196 * Revision 1.7 2001/11/09 16:10:50 joergr 00197 * Added preliminary support for Mammography CAD SR. 00198 * 00199 * Revision 1.6 2001/09/26 13:04:08 meichel 00200 * Adapted dcmsr to class OFCondition 00201 * 00202 * Revision 1.5 2001/06/01 15:51:00 meichel 00203 * Updated copyright header 00204 * 00205 * Revision 1.4 2000/11/07 18:14:29 joergr 00206 * Enhanced support for by-reference relationships. 00207 * 00208 * Revision 1.3 2000/11/01 16:23:20 joergr 00209 * Added support for conversion to XML. 00210 * 00211 * Revision 1.2 2000/10/23 15:10:56 joergr 00212 * Added clear() method. 00213 * Added/updated doc++ comments. 00214 * 00215 * Revision 1.1 2000/10/13 07:49:27 joergr 00216 * Added new module 'dcmsr' providing access to DICOM structured reporting 00217 * documents (supplement 23). Doc++ documentation not yet completed. 00218 * 00219 * 00220 */