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: DSRCompositeReferenceValue 00020 * 00021 * Last Update: $Author: joergr $ 00022 * Update Date: $Date: 2010-10-14 13:16:32 $ 00023 * CVS/RCS Revision: $Revision: 1.11 $ 00024 * Status: $State: Exp $ 00025 * 00026 * CVS/RCS Log at end of file 00027 * 00028 */ 00029 00030 00031 #ifndef DSRCOMVL_H 00032 #define DSRCOMVL_H 00033 00034 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00035 00036 #include "dcmtk/dcmsr/dsrtypes.h" 00037 00038 #include "dcmtk/ofstd/ofstring.h" 00039 00040 00041 /*---------------------* 00042 * class declaration * 00043 *---------------------*/ 00044 00047 class DSRCompositeReferenceValue 00048 { 00049 // allow access to getValuePtr() 00050 friend class DSRContentItem; 00051 00052 public: 00053 00056 DSRCompositeReferenceValue(); 00057 00065 DSRCompositeReferenceValue(const OFString &sopClassUID, 00066 const OFString &sopInstanceUID); 00067 00071 DSRCompositeReferenceValue(const DSRCompositeReferenceValue &referenceValue); 00072 00075 virtual ~DSRCompositeReferenceValue(); 00076 00081 DSRCompositeReferenceValue &operator=(const DSRCompositeReferenceValue &referenceValue); 00082 00086 virtual void clear(); 00087 00093 virtual OFBool isValid() const; 00094 00099 virtual OFBool isEmpty() const; 00100 00108 virtual OFCondition print(STD_NAMESPACE ostream &stream, 00109 const size_t flags) const; 00110 00116 virtual OFCondition readXML(const DSRXMLDocument &doc, 00117 DSRXMLCursor cursor); 00118 00124 virtual OFCondition writeXML(STD_NAMESPACE ostream &stream, 00125 const size_t flags) const; 00126 00136 virtual OFCondition readSequence(DcmItem &dataset, 00137 const OFString &type); 00138 00144 virtual OFCondition writeSequence(DcmItem &dataset) const; 00145 00154 virtual OFCondition renderHTML(STD_NAMESPACE ostream &docStream, 00155 STD_NAMESPACE ostream &annexStream, 00156 size_t &annexNumber, 00157 const size_t flags) const; 00158 00162 inline const OFString &getSOPClassUID() const 00163 { 00164 return SOPClassUID; 00165 } 00166 00170 inline const OFString &getSOPInstanceUID() const 00171 { 00172 return SOPInstanceUID; 00173 } 00174 00178 inline const DSRCompositeReferenceValue &getValue() const 00179 { 00180 return *this; 00181 } 00182 00187 OFCondition getValue(DSRCompositeReferenceValue &referenceValue) const; 00188 00195 OFCondition setValue(const DSRCompositeReferenceValue &referenceValue); 00196 00204 OFCondition setReference(const OFString &sopClassUID, 00205 const OFString &sopInstanceUID); 00206 00213 OFCondition setSOPClassUID(const OFString &sopClassUID); 00214 00221 OFCondition setSOPInstanceUID(const OFString &sopInstanceUID); 00222 00223 00224 protected: 00225 00229 inline DSRCompositeReferenceValue *getValuePtr() 00230 { 00231 return this; 00232 } 00233 00238 virtual OFCondition readItem(DcmItem &dataset); 00239 00244 virtual OFCondition writeItem(DcmItem &dataset) const; 00245 00253 virtual OFBool checkSOPClassUID(const OFString &sopClassUID) const; 00254 00261 virtual OFBool checkSOPInstanceUID(const OFString &sopInstanceUID) const; 00262 00264 OFString SOPClassUID; 00266 OFString SOPInstanceUID; 00267 }; 00268 00269 00270 #endif 00271 00272 00273 /* 00274 * CVS/RCS Log: 00275 * $Log: dsrcomvl.h,v $ 00276 * Revision 1.11 2010-10-14 13:16:32 joergr 00277 * Updated copyright header. Added reference to COPYRIGHT file. 00278 * 00279 * Revision 1.10 2009-10-13 14:57:50 uli 00280 * Switched to logging mechanism provided by the "new" oflog module. 00281 * 00282 * Revision 1.9 2007-11-15 16:33:30 joergr 00283 * Added support for output in XHTML 1.1 format. 00284 * 00285 * Revision 1.8 2006/08/15 16:40:03 meichel 00286 * Updated the code in module dcmsr to correctly compile when 00287 * all standard C++ classes remain in namespace std. 00288 * 00289 * Revision 1.7 2005/12/08 16:04:55 meichel 00290 * Changed include path schema for all DCMTK header files 00291 * 00292 * Revision 1.6 2003/08/07 18:01:42 joergr 00293 * Removed libxml dependency from header files. 00294 * 00295 * Revision 1.5 2003/08/07 12:22:37 joergr 00296 * Added readXML functionality. 00297 * 00298 * Revision 1.4 2001/09/26 13:04:05 meichel 00299 * Adapted dcmsr to class OFCondition 00300 * 00301 * Revision 1.3 2001/06/01 15:50:59 meichel 00302 * Updated copyright header 00303 * 00304 * Revision 1.2 2000/11/01 16:13:55 joergr 00305 * Added support for conversion to XML. 00306 * 00307 * Revision 1.1 2000/10/20 10:13:26 joergr 00308 * Renamed class DSRReferenceValue to DSRCompositeReferenceValue. 00309 * 00310 * Revision 1.4 2000/10/19 16:02:37 joergr 00311 * Renamed some set methods. 00312 * 00313 * Revision 1.3 2000/10/18 17:06:00 joergr 00314 * Added methods allowing direct access to certain content item values. 00315 * Added doc++ comments. 00316 * Made some functions inline. 00317 * 00318 * Revision 1.2 2000/10/16 11:57:23 joergr 00319 * Added methods allowing direct access to certain content item values. 00320 * 00321 * Revision 1.1 2000/10/13 07:49:30 joergr 00322 * Added new module 'dcmsr' providing access to DICOM structured reporting 00323 * documents (supplement 23). Doc++ documentation not yet completed. 00324 * 00325 * 00326 */