dcmdata/include/dcmtk/dcmdata/dcvrui.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 DcmUniqueIdentifier
00019  *
00020  *  Last Update:      $Author: joergr $
00021  *  Update Date:      $Date: 2010-11-05 09:34:11 $
00022  *  CVS/RCS Revision: $Revision: 1.30 $
00023  *  Status:           $State: Exp $
00024  *
00025  *  CVS/RCS Log at end of file
00026  *
00027  */
00028 
00029 #ifndef DCVRUI_H
00030 #define DCVRUI_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 DcmUniqueIdentifier
00040   : public DcmByteString
00041 {
00042 
00043   public:
00044 
00050     DcmUniqueIdentifier(const DcmTag &tag,
00051                         const Uint32 len = 0);
00052 
00056     DcmUniqueIdentifier(const DcmUniqueIdentifier &old);
00057 
00060     virtual ~DcmUniqueIdentifier();
00061 
00066     DcmUniqueIdentifier &operator=(const DcmUniqueIdentifier &obj);
00067 
00071     virtual DcmObject *clone() const
00072     {
00073       return new DcmUniqueIdentifier(*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 
00117     virtual void print(STD_NAMESPACE ostream&out,
00118                        const size_t flags = 0,
00119                        const int level = 0,
00120                        const char *pixelFileName = NULL,
00121                        size_t *pixelCounter = NULL);
00122 
00131     virtual OFCondition putString(const char *stringVal);
00132 
00133     /* --- static helper functions --- */
00134 
00143     static OFCondition checkStringValue(const OFString &value,
00144                                         const OFString &vm = "1-n");
00145 
00146   protected:
00147 
00154     virtual OFCondition makeMachineByteString();
00155 };
00156 
00157 
00158 #endif // DCVRUI_H
00159 
00160 
00161 /*
00162 ** CVS/RCS Log:
00163 ** $Log: dcvrui.h,v $
00164 ** Revision 1.30  2010-11-05 09:34:11  joergr
00165 ** Added support for checking the value multiplicity "9" (see Supplement 131).
00166 **
00167 ** Revision 1.29  2010-10-14 13:15:43  joergr
00168 ** Updated copyright header. Added reference to COPYRIGHT file.
00169 **
00170 ** Revision 1.28  2010-04-23 15:26:13  joergr
00171 ** Specify an appropriate default value for the "vm" parameter of checkValue().
00172 **
00173 ** Revision 1.27  2010-04-23 14:25:27  joergr
00174 ** Added new method to all VR classes which checks whether the stored value
00175 ** conforms to the VR definition and to the specified VM.
00176 **
00177 ** Revision 1.26  2010-04-22 09:31:30  joergr
00178 ** Revised misleading parameter documentation for the checkValue() method.
00179 **
00180 ** Revision 1.25  2010-04-22 08:59:11  joergr
00181 ** Added support for further VM values ("1-8", "1-99", "16", "32") to be checked.
00182 **
00183 ** Revision 1.24  2009-08-03 09:05:30  joergr
00184 ** Added methods that check whether a given string value conforms to the VR and
00185 ** VM definitions of the DICOM standards.
00186 **
00187 ** Revision 1.23  2008-07-17 11:19:49  onken
00188 ** Updated copyFrom() documentation.
00189 **
00190 ** Revision 1.22  2008-07-17 10:30:23  onken
00191 ** Implemented copyFrom() method for complete DcmObject class hierarchy, which
00192 ** permits setting an instance's value from an existing object. Implemented
00193 ** assignment operator where necessary.
00194 **
00195 ** Revision 1.21  2006-08-15 15:49:56  meichel
00196 ** Updated all code in module dcmdata to correctly compile when
00197 **   all standard C++ classes remain in namespace std.
00198 **
00199 ** Revision 1.20  2005/12/08 16:29:12  meichel
00200 ** Changed include path schema for all DCMTK header files
00201 **
00202 ** Revision 1.19  2004/07/01 12:28:25  meichel
00203 ** Introduced virtual clone method for DcmObject and derived classes.
00204 **
00205 ** Revision 1.18  2002/12/06 12:49:19  joergr
00206 ** Enhanced "print()" function by re-working the implementation and replacing
00207 ** the boolean "showFullData" parameter by a more general integer flag.
00208 ** Added doc++ documentation.
00209 ** Made source code formatting more consistent with other modules/files.
00210 **
00211 ** Revision 1.17  2002/04/25 10:01:21  joergr
00212 ** Made makeMachineByteString() virtual to avoid ambiguities.
00213 **
00214 ** Revision 1.16  2001/09/25 17:19:35  meichel
00215 ** Adapted dcmdata to class OFCondition
00216 **
00217 ** Revision 1.15  2001/06/01 15:48:53  meichel
00218 ** Updated copyright header
00219 **
00220 ** Revision 1.14  2000/04/14 15:31:35  meichel
00221 ** Removed default value from output stream passed to print() method.
00222 **   Required for use in multi-thread environments.
00223 **
00224 ** Revision 1.13  2000/03/08 16:26:27  meichel
00225 ** Updated copyright header.
00226 **
00227 ** Revision 1.12  2000/03/03 14:05:28  meichel
00228 ** Implemented library support for redirecting error messages into memory
00229 **   instead of printing them to stdout/stderr for GUI applications.
00230 **
00231 ** Revision 1.11  2000/02/10 10:50:56  joergr
00232 ** Added new feature to dcmdump (enhanced print method of dcmdata): write
00233 ** pixel data/item value fields to raw files.
00234 **
00235 ** Revision 1.10  1999/03/31 09:25:09  meichel
00236 ** Updated copyright header in module dcmdata
00237 **
00238 ** Revision 1.9  1998/11/12 16:47:56  meichel
00239 ** Implemented operator= for all classes derived from DcmObject.
00240 **
00241 ** Revision 1.8  1997/07/21 08:25:16  andreas
00242 ** - Replace all boolean types (BOOLEAN, CTNBOOLEAN, DICOM_BOOL, BOOL)
00243 **   with one unique boolean type OFBool.
00244 **
00245 ** Revision 1.7  1997/04/18 08:13:33  andreas
00246 ** - The put/get-methods for all VRs did not conform to the C++-Standard
00247 **   draft. Some Compilers (e.g. SUN-C++ Compiler, Metroworks
00248 **   CodeWarrier, etc.) create many warnings concerning the hiding of
00249 **   overloaded get methods in all derived classes of DcmElement.
00250 **   So the interface of all value representation classes in the
00251 **   library are changed rapidly, e.g.
00252 **   OFCondition get(Uint16 & value, const unsigned long pos);
00253 **   becomes
00254 **   OFCondition getUint16(Uint16 & value, const unsigned long pos);
00255 **   All (retired) "returntype get(...)" methods are deleted.
00256 **   For more information see dcmdata/include/dcelem.h
00257 **
00258 ** Revision 1.6  1996/08/05 08:45:38  andreas
00259 ** new print routine with additional parameters:
00260 **         - print into files
00261 **         - fix output length for elements
00262 ** corrected error in search routine with parameter ESM_fromStackTop
00263 **
00264 ** Revision 1.5  1996/05/30 17:19:22  hewett
00265 ** Added a makeMachineByteString() method to strip and trailing whitespace
00266 ** from a UID.
00267 **
00268 ** Revision 1.4  1996/01/29 13:38:18  andreas
00269 ** - new put method for every VR to put value as a string
00270 ** - better and unique print methods
00271 **
00272 ** Revision 1.3  1996/01/05 13:23:10  andreas
00273 ** - changed to support new streaming facilities
00274 ** - more cleanups
00275 ** - merged read / write methods for block and file transfer
00276 **
00277 **
00278 */


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