dcmsr/include/dcmtk/dcmsr/dsrimgvl.h

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: DSRImageReferenceValue
00020  *
00021  *  Last Update:      $Author: joergr $
00022  *  Update Date:      $Date: 2010-10-14 13:16:32 $
00023  *  CVS/RCS Revision: $Revision: 1.17 $
00024  *  Status:           $State: Exp $
00025  *
00026  *  CVS/RCS Log at end of file
00027  *
00028  */
00029 
00030 
00031 #ifndef DSRIMGVL_H
00032 #define DSRIMGVL_H
00033 
00034 #include "dcmtk/config/osconfig.h"   /* make sure OS specific configuration is included first */
00035 
00036 #include "dcmtk/dcmsr/dsrtypes.h"
00037 #include "dcmtk/dcmsr/dsrcomvl.h"
00038 #include "dcmtk/dcmsr/dsrimgfr.h"
00039 
00040 
00041 /*---------------------*
00042  *  class declaration  *
00043  *---------------------*/
00044 
00047 class DSRImageReferenceValue
00048   : public DSRCompositeReferenceValue
00049 {
00050     // allow access to getValuePtr()
00051     friend class DSRContentItem;
00052 
00053   public:
00054 
00057     DSRImageReferenceValue();
00058 
00066     DSRImageReferenceValue(const OFString &sopClassUID,
00067                            const OFString &sopInstanceUID);
00068 
00080     DSRImageReferenceValue(const OFString &imageSOPClassUID,
00081                            const OFString &imageSOPInstanceUID,
00082                            const OFString &pstateSOPClassUID,
00083                            const OFString &pstateSOPInstanceUID);
00084 
00088     DSRImageReferenceValue(const DSRImageReferenceValue &referenceValue);
00089 
00095     DSRImageReferenceValue(const DSRCompositeReferenceValue &imageReferenceValue,
00096                            const DSRCompositeReferenceValue &pstateReferenceValue);
00097 
00100     virtual ~DSRImageReferenceValue();
00101 
00106     DSRImageReferenceValue &operator=(const DSRImageReferenceValue &referenceValue);
00107 
00111     virtual void clear();
00112 
00119     virtual OFBool isValid() const;
00120 
00127     virtual OFBool isShort(const size_t flags) const;
00128 
00137     virtual OFCondition print(STD_NAMESPACE ostream &stream,
00138                               const size_t flags) const;
00139 
00145     virtual OFCondition readXML(const DSRXMLDocument &doc,
00146                                 DSRXMLCursor cursor);
00147 
00153     virtual OFCondition writeXML(STD_NAMESPACE ostream &stream,
00154                                  const size_t flags) const;
00155 
00164     virtual OFCondition renderHTML(STD_NAMESPACE ostream &docStream,
00165                                    STD_NAMESPACE ostream &annexStream,
00166                                    size_t &annexNumber,
00167                                    const size_t flags) const;
00168 
00172     inline const DSRImageReferenceValue &getValue() const
00173     {
00174         return *this;
00175     }
00176 
00181     OFCondition getValue(DSRImageReferenceValue &referenceValue) const;
00182 
00189     OFCondition setValue(const DSRImageReferenceValue &referenceValue);
00190 
00194     inline const DSRCompositeReferenceValue &getPresentationState() const
00195     {
00196         return PresentationState;
00197     }
00198 
00205     OFCondition setPresentationState(const DSRCompositeReferenceValue &referenceValue);
00206 
00210     inline DSRImageFrameList &getFrameList()
00211     {
00212         return FrameList;
00213     }
00214 
00221     OFBool appliesToFrame(const Sint32 frameNumber) const;
00222 
00223 
00224   protected:
00225 
00229     inline DSRImageReferenceValue *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     OFBool checkPresentationState(const DSRCompositeReferenceValue &referenceValue) const;
00262 
00263 
00264   private:
00265 
00267     DSRCompositeReferenceValue PresentationState;
00269     DSRImageFrameList FrameList;
00270     
00271     /* IconImageSequence (Type 3) not yet supported */
00272 };
00273 
00274 
00275 #endif
00276 
00277 
00278 /*
00279  *  CVS/RCS Log:
00280  *  $Log: dsrimgvl.h,v $
00281  *  Revision 1.17  2010-10-14 13:16:32  joergr
00282  *  Updated copyright header. Added reference to COPYRIGHT file.
00283  *
00284  *  Revision 1.16  2009-10-13 14:57:50  uli
00285  *  Switched to logging mechanism provided by the "new" oflog module.
00286  *
00287  *  Revision 1.15  2007-11-15 16:33:30  joergr
00288  *  Added support for output in XHTML 1.1 format.
00289  *
00290  *  Revision 1.14  2006/08/15 16:40:03  meichel
00291  *  Updated the code in module dcmsr to correctly compile when
00292  *    all standard C++ classes remain in namespace std.
00293  *
00294  *  Revision 1.13  2005/12/08 16:05:06  meichel
00295  *  Changed include path schema for all DCMTK header files
00296  *
00297  *  Revision 1.12  2003/10/06 09:52:35  joergr
00298  *  Added comment that the optional IconImageSequence is not yet supported.
00299  *
00300  *  Revision 1.11  2003/08/07 18:01:42  joergr
00301  *  Removed libxml dependency from header files.
00302  *
00303  *  Revision 1.10  2003/08/07 12:42:38  joergr
00304  *  Added readXML functionality.
00305  *
00306  *  Revision 1.9  2001/09/26 13:04:09  meichel
00307  *  Adapted dcmsr to class OFCondition
00308  *
00309  *  Revision 1.8  2001/06/01 15:51:01  meichel
00310  *  Updated copyright header
00311  *
00312  *  Revision 1.7  2000/11/06 11:17:21  joergr
00313  *  Moved some protected methods to public part.
00314  *
00315  *  Revision 1.6  2000/11/01 16:23:21  joergr
00316  *  Added support for conversion to XML.
00317  *
00318  *  Revision 1.5  2000/10/26 14:18:27  joergr
00319  *  Updated comments.
00320  *
00321  *  Revision 1.4  2000/10/20 10:15:42  joergr
00322  *  Renamed class DSRReferenceValue to DSRCompositeReferenceValue.
00323  *
00324  *  Revision 1.3  2000/10/18 17:04:23  joergr
00325  *  Added methods allowing direct access to certain content item values.
00326  *  Added doc++ comments.
00327  *
00328  *  Revision 1.2  2000/10/16 11:54:12  joergr
00329  *  Added new method checking whether an image content item applies to a
00330  *  certain frame.
00331  *
00332  *  Revision 1.1  2000/10/13 07:49:28  joergr
00333  *  Added new module 'dcmsr' providing access to DICOM structured reporting
00334  *  documents (supplement 23).  Doc++ documentation not yet completed.
00335  *
00336  *
00337  */


Generated on 6 Jan 2011 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.5.1