dcmsr/include/dcmtk/dcmsr/dsrdtitn.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: DSRDateTimeTreeNode
00020  *
00021  *  Last Update:      $Author: joergr $
00022  *  Update Date:      $Date: 2010-10-14 13:16:32 $
00023  *  CVS/RCS Revision: $Revision: 1.15 $
00024  *  Status:           $State: Exp $
00025  *
00026  *  CVS/RCS Log at end of file
00027  *
00028  */
00029 
00030 
00031 #ifndef DSRDTITN_H
00032 #define DSRDTITN_H
00033 
00034 #include "dcmtk/config/osconfig.h"   /* make sure OS specific configuration is included first */
00035 
00036 #include "dcmtk/dcmsr/dsrdoctn.h"
00037 #include "dcmtk/dcmsr/dsrstrvl.h"
00038 
00039 
00040 /*---------------------*
00041  *  class declaration  *
00042  *---------------------*/
00043 
00046 class DSRDateTimeTreeNode
00047   : public DSRDocumentTreeNode,
00048     public DSRStringValue
00049 {
00050 
00051   public:
00052 
00057     DSRDateTimeTreeNode(const E_RelationshipType relationshipType);
00058 
00064     DSRDateTimeTreeNode(const E_RelationshipType relationshipType,
00065                         const OFString &stringValue);
00066 
00069     virtual ~DSRDateTimeTreeNode();
00070 
00074     virtual void clear();
00075 
00080     virtual OFBool isValid() const;
00081 
00088     virtual OFCondition print(STD_NAMESPACE ostream &stream,
00089                               const size_t flags) const;
00090 
00096     virtual OFCondition writeXML(STD_NAMESPACE ostream &stream,
00097                                  const size_t flags) const;
00098 
00099     // --- static helper function ---
00100 
00110     static OFString &getValueFromXMLNodeContent(const DSRXMLDocument &doc,
00111                                                 DSRXMLCursor cursor,
00112                                                 OFString &dateTimeValue,
00113                                                 const OFBool clearString = OFTrue);
00114 
00115 
00116   protected:
00117 
00122     virtual OFCondition readContentItem(DcmItem &dataset);
00123 
00128     virtual OFCondition writeContentItem(DcmItem &dataset) const;
00129 
00135     virtual OFCondition readXMLContentItem(const DSRXMLDocument &doc,
00136                                            DSRXMLCursor cursor);
00137 
00147     virtual OFCondition renderHTMLContentItem(STD_NAMESPACE ostream &docStream,
00148                                               STD_NAMESPACE ostream &annexStream,
00149                                               const size_t nestingLevel,
00150                                               size_t &annexNumber,
00151                                               const size_t flags) const;
00152 
00153 
00154   private:
00155 
00156  // --- declaration of default/copy constructor and assignment operator
00157 
00158     DSRDateTimeTreeNode();
00159     DSRDateTimeTreeNode(const DSRDateTimeTreeNode &);
00160     DSRDateTimeTreeNode &operator=(const DSRDateTimeTreeNode &);
00161 };
00162 
00163 
00164 #endif
00165 
00166 
00167 /*
00168  *  CVS/RCS Log:
00169  *  $Log: dsrdtitn.h,v $
00170  *  Revision 1.15  2010-10-14 13:16:32  joergr
00171  *  Updated copyright header. Added reference to COPYRIGHT file.
00172  *
00173  *  Revision 1.14  2009-10-13 14:57:50  uli
00174  *  Switched to logging mechanism provided by the "new" oflog module.
00175  *
00176  *  Revision 1.13  2007-11-15 16:33:30  joergr
00177  *  Added support for output in XHTML 1.1 format.
00178  *
00179  *  Revision 1.12  2006/08/15 16:40:03  meichel
00180  *  Updated the code in module dcmsr to correctly compile when
00181  *    all standard C++ classes remain in namespace std.
00182  *
00183  *  Revision 1.11  2005/12/08 16:05:02  meichel
00184  *  Changed include path schema for all DCMTK header files
00185  *
00186  *  Revision 1.10  2004/01/16 09:58:21  joergr
00187  *  Adapted XML output format of Date, Time and Datetime to XML Schema (ISO)
00188  *  requirements.
00189  *
00190  *  Revision 1.9  2003/09/15 14:18:54  joergr
00191  *  Introduced new class to facilitate checking of SR IOD relationship content
00192  *  constraints. Replaced old implementation distributed over numerous classes.
00193  *
00194  *  Revision 1.8  2003/08/07 12:35:55  joergr
00195  *  Added readXML functionality.
00196  *
00197  *  Revision 1.7  2001/11/09 16:10:50  joergr
00198  *  Added preliminary support for Mammography CAD SR.
00199  *
00200  *  Revision 1.6  2001/09/26 13:04:08  meichel
00201  *  Adapted dcmsr to class OFCondition
00202  *
00203  *  Revision 1.5  2001/06/01 15:51:00  meichel
00204  *  Updated copyright header
00205  *
00206  *  Revision 1.4  2000/11/07 18:14:29  joergr
00207  *  Enhanced support for by-reference relationships.
00208  *
00209  *  Revision 1.3  2000/11/01 16:23:20  joergr
00210  *  Added support for conversion to XML.
00211  *
00212  *  Revision 1.2  2000/10/23 15:10:56  joergr
00213  *  Added clear() method.
00214  *  Added/updated doc++ comments.
00215  *
00216  *  Revision 1.1  2000/10/13 07:49:27  joergr
00217  *  Added new module 'dcmsr' providing access to DICOM structured reporting
00218  *  documents (supplement 23).  Doc++ documentation not yet completed.
00219  *
00220  *
00221  */


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