dcmdata/include/dcmtk/dcmdata/dcvrat.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 DcmAttributeTag
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 
00030 #ifndef DCVRAT_H
00031 #define DCVRAT_H
00032 
00033 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
00034 
00035 #include "dcmtk/dcmdata/dcelem.h"
00036 
00037 
00040 class DcmAttributeTag
00041   : public DcmElement
00042 {
00043 
00044   public:
00045 
00051     DcmAttributeTag(const DcmTag &tag,
00052                     const Uint32 len = 0);
00053 
00057     DcmAttributeTag(const DcmAttributeTag &old);
00058 
00061     virtual ~DcmAttributeTag();
00062 
00067     DcmAttributeTag &operator=(const DcmAttributeTag &obj);
00068 
00072     virtual DcmObject *clone() const
00073     {
00074       return new DcmAttributeTag(*this);
00075     }
00076 
00089     virtual OFCondition copyFrom(const DcmObject& rhs);
00090 
00094     virtual DcmEVR ident() const;
00095 
00103     virtual OFCondition checkValue(const OFString &vm = "1-n",
00104                                    const OFBool oldFormat = OFFalse);
00105 
00109     virtual unsigned long getVM();
00110 
00120     virtual void print(STD_NAMESPACE ostream&out,
00121                        const size_t flags = 0,
00122                        const int level = 0,
00123                        const char *pixelFileName = NULL,
00124                        size_t *pixelCounter = NULL);
00125 
00131     virtual OFCondition getTagVal(DcmTagKey &tagVal,
00132                                   const unsigned long pos = 0);
00133 
00141     virtual OFCondition getUint16Array(Uint16 *&uintVals);
00142 
00151     virtual OFCondition getOFString(OFString &stringVal,
00152                                     const unsigned long pos,
00153                                     OFBool normalize = OFTrue);
00154 
00160     virtual OFCondition putTagVal(const DcmTagKey &tagVal,
00161                                   const unsigned long pos = 0);
00162 
00172     virtual OFCondition putUint16Array(const Uint16 *uintVals,
00173                                        const unsigned long numUints);
00174 
00182     virtual OFCondition putString(const char *stringVal);
00183 
00188     virtual OFCondition verify(const OFBool autocorrect = OFFalse);
00189 
00190     /* --- static helper functions --- */
00191 
00200     static OFCondition checkStringValue(const OFString &value,
00201                                         const OFString &vm = "1-n");
00202 };
00203 
00204 
00205 #endif // DCVRAT_H
00206 
00207 
00208 /*
00209 ** CVS/RCS Log:
00210 ** $Log: dcvrat.h,v $
00211 ** Revision 1.30  2010-11-05 09:34:11  joergr
00212 ** Added support for checking the value multiplicity "9" (see Supplement 131).
00213 **
00214 ** Revision 1.29  2010-10-14 13:15:42  joergr
00215 ** Updated copyright header. Added reference to COPYRIGHT file.
00216 **
00217 ** Revision 1.28  2010-04-23 15:26:12  joergr
00218 ** Specify an appropriate default value for the "vm" parameter of checkValue().
00219 **
00220 ** Revision 1.27  2010-04-23 14:25:27  joergr
00221 ** Added new method to all VR classes which checks whether the stored value
00222 ** conforms to the VR definition and to the specified VM.
00223 **
00224 ** Revision 1.26  2009-11-04 09:58:07  uli
00225 ** Switched to logging mechanism provided by the "new" oflog module
00226 **
00227 ** Revision 1.25  2008-07-17 11:19:49  onken
00228 ** Updated copyFrom() documentation.
00229 **
00230 ** Revision 1.24  2008-07-17 10:30:23  onken
00231 ** Implemented copyFrom() method for complete DcmObject class hierarchy, which
00232 ** permits setting an instance's value from an existing object. Implemented
00233 ** assignment operator where necessary.
00234 **
00235 ** Revision 1.23  2006-08-15 15:49:56  meichel
00236 ** Updated all code in module dcmdata to correctly compile when
00237 **   all standard C++ classes remain in namespace std.
00238 **
00239 ** Revision 1.22  2005/12/08 16:28:53  meichel
00240 ** Changed include path schema for all DCMTK header files
00241 **
00242 ** Revision 1.21  2004/07/01 12:28:25  meichel
00243 ** Introduced virtual clone method for DcmObject and derived classes.
00244 **
00245 ** Revision 1.20  2003/06/12 13:31:46  joergr
00246 ** Fixed inconsistent API documentation reported by Doxygen.
00247 **
00248 ** Revision 1.19  2002/12/06 12:49:14  joergr
00249 ** Enhanced "print()" function by re-working the implementation and replacing
00250 ** the boolean "showFullData" parameter by a more general integer flag.
00251 ** Added doc++ documentation.
00252 ** Made source code formatting more consistent with other modules/files.
00253 **
00254 ** Revision 1.18  2002/04/25 09:50:38  joergr
00255 ** Added getOFString() implementation.
00256 **
00257 ** Revision 1.17  2001/09/25 17:19:30  meichel
00258 ** Adapted dcmdata to class OFCondition
00259 **
00260 ** Revision 1.16  2001/06/01 15:48:48  meichel
00261 ** Updated copyright header
00262 **
00263 ** Revision 1.15  2000/04/14 15:31:34  meichel
00264 ** Removed default value from output stream passed to print() method.
00265 **   Required for use in multi-thread environments.
00266 **
00267 ** Revision 1.14  2000/03/08 16:26:22  meichel
00268 ** Updated copyright header.
00269 **
00270 ** Revision 1.13  2000/03/03 14:05:26  meichel
00271 ** Implemented library support for redirecting error messages into memory
00272 **   instead of printing them to stdout/stderr for GUI applications.
00273 **
00274 ** Revision 1.12  2000/02/10 10:50:54  joergr
00275 ** Added new feature to dcmdump (enhanced print method of dcmdata): write
00276 ** pixel data/item value fields to raw files.
00277 **
00278 ** Revision 1.11  1999/03/31 09:24:56  meichel
00279 ** Updated copyright header in module dcmdata
00280 **
00281 ** Revision 1.10  1998/11/12 16:47:45  meichel
00282 ** Implemented operator= for all classes derived from DcmObject.
00283 **
00284 ** Revision 1.9  1997/07/21 08:25:13  andreas
00285 ** - Replace all boolean types (BOOLEAN, CTNBOOLEAN, DICOM_BOOL, BOOL)
00286 **   with one unique boolean type OFBool.
00287 **
00288 ** Revision 1.8  1997/04/18 08:13:29  andreas
00289 ** - The put/get-methods for all VRs did not conform to the C++-Standard
00290 **   draft. Some Compilers (e.g. SUN-C++ Compiler, Metroworks
00291 **   CodeWarrier, etc.) create many warnings concerning the hiding of
00292 **   overloaded get methods in all derived classes of DcmElement.
00293 **   So the interface of all value representation classes in the
00294 **   library are changed rapidly, e.g.
00295 **   OFCondition get(Uint16 & value, const unsigned long pos);
00296 **   becomes
00297 **   OFCondition getUint16(Uint16 & value, const unsigned long pos);
00298 **   All (retired) "returntype get(...)" methods are deleted.
00299 **   For more information see dcmdata/include/dcelem.h
00300 **
00301 ** Revision 1.7  1996/08/05 08:45:29  andreas
00302 ** new print routine with additional parameters:
00303 **         - print into files
00304 **         - fix output length for elements
00305 ** corrected error in search routine with parameter ESM_fromStackTop
00306 **
00307 ** Revision 1.6  1996/04/16 16:01:37  andreas
00308 ** - put methods for AttributeTag with DcmTagKey Parameter
00309 ** - better support for NULL values
00310 **
00311 ** Revision 1.5  1996/01/29 13:38:15  andreas
00312 ** - new put method for every VR to put value as a string
00313 ** - better and unique print methods
00314 **
00315 ** Revision 1.4  1996/01/09 11:06:17  andreas
00316 ** New Support for Visual C++
00317 ** Correct problems with inconsistent const declarations
00318 **
00319 ** Revision 1.3  1996/01/05 13:23:03  andreas
00320 ** - changed to support new streaming facilities
00321 ** - more cleanups
00322 ** - merged read / write methods for block and file transfer
00323 **
00324 */


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