dcmdata/include/dcmtk/dcmdata/dcvris.h

00001 /*
00002  *
00003  *  Copyright (C) 1994-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:  dcmdata
00015  *
00016  *  Author:  Gerd Ehlers, Andreas Barth
00017  *
00018  *  Purpose: Interface of class DcmIntegerString
00019  *
00020  *  Last Update:      $Author: joergr $
00021  *  Update Date:      $Date: 2010-11-05 09:34:11 $
00022  *  CVS/RCS Revision: $Revision: 1.25 $
00023  *  Status:           $State: Exp $
00024  *
00025  *  CVS/RCS Log at end of file
00026  *
00027  */
00028 
00029 #ifndef DCVRIS_H
00030 #define DCVRIS_H
00031 
00032 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
00033 
00034 #include "dcmtk/dcmdata/dcbytstr.h"
00035 
00036 
00039 class DcmIntegerString
00040   : public DcmByteString
00041 {
00042 
00043   public:
00044 
00050     DcmIntegerString(const DcmTag &tag,
00051                      const Uint32 len = 0);
00052 
00056     DcmIntegerString(const DcmIntegerString &old);
00057 
00060     virtual ~DcmIntegerString();
00061 
00066     DcmIntegerString &operator=(const DcmIntegerString &obj);
00067 
00071     virtual DcmObject *clone() const
00072     {
00073       return new DcmIntegerString(*this);
00074     }
00075 
00088     virtual OFCondition copyFrom(const DcmObject& rhs);
00089 
00093     virtual DcmEVR ident() const;
00094 
00102     virtual OFCondition checkValue(const OFString &vm = "1-n",
00103                                    const OFBool oldFormat = OFFalse);
00104 
00110     virtual OFCondition getSint32(Sint32 &sintVal,
00111                                   const unsigned long pos = 0);
00112 
00119     virtual OFCondition getOFString(OFString &stringVal,
00120                                     const unsigned long pos,
00121                                     OFBool normalize = OFTrue);
00122 
00123     /* --- static helper functions --- */
00124 
00133     static OFCondition checkStringValue(const OFString &value,
00134                                         const OFString &vm = "1-n");
00135 };
00136 
00137 
00138 #endif // DCVRIS_H
00139 
00140 
00141 /*
00142 ** CVS/RCS Log:
00143 ** $Log: dcvris.h,v $
00144 ** Revision 1.25  2010-11-05 09:34:11  joergr
00145 ** Added support for checking the value multiplicity "9" (see Supplement 131).
00146 **
00147 ** Revision 1.24  2010-10-14 13:15:43  joergr
00148 ** Updated copyright header. Added reference to COPYRIGHT file.
00149 **
00150 ** Revision 1.23  2010-04-23 15:26:13  joergr
00151 ** Specify an appropriate default value for the "vm" parameter of checkValue().
00152 **
00153 ** Revision 1.22  2010-04-23 14:25:27  joergr
00154 ** Added new method to all VR classes which checks whether the stored value
00155 ** conforms to the VR definition and to the specified VM.
00156 **
00157 ** Revision 1.21  2010-04-22 09:31:30  joergr
00158 ** Revised misleading parameter documentation for the checkValue() method.
00159 **
00160 ** Revision 1.20  2010-04-22 08:59:10  joergr
00161 ** Added support for further VM values ("1-8", "1-99", "16", "32") to be checked.
00162 **
00163 ** Revision 1.19  2010-03-01 09:08:45  uli
00164 ** Removed some unnecessary include directives in the headers.
00165 **
00166 ** Revision 1.18  2009-08-03 09:05:30  joergr
00167 ** Added methods that check whether a given string value conforms to the VR and
00168 ** VM definitions of the DICOM standards.
00169 **
00170 ** Revision 1.17  2008-07-17 11:19:49  onken
00171 ** Updated copyFrom() documentation.
00172 **
00173 ** Revision 1.16  2008-07-17 10:30:23  onken
00174 ** Implemented copyFrom() method for complete DcmObject class hierarchy, which
00175 ** permits setting an instance's value from an existing object. Implemented
00176 ** assignment operator where necessary.
00177 **
00178 ** Revision 1.15  2005-12-08 16:29:00  meichel
00179 ** Changed include path schema for all DCMTK header files
00180 **
00181 ** Revision 1.14  2004/07/01 12:28:25  meichel
00182 ** Introduced virtual clone method for DcmObject and derived classes.
00183 **
00184 ** Revision 1.13  2002/12/06 12:49:16  joergr
00185 ** Enhanced "print()" function by re-working the implementation and replacing
00186 ** the boolean "showFullData" parameter by a more general integer flag.
00187 ** Added doc++ documentation.
00188 ** Made source code formatting more consistent with other modules/files.
00189 **
00190 ** Revision 1.12  2002/04/25 09:54:28  joergr
00191 ** Removed getOFStringArray() implementation.
00192 **
00193 ** Revision 1.11  2001/09/25 17:19:32  meichel
00194 ** Adapted dcmdata to class OFCondition
00195 **
00196 ** Revision 1.10  2001/06/01 15:48:50  meichel
00197 ** Updated copyright header
00198 **
00199 ** Revision 1.9  2000/03/08 16:26:24  meichel
00200 ** Updated copyright header.
00201 **
00202 ** Revision 1.8  1999/03/31 09:25:01  meichel
00203 ** Updated copyright header in module dcmdata
00204 **
00205 ** Revision 1.7  1998/11/12 16:47:50  meichel
00206 ** Implemented operator= for all classes derived from DcmObject.
00207 **
00208 ** Revision 1.6  1997/09/11 15:13:14  hewett
00209 ** Modified getOFString method arguments by removing a default value
00210 ** for the pos argument.  By requiring the pos argument to be provided
00211 ** ensures that callers realise getOFString only gets one component of
00212 ** a multi-valued string.
00213 **
00214 ** Revision 1.5  1997/08/29 08:32:42  andreas
00215 ** - Added methods getOFString and getOFStringArray for all
00216 **   string VRs. These methods are able to normalise the value, i. e.
00217 **   to remove leading and trailing spaces. This will be done only if
00218 **   it is described in the standard that these spaces are not relevant.
00219 **   These methods do not test the strings for conformance, this means
00220 **   especially that they do not delete spaces where they are not allowed!
00221 **   getOFStringArray returns the string with all its parts separated by \
00222 **   and getOFString returns only one value of the string.
00223 **   CAUTION: Currently getString returns a string with trailing
00224 **   spaces removed (if dcmEnableAutomaticInputDataCorrection == OFTrue) and
00225 **   truncates the original string (since it is not copied!). If you rely on this
00226 **   behaviour please change your application now.
00227 **   Future changes will ensure that getString returns the original
00228 **   string from the DICOM object (NULL terminated) inclusive padding.
00229 **   Currently, if you call getOF... before calling getString without
00230 **   normalisation, you can get the original string read from the DICOM object.
00231 **
00232 ** Revision 1.4  1997/05/12 07:37:45  andreas
00233 ** - new get-Methods for DcmDecimalString: getFloat64 and
00234 **   DcmIntegerString: getSint32
00235 **
00236 ** Revision 1.3  1996/01/05 13:23:06  andreas
00237 ** - changed to support new streaming facilities
00238 ** - more cleanups
00239 ** - merged read / write methods for block and file transfer
00240 **
00241 */


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