00001 /* 00002 * 00003 * Copyright (C) 2000-2010, OFFIS e.V. 00004 * All rights reserved. See COPYRIGHT file for details. 00005 * 00006 * This software and supporting documentation were developed by 00007 * 00008 * OFFIS e.V. 00009 * R&D Division Health 00010 * Escherweg 2 00011 * D-26121 Oldenburg, Germany 00012 * 00013 * 00014 * Module: dcmsr 00015 * 00016 * Author: Joerg Riesmeier 00017 * 00018 * Purpose: 00019 * classes: DSRByReferenceTreeNode 00020 * 00021 * Last Update: $Author: joergr $ 00022 * Update Date: $Date: 2010-10-14 13:16:32 $ 00023 * CVS/RCS Revision: $Revision: 1.14 $ 00024 * Status: $State: Exp $ 00025 * 00026 * CVS/RCS Log at end of file 00027 * 00028 */ 00029 00030 00031 #ifndef DSRREFTN_H 00032 #define DSRREFTN_H 00033 00034 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00035 00036 #include "dcmtk/dcmsr/dsrdoctr.h" 00037 #include "dcmtk/dcmsr/dsrdoctn.h" 00038 00039 00040 /*---------------------* 00041 * class declaration * 00042 *---------------------*/ 00043 00046 class DSRByReferenceTreeNode 00047 : public DSRDocumentTreeNode 00048 { 00049 // allow access to private member variables 00050 friend class DSRDocumentTree; 00051 00052 public: 00053 00058 DSRByReferenceTreeNode(const E_RelationshipType relationshipType); 00059 00065 DSRByReferenceTreeNode(const E_RelationshipType relationshipType, 00066 const size_t referencedNodeID); 00067 00070 virtual ~DSRByReferenceTreeNode(); 00071 00075 virtual void clear(); 00076 00082 virtual OFBool isValid() const; 00083 00090 virtual OFCondition print(STD_NAMESPACE ostream &stream, 00091 const size_t flags) const; 00092 00098 virtual OFCondition writeXML(STD_NAMESPACE ostream &stream, 00099 const size_t flags) const; 00100 00105 virtual OFCondition setConceptName(const DSRCodedEntryValue &conceptName); 00106 00112 virtual OFCondition setObservationDateTime(const OFString &observationDateTime); 00113 00120 virtual OFCondition setTemplateIdentification(const OFString &templateIdentifier, 00121 const OFString &mappingResource); 00122 00126 size_t getReferencedNodeID() const 00127 { 00128 return ReferencedNodeID; 00129 } 00130 00131 00132 protected: 00133 00138 virtual OFCondition readContentItem(DcmItem &dataset); 00139 00144 virtual OFCondition writeContentItem(DcmItem &dataset) const; 00145 00151 virtual OFCondition readXMLContentItem(const DSRXMLDocument &doc, 00152 DSRXMLCursor cursor); 00153 00163 virtual OFCondition renderHTMLContentItem(STD_NAMESPACE ostream &docStream, 00164 STD_NAMESPACE ostream &annexStream, 00165 const size_t nestingLevel, 00166 size_t &annexNumber, 00167 const size_t flags) const; 00168 00169 00170 private: 00171 00173 OFBool ValidReference; 00175 OFString ReferencedContentItem; 00177 size_t ReferencedNodeID; 00178 00179 00180 // --- declaration of default/copy constructor and assignment operator 00181 00182 DSRByReferenceTreeNode(); 00183 DSRByReferenceTreeNode(const DSRByReferenceTreeNode &); 00184 DSRByReferenceTreeNode &operator=(const DSRByReferenceTreeNode &); 00185 }; 00186 00187 00188 #endif 00189 00190 00191 /* 00192 * CVS/RCS Log: 00193 * $Log: dsrreftn.h,v $ 00194 * Revision 1.14 2010-10-14 13:16:32 joergr 00195 * Updated copyright header. Added reference to COPYRIGHT file. 00196 * 00197 * Revision 1.13 2009-10-13 14:57:50 uli 00198 * Switched to logging mechanism provided by the "new" oflog module. 00199 * 00200 * Revision 1.12 2007-11-15 16:33:30 joergr 00201 * Added support for output in XHTML 1.1 format. 00202 * 00203 * Revision 1.11 2006/08/15 16:40:03 meichel 00204 * Updated the code in module dcmsr to correctly compile when 00205 * all standard C++ classes remain in namespace std. 00206 * 00207 * Revision 1.10 2005/12/08 16:05:14 meichel 00208 * Changed include path schema for all DCMTK header files 00209 * 00210 * Revision 1.9 2003/10/30 17:53:02 joergr 00211 * Added full support for the ContentTemplateSequence (read/write, get/set 00212 * template identification). Template constraints are not checked yet. 00213 * 00214 * Revision 1.8 2003/09/15 14:18:54 joergr 00215 * Introduced new class to facilitate checking of SR IOD relationship content 00216 * constraints. Replaced old implementation distributed over numerous classes. 00217 * 00218 * Revision 1.7 2003/08/07 12:45:14 joergr 00219 * Added readXML functionality. 00220 * 00221 * Revision 1.6 2001/09/28 14:07:02 joergr 00222 * Added term "class" to friend declaration to keep gcc 3.0 quiet. 00223 * 00224 * Revision 1.5 2001/09/26 13:04:10 meichel 00225 * Adapted dcmsr to class OFCondition 00226 * 00227 * Revision 1.4 2001/06/01 15:51:03 meichel 00228 * Updated copyright header 00229 * 00230 * Revision 1.3 2000/11/07 18:14:30 joergr 00231 * Enhanced support for by-reference relationships. 00232 * 00233 * Revision 1.2 2000/11/01 16:23:23 joergr 00234 * Added support for conversion to XML. 00235 * 00236 * Revision 1.1 2000/10/26 14:22:42 joergr 00237 * Added support for "Comprehensive SR". 00238 * 00239 * 00240 * 00241 */