dsrstrvl.h

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: DSRStringValue
00024  *
00025  *  Last Update:      $Author: meichel $
00026  *  Update Date:      $Date: 2005/12/08 16:05:19 $
00027  *  CVS/RCS Revision: $Revision: 1.11 $
00028  *  Status:           $State: Exp $
00029  *
00030  *  CVS/RCS Log at end of file
00031  *
00032  */
00033 
00034 
00035 #ifndef DSRSTRVL_H
00036 #define DSRSTRVL_H
00037 
00038 #include "dcmtk/config/osconfig.h"   /* make sure OS specific configuration is included first */
00039 
00040 #include "dcmtk/dcmsr/dsrtypes.h"
00041 
00042 #include "dcmtk/ofstd/ofstring.h"
00043 
00044 
00045 /*---------------------*
00046  *  class declaration  *
00047  *---------------------*/
00048 
00051 class DSRStringValue
00052 {
00053 
00054   public:
00055 
00058     DSRStringValue();
00059 
00064     DSRStringValue(const OFString &stringValue);
00065 
00069     DSRStringValue(const DSRStringValue &stringValue);
00070 
00073     virtual ~DSRStringValue();
00074 
00079     DSRStringValue &operator=(const DSRStringValue &stringValue);
00080 
00084     virtual void clear();
00085 
00090     virtual OFBool isValid() const;
00091 
00102     void print(ostream &stream,
00103                const size_t maxLength = 0) const;
00104 
00113     OFCondition read(DcmItem &dataset,
00114                      const DcmTagKey &tagKey,
00115                      OFConsole *logStream);
00116 
00123     OFCondition write(DcmItem &dataset,
00124                       const DcmTagKey &tagKey,
00125                       OFConsole *logStream) const;
00126 
00133     OFCondition readXML(const DSRXMLDocument &doc,
00134                         DSRXMLCursor cursor,
00135                         const OFBool encoding = OFFalse);
00136 
00143     OFCondition renderHTML(ostream &docStream,
00144                            const size_t flags,
00145                            OFConsole *logStream) const;
00146 
00150     inline const OFString &getValue() const
00151     {
00152         return Value;
00153     }
00154 
00162     OFCondition setValue(const OFString &stringValue);
00163 
00167     OFBool valueContainsExtendedCharacters() const;
00168 
00169   protected:
00170 
00178     virtual OFBool checkValue(const OFString &stringValue) const;
00179 
00180 
00181   private:
00182 
00184     OFString Value;
00185 };
00186 
00187 
00188 #endif
00189 
00190 
00191 /*
00192  *  CVS/RCS Log:
00193  *  $Log: dsrstrvl.h,v $
00194  *  Revision 1.11  2005/12/08 16:05:19  meichel
00195  *  Changed include path schema for all DCMTK header files
00196  *
00197  *  Revision 1.10  2004/11/22 16:39:09  meichel
00198  *  Added method that checks if the SR document contains non-ASCII characters
00199  *    in any of the strings affected by SpecificCharacterSet.
00200  *
00201  *  Revision 1.9  2003/08/07 18:01:42  joergr
00202  *  Removed libxml dependency from header files.
00203  *
00204  *  Revision 1.8  2003/08/07 12:50:44  joergr
00205  *  Added readXML functionality.
00206  *
00207  *  Revision 1.7  2001/09/26 13:04:11  meichel
00208  *  Adapted dcmsr to class OFCondition
00209  *
00210  *  Revision 1.6  2001/06/01 15:51:03  meichel
00211  *  Updated copyright header
00212  *
00213  *  Revision 1.5  2000/11/06 11:18:48  joergr
00214  *  Moved some protected methods to public part.
00215  *
00216  *  Revision 1.4  2000/11/01 16:23:25  joergr
00217  *  Added support for conversion to XML.
00218  *
00219  *  Revision 1.3  2000/10/23 15:12:55  joergr
00220  *  Added/updated doc++ comments.
00221  *
00222  *  Revision 1.2  2000/10/18 17:08:11  joergr
00223  *  Added read and write methods.
00224  *
00225  *  Revision 1.1  2000/10/13 07:49:32  joergr
00226  *  Added new module 'dcmsr' providing access to DICOM structured reporting
00227  *  documents (supplement 23).  Doc++ documentation not yet completed.
00228  *
00229  *
00230  */


Generated on 20 Dec 2005 for OFFIS DCMTK Version 3.5.4 by Doxygen 1.4.5