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: DSRImageReferenceValue 00024 * 00025 * Last Update: $Author: meichel $ 00026 * Update Date: $Date: 2005/12/08 16:05:06 $ 00027 * CVS/RCS Revision: $Revision: 1.13 $ 00028 * Status: $State: Exp $ 00029 * 00030 * CVS/RCS Log at end of file 00031 * 00032 */ 00033 00034 00035 #ifndef DSRIMGVL_H 00036 #define DSRIMGVL_H 00037 00038 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00039 00040 #include "dcmtk/dcmsr/dsrtypes.h" 00041 #include "dcmtk/dcmsr/dsrcomvl.h" 00042 #include "dcmtk/dcmsr/dsrimgfr.h" 00043 00044 00045 /*---------------------* 00046 * class declaration * 00047 *---------------------*/ 00048 00051 class DSRImageReferenceValue 00052 : public DSRCompositeReferenceValue 00053 { 00054 // allow access to getValuePtr() 00055 friend class DSRContentItem; 00056 00057 public: 00058 00061 DSRImageReferenceValue(); 00062 00070 DSRImageReferenceValue(const OFString &sopClassUID, 00071 const OFString &sopInstanceUID); 00072 00084 DSRImageReferenceValue(const OFString &imageSOPClassUID, 00085 const OFString &imageSOPInstanceUID, 00086 const OFString &pstateSOPClassUID, 00087 const OFString &pstateSOPInstanceUID); 00088 00092 DSRImageReferenceValue(const DSRImageReferenceValue &referenceValue); 00093 00099 DSRImageReferenceValue(const DSRCompositeReferenceValue &imageReferenceValue, 00100 const DSRCompositeReferenceValue &pstateReferenceValue); 00101 00104 virtual ~DSRImageReferenceValue(); 00105 00110 DSRImageReferenceValue &operator=(const DSRImageReferenceValue &referenceValue); 00111 00115 virtual void clear(); 00116 00123 virtual OFBool isValid() const; 00124 00131 virtual OFBool isShort(const size_t flags) const; 00132 00141 virtual OFCondition print(ostream &stream, 00142 const size_t flags) const; 00143 00149 virtual OFCondition readXML(const DSRXMLDocument &doc, 00150 DSRXMLCursor cursor); 00151 00158 virtual OFCondition writeXML(ostream &stream, 00159 const size_t flags, 00160 OFConsole *logStream) const; 00161 00171 virtual OFCondition renderHTML(ostream &docStream, 00172 ostream &annexStream, 00173 size_t &annexNumber, 00174 const size_t flags, 00175 OFConsole *logStream) const; 00176 00180 inline const DSRImageReferenceValue &getValue() const 00181 { 00182 return *this; 00183 } 00184 00189 OFCondition getValue(DSRImageReferenceValue &referenceValue) const; 00190 00197 OFCondition setValue(const DSRImageReferenceValue &referenceValue); 00198 00202 inline const DSRCompositeReferenceValue &getPresentationState() const 00203 { 00204 return PresentationState; 00205 } 00206 00213 OFCondition setPresentationState(const DSRCompositeReferenceValue &referenceValue); 00214 00218 inline DSRImageFrameList &getFrameList() 00219 { 00220 return FrameList; 00221 } 00222 00229 OFBool appliesToFrame(const Sint32 frameNumber) const; 00230 00231 00232 protected: 00233 00237 inline DSRImageReferenceValue *getValuePtr() 00238 { 00239 return this; 00240 } 00241 00247 virtual OFCondition readItem(DcmItem &dataset, 00248 OFConsole *logStream); 00249 00255 virtual OFCondition writeItem(DcmItem &dataset, 00256 OFConsole *logStream) const; 00257 00265 virtual OFBool checkSOPClassUID(const OFString &sopClassUID) const; 00266 00273 OFBool checkPresentationState(const DSRCompositeReferenceValue &referenceValue) const; 00274 00275 00276 private: 00277 00279 DSRCompositeReferenceValue PresentationState; 00281 DSRImageFrameList FrameList; 00282 00283 /* IconImageSequence (Type 3) not yet supported */ 00284 }; 00285 00286 00287 #endif 00288 00289 00290 /* 00291 * CVS/RCS Log: 00292 * $Log: dsrimgvl.h,v $ 00293 * Revision 1.13 2005/12/08 16:05:06 meichel 00294 * Changed include path schema for all DCMTK header files 00295 * 00296 * Revision 1.12 2003/10/06 09:52:35 joergr 00297 * Added comment that the optional IconImageSequence is not yet supported. 00298 * 00299 * Revision 1.11 2003/08/07 18:01:42 joergr 00300 * Removed libxml dependency from header files. 00301 * 00302 * Revision 1.10 2003/08/07 12:42:38 joergr 00303 * Added readXML functionality. 00304 * 00305 * Revision 1.9 2001/09/26 13:04:09 meichel 00306 * Adapted dcmsr to class OFCondition 00307 * 00308 * Revision 1.8 2001/06/01 15:51:01 meichel 00309 * Updated copyright header 00310 * 00311 * Revision 1.7 2000/11/06 11:17:21 joergr 00312 * Moved some protected methods to public part. 00313 * 00314 * Revision 1.6 2000/11/01 16:23:21 joergr 00315 * Added support for conversion to XML. 00316 * 00317 * Revision 1.5 2000/10/26 14:18:27 joergr 00318 * Updated comments. 00319 * 00320 * Revision 1.4 2000/10/20 10:15:42 joergr 00321 * Renamed class DSRReferenceValue to DSRCompositeReferenceValue. 00322 * 00323 * Revision 1.3 2000/10/18 17:04:23 joergr 00324 * Added methods allowing direct access to certain content item values. 00325 * Added doc++ comments. 00326 * 00327 * Revision 1.2 2000/10/16 11:54:12 joergr 00328 * Added new method checking whether an image content item applies to a 00329 * certain frame. 00330 * 00331 * Revision 1.1 2000/10/13 07:49:28 joergr 00332 * Added new module 'dcmsr' providing access to DICOM structured reporting 00333 * documents (supplement 23). Doc++ documentation not yet completed. 00334 * 00335 * 00336 */