dcitem.h

00001 /*
00002  *
00003  *  Copyright (C) 1994-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:  dcmdata
00019  *
00020  *  Author:  Gerd Ehlers
00021  *
00022  *  Purpose: Interface of class DcmItem
00023  *
00024  *  Last Update:      $Author: meichel $
00025  *  Update Date:      $Date: 2005/12/08 16:28:19 $
00026  *  CVS/RCS Revision: $Revision: 1.53 $
00027  *  Status:           $State: Exp $
00028  *
00029  *  CVS/RCS Log at end of file
00030  *
00031  */
00032 
00033 
00034 #ifndef DCITEM_H
00035 #define DCITEM_H
00036 
00037 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
00038 
00039 #include "dcmtk/ofstd/ofconsol.h"
00040 #include "dcmtk/dcmdata/dctypes.h"
00041 #include "dcmtk/dcmdata/dcobject.h"
00042 #include "dcmtk/dcmdata/dcvrui.h"
00043 #include "dcmtk/dcmdata/dclist.h"
00044 #include "dcmtk/dcmdata/dcstack.h"
00045 #include "dcmtk/dcmdata/dcpcache.h"
00046 
00047 
00048 // forward declaration
00049 class DcmSequenceOfItems;
00050 
00051 
00054 class DcmItem
00055   : public DcmObject
00056 {
00057 
00058   public:
00059 
00062     DcmItem();
00063 
00069     DcmItem(const DcmTag &tag,
00070             const Uint32 len = 0);
00071 
00075     DcmItem(const DcmItem &old);
00076 
00079     virtual ~DcmItem();
00080 
00084     virtual DcmObject *clone() const
00085     {
00086       return new DcmItem(*this);
00087     }
00088 
00092     virtual DcmEVR ident() const;
00093 
00097     virtual unsigned long getVM();
00098 
00099     virtual unsigned long card() const;
00100 
00101     virtual OFBool isLeaf() const { return OFFalse; }
00102 
00110     virtual void print(ostream &out,
00111                        const size_t flags = 0,
00112                        const int level = 0,
00113                        const char *pixelFileName = NULL,
00114                        size_t *pixelCounter = NULL);
00115 
00116     virtual Uint32 calcElementLength(const E_TransferSyntax xfer,
00117                                      const E_EncodingType enctype);
00118 
00119     virtual Uint32 getLength(const E_TransferSyntax xfer = EXS_LittleEndianImplicit,
00120                              const E_EncodingType enctype = EET_UndefinedLength);
00121 
00122     virtual void transferInit();
00123     virtual void transferEnd();
00124 
00125     virtual OFBool canWriteXfer(const E_TransferSyntax newXfer,
00126                                 const E_TransferSyntax oldXfer);
00127 
00141     virtual OFCondition read(DcmInputStream &inStream,
00142                              const E_TransferSyntax ixfer,
00143                              const E_GrpLenEncoding glenc = EGL_noChange,
00144                              const Uint32 maxReadLength = DCM_MaxReadLength);
00145 
00152     virtual OFCondition write(DcmOutputStream &outStream,
00153                               const E_TransferSyntax oxfer,
00154                               const E_EncodingType enctype = EET_UndefinedLength);
00155 
00161     virtual OFCondition writeXML(ostream &out,
00162                                  const size_t flags = 0);
00163 
00170     virtual OFCondition writeSignatureFormat(DcmOutputStream &outStream,
00171                                              const E_TransferSyntax oxfer,
00172                                              const E_EncodingType enctype = EET_UndefinedLength);
00173 
00177     virtual OFBool containsUnknownVR() const;
00178 
00191     virtual OFCondition insert(DcmElement *elem,
00192                                OFBool replaceOld = OFFalse,
00193                                OFBool checkInsertOrder = OFFalse);
00194 
00195     virtual DcmElement *getElement(const unsigned long num);
00196 
00197     // get next Object from position in stack. If stack empty
00198     // get next Object in this item. if intoSub true, scan
00199     // complete hierarchy, false scan only elements direct in this
00200     // item (not deeper).
00201     virtual OFCondition nextObject(DcmStack &stack,
00202                                    const OFBool intoSub);
00203     virtual DcmObject  *nextInContainer(const DcmObject *obj);
00204     virtual DcmElement *remove(const unsigned long num);
00205     virtual DcmElement *remove(DcmObject *elem);
00206     virtual DcmElement *remove(const DcmTagKey &tag);
00207     virtual OFCondition clear();
00208     virtual OFCondition verify(const OFBool autocorrect = OFFalse );
00209     virtual OFCondition search(const DcmTagKey &xtag,              // in
00210                                DcmStack &resultStack,              // inout
00211                                E_SearchMode mode = ESM_fromHere,   // in
00212                                OFBool searchIntoSub = OFTrue );    // in
00213     virtual OFCondition searchErrors( DcmStack &resultStack );     // inout
00214     virtual OFCondition loadAllDataIntoMemory();
00215 
00244     virtual OFCondition computeGroupLengthAndPadding(const E_GrpLenEncoding glenc,
00245                                                      const E_PaddingEncoding padenc = EPD_noChange,
00246                                                      const E_TransferSyntax xfer = EXS_Unknown,
00247                                                      const E_EncodingType enctype = EET_ExplicitLength,
00248                                                      const Uint32 padlen = 0,
00249                                                      const Uint32 subPadlen = 0,
00250                                                      Uint32 instanceLength = 0);
00251 
00252     /* simple tests for existance */
00253     OFBool tagExists(const DcmTagKey &key,
00254                      OFBool searchIntoSub = OFFalse);
00255     OFBool tagExistsWithValue(const DcmTagKey &key,
00256                               OFBool searchIntoSub = OFFalse);
00257 
00258 
00259     /* --- findAndGet functions: find an element and get it or the value, respectively --- */
00260 
00269     OFCondition findAndGetElement(const DcmTagKey &tagKey,
00270                                   DcmElement *&element,
00271                                   const OFBool searchIntoSub = OFFalse);
00272 
00280     OFCondition findAndGetElements(const DcmTagKey &tagKey,
00281                                    DcmStack &resultStack);
00282 
00293     OFCondition findAndGetString(const DcmTagKey &tagKey,
00294                                  const char *&value,
00295                                  const OFBool searchIntoSub = OFFalse);
00296 
00313     OFCondition findAndGetOFString(const DcmTagKey &tagKey,
00314                                    OFString &value,
00315                                    const unsigned long pos = 0,
00316                                    const OFBool searchIntoSub = OFFalse);
00317 
00331     OFCondition findAndGetOFStringArray(const DcmTagKey &tagKey,
00332                                         OFString &value,
00333                                         const OFBool searchIntoSub = OFFalse);
00334 
00344     OFCondition findAndGetUint8(const DcmTagKey &tagKey,
00345                                 Uint8 &value,
00346                                 const unsigned long pos = 0,
00347                                 const OFBool searchIntoSub = OFFalse);
00348 
00358     OFCondition findAndGetUint8Array(const DcmTagKey &tagKey,
00359                                      const Uint8 *&value,
00360                                      unsigned long *count = NULL,
00361                                      const OFBool searchIntoSub = OFFalse);
00362 
00372     OFCondition findAndGetUint16(const DcmTagKey &tagKey,
00373                                  Uint16 &value,
00374                                  const unsigned long pos = 0,
00375                                  const OFBool searchIntoSub = OFFalse);
00376 
00386     OFCondition findAndGetUint16Array(const DcmTagKey &tagKey,
00387                                       const Uint16 *&value,
00388                                       unsigned long *count = NULL,
00389                                       const OFBool searchIntoSub = OFFalse);
00390 
00400     OFCondition findAndGetSint16(const DcmTagKey &tagKey,
00401                                  Sint16 &value,
00402                                  const unsigned long pos = 0,
00403                                  const OFBool searchIntoSub = OFFalse);
00404 
00414     OFCondition findAndGetSint16Array(const DcmTagKey &tagKey,
00415                                       const Sint16 *&value,
00416                                       unsigned long *count = NULL,
00417                                       const OFBool searchIntoSub = OFFalse);
00418 
00428     OFCondition findAndGetUint32(const DcmTagKey &tagKey,
00429                                  Uint32 &value,
00430                                  const unsigned long pos = 0,
00431                                  const OFBool searchIntoSub = OFFalse);
00432 
00442     OFCondition findAndGetUint32Array(const DcmTagKey &tagKey,
00443                                       const Uint32 *&value,
00444                                       unsigned long *count = NULL,
00445                                       const OFBool searchIntoSub = OFFalse);
00446 
00456     OFCondition findAndGetSint32(const DcmTagKey &tagKey,
00457                                  Sint32 &value,
00458                                  const unsigned long pos = 0,
00459                                  const OFBool searchIntoSub = OFFalse);
00460 
00470     OFCondition findAndGetSint32Array(const DcmTagKey &tagKey,
00471                                       const Sint32 *&value,
00472                                       unsigned long *count = NULL,
00473                                       const OFBool searchIntoSub = OFFalse);
00474 
00484     OFCondition findAndGetLongInt(const DcmTagKey &tagKey,
00485                                   long int &value,
00486                                   const unsigned long pos = 0,
00487                                   const OFBool searchIntoSub = OFFalse);
00488 
00498     OFCondition findAndGetFloat32(const DcmTagKey &tagKey,
00499                                   Float32 &value,
00500                                   const unsigned long pos = 0,
00501                                   const OFBool searchIntoSub = OFFalse);
00502 
00512     OFCondition findAndGetFloat32Array(const DcmTagKey &tagKey,
00513                                        const Float32 *&value,
00514                                        unsigned long *count = NULL,
00515                                        const OFBool searchIntoSub = OFFalse);
00516 
00526     OFCondition findAndGetFloat64(const DcmTagKey &tagKey,
00527                                   Float64 &value,
00528                                   const unsigned long pos = 0,
00529                                   const OFBool searchIntoSub = OFFalse);
00530 
00540     OFCondition findAndGetFloat64Array(const DcmTagKey &tagKey,
00541                                        const Float64 *&value,
00542                                        unsigned long *count = NULL,
00543                                        const OFBool searchIntoSub = OFFalse);
00544 
00554     OFCondition findAndGetSequence(const DcmTagKey &seqTagKey,
00555                                    DcmSequenceOfItems *&sequence,
00556                                    const OFBool searchIntoSub = OFFalse);
00557 
00568     OFCondition findAndGetSequenceItem(const DcmTagKey &seqTagKey,
00569                                        DcmItem *&item,
00570                                        const signed long itemNum = 0);
00571 
00572 
00573     /* --- findOrCreate functions: find an element or create a new one --- */
00574 
00587     OFCondition findOrCreateSequenceItem(const DcmTag &seqTag,
00588                                          DcmItem *&item,
00589                                          const signed long itemNum = 0);
00590 
00591 
00592     /* --- findAndXXX functions: find an element and do something with it --- */
00593 
00602     OFCondition findAndDeleteElement(const DcmTagKey &tagKey,
00603                                      const OFBool allOccurrences = OFFalse,
00604                                      const OFBool searchIntoSub = OFFalse);
00605 
00615     OFCondition findAndCopyElement(const DcmTagKey &tagKey,
00616                                    DcmElement *&newElement,
00617                                    const OFBool searchIntoSub = OFFalse);
00618 
00619     /* --- putAndInsert functions: put value and insert new element --- */
00620 
00629     OFCondition putAndInsertString(const DcmTag &tag,
00630                                    const char *value,
00631                                    const OFBool replaceOld = OFTrue);
00632 
00640     OFCondition putAndInsertOFStringArray(const DcmTag &tag,
00641                                           const OFString &value,
00642                                           const OFBool replaceOld = OFTrue);
00643 
00652     OFCondition putAndInsertUint8Array(const DcmTag &tag,
00653                                        const Uint8 *value,
00654                                        const unsigned long count,
00655                                        const OFBool replaceOld = OFTrue);
00656 
00665     OFCondition putAndInsertUint16(const DcmTag &tag,
00666                                    const Uint16 value,
00667                                    const unsigned long pos = 0,
00668                                    const OFBool replaceOld = OFTrue);
00669 
00678     OFCondition putAndInsertUint16Array(const DcmTag &tag,
00679                                         const Uint16 *value,
00680                                         const unsigned long count,
00681                                         const OFBool replaceOld = OFTrue);
00682 
00691     OFCondition putAndInsertSint16(const DcmTag &tag,
00692                                    const Sint16 value,
00693                                    const unsigned long pos = 0,
00694                                    const OFBool replaceOld = OFTrue);
00695 
00704     OFCondition putAndInsertSint16Array(const DcmTag &tag,
00705                                         const Sint16 *value,
00706                                         const unsigned long count,
00707                                         const OFBool replaceOld = OFTrue);
00708 
00717     OFCondition putAndInsertUint32(const DcmTag &tag,
00718                                    const Uint32 value,
00719                                    const unsigned long pos = 0,
00720                                    const OFBool replaceOld = OFTrue);
00721 
00730     OFCondition putAndInsertSint32(const DcmTag &tag,
00731                                    const Sint32 value,
00732                                    const unsigned long pos = 0,
00733                                    const OFBool replaceOld = OFTrue);
00734 
00743     OFCondition putAndInsertFloat32(const DcmTag &tag,
00744                                     const Float32 value,
00745                                     const unsigned long pos = 0,
00746                                     const OFBool replaceOld = OFTrue);
00747 
00756     OFCondition putAndInsertFloat64(const DcmTag &tag,
00757                                     const Float64 value,
00758                                     const unsigned long pos = 0,
00759                                     const OFBool replaceOld = OFTrue);
00760 
00768     OFCondition insertEmptyElement(const DcmTag &tag,
00769                                    const OFBool replaceOld = OFTrue);
00770 
00771 
00772   protected:
00773 
00775     DcmList *elementList;
00776 
00781     OFBool lastElementComplete;
00782 
00787     Uint32 fStartPosition;
00788 
00807     OFCondition readTagAndLength(DcmInputStream &inStream,       // inout
00808                                  const E_TransferSyntax xfer,    // in
00809                                  DcmTag &tag,                    // out
00810                                  Uint32 &length,                 // out
00811                                  Uint32 &bytesRead);             // out
00812 
00829     OFCondition readSubElement(DcmInputStream &inStream,         // inout
00830                                DcmTag &newTag,                   // inout
00831                                const Uint32 newLength,           // in
00832                                const E_TransferSyntax xfer,      // in
00833                                const E_GrpLenEncoding glenc,     // in
00834                                const Uint32 maxReadLength = DCM_MaxReadLength);
00835 
00845     E_TransferSyntax checkTransferSyntax(DcmInputStream &inStream);
00846 
00847 
00848   private:
00849 
00851     DcmItem &operator=(const DcmItem &);
00852 
00853     OFCondition searchSubFromHere(const DcmTagKey &tag,          // in
00854                                   DcmStack &resultStack,         // inout
00855                                   OFBool searchIntoSub );        // in
00856 
00857     OFBool foundVR(char *atposition);
00858 
00860     DcmPrivateTagCache privateCreatorCache;
00861 };
00862 
00863 
00864 //
00865 // SUPPORT FUNCTIONS
00866 //
00867 
00868 
00869 // Function: newDicomElement
00870 // creates a new DicomElement from a Tag.
00871 //
00872 // Input:
00873 //   tag    : Tag of the new element
00874 //   length : length of the element value
00875 //
00876 // Output:
00877 //   newElement: point of a heap allocated new element. If the tag does not
00878 //               describe a dicom element or has ambigious VR (e.g. EVR_ox)
00879 //               a NULL pointer is returned.
00880 //
00881 // Result:
00882 //   EC_Normal:     tag describes an element (possibly with ambiguous VR)
00883 //   EC_InvalidTag: tag describes an item begin or an unknown element
00884 //   EC_SequEnd:    tag describes a sequence delimitation element
00885 //   EC_ItemEnd:    tag describes an item delmitation element
00886 //   other: an error
00887 OFCondition newDicomElement(DcmElement *&newElement,
00888                             DcmTag &tag,
00889                             const Uint32 length,
00890                             DcmPrivateTagCache *privateCreatorCache,
00891                             OFBool& readAsUN);
00892 
00893 OFCondition newDicomElement(DcmElement *&newElement,
00894                             const DcmTag &tag,
00895                             const Uint32 length = 0);
00896 
00897 // Functions: newDicomElement
00898 // creates a new DicomElement from a Tag. They differ from the above functions
00899 // in not returning a condition.
00900 DcmElement *newDicomElement(const DcmTag &tag,
00901                             const Uint32 length = 0);
00902 
00903 // Function: nextUp
00904 // pop Object from stack and get next Object in top of stack
00905 OFCondition nextUp(DcmStack &st);
00906 
00907 
00908 #endif // DCITEM_H
00909 
00910 
00911 /*
00912 ** CVS/RCS Log:
00913 ** $Log: dcitem.h,v $
00914 ** Revision 1.53  2005/12/08 16:28:19  meichel
00915 ** Changed include path schema for all DCMTK header files
00916 **
00917 ** Revision 1.52  2005/11/15 18:28:02  meichel
00918 ** Added new global flag dcmEnableUnknownVRConversion that enables the automatic
00919 **   re-conversion of defined length UN elements read in an explicit VR transfer
00920 **   syntax, if the real VR is defined in the data dictionary. Default is OFFalse,
00921 **   i.e. to retain the previous behavior.
00922 **
00923 ** Revision 1.51  2005/06/24 10:03:14  joergr
00924 ** Added support for internal VR "xs" to putAndInsertXXX() helper methods.
00925 **
00926 ** Revision 1.50  2004/07/01 12:28:25  meichel
00927 ** Introduced virtual clone method for DcmObject and derived classes.
00928 **
00929 ** Revision 1.49  2004/02/04 16:02:08  joergr
00930 ** Removed pointer declaration from parameter "resultStack" in method
00931 ** findAndGetElements().
00932 **
00933 ** Revision 1.48  2003/10/08 10:24:40  joergr
00934 ** Added support for AT, OB, OF, OW, SL, SS, UL, US to putAndInsertString().
00935 **
00936 ** Revision 1.47  2003/07/16 14:34:05  joergr
00937 ** Added new function findAndGetSequence().
00938 **
00939 ** Revision 1.46  2003/06/26 09:17:25  onken
00940 ** Added commandline-application dcmodify.
00941 **
00942 ** Revision 1.45  2003/06/12 13:33:46  joergr
00943 ** Fixed inconsistent API documentation reported by Doxygen.
00944 **
00945 ** Revision 1.44  2003/06/02 17:16:23  joergr
00946 ** Added new helper function DcmItem::findAndCopyElement().
00947 **
00948 ** Revision 1.43  2003/06/02 16:58:12  meichel
00949 ** Renamed local variables to avoid name clashes with STL
00950 **
00951 ** Revision 1.42  2003/05/20 09:01:58  joergr
00952 ** Added new helper methods: findAndGetElement(), findAndGetUint32Array(),
00953 ** FindAndGetSint32Array(), findAndGetFloat64Array(), findAndDeleteElement().
00954 ** Enhanced findAndGetSequenceItem() and findOrCreateSequenceItem() by checking
00955 ** the return value of ident() - avoids crashes when applied to non-sequence
00956 ** elements.
00957 **
00958 ** Revision 1.41  2002/12/09 09:31:15  wilkens
00959 ** Modified/Added doc++ documentation.
00960 **
00961 ** Revision 1.40  2002/12/06 12:49:10  joergr
00962 ** Enhanced "print()" function by re-working the implementation and replacing
00963 ** the boolean "showFullData" parameter by a more general integer flag.
00964 ** Added doc++ documentation.
00965 ** Made source code formatting more consistent with other modules/files.
00966 **
00967 ** Revision 1.39  2002/08/27 16:55:34  meichel
00968 ** Initial release of new DICOM I/O stream classes that add support for stream
00969 **   compression (deflated little endian explicit VR transfer syntax)
00970 **
00971 ** Revision 1.38  2002/08/02 08:42:44  joergr
00972 ** Added optional 'pos' parameter to the putAndInsertXXX() methods.
00973 **
00974 ** Revision 1.37  2002/07/23 14:21:26  meichel
00975 ** Added support for private tag data dictionaries to dcmdata
00976 **
00977 ** Revision 1.36  2002/06/26 15:47:40  joergr
00978 ** Added support for polymorp OB/OW value representation (e.g. pixel data) to
00979 ** putAndInsertUint8/16Array() methods.
00980 **
00981 ** Revision 1.35  2002/05/17 09:58:14  meichel
00982 ** fixed bug in DcmItem which caused the parser to fail if the same attribute
00983 **   tag appeared twice within one dataset (which is illegal in DICOM anyway).
00984 **   Added console warning if the attributes read are not in ascending order.
00985 **
00986 ** Revision 1.34  2002/04/25 10:06:46  joergr
00987 ** Added support for XML output of DICOM objects.
00988 **
00989 ** Revision 1.33  2001/12/18 11:37:24  joergr
00990 ** Added helper method allowing to create and insert empty elements into an
00991 ** item/dataset.
00992 **
00993 ** Revision 1.32  2001/11/16 15:54:38  meichel
00994 ** Adapted digital signature code to final text of supplement 41.
00995 **
00996 ** Revision 1.31  2001/11/09 15:51:59  joergr
00997 ** Added new helper routines for managing sequences and items.
00998 **
00999 ** Revision 1.30  2001/10/10 15:14:04  joergr
01000 ** Changed parameter DcmTagKey to DcmTag in DcmItem::putAndInsert... methods
01001 ** to support elements which are not in the data dictionary (e.g. private
01002 ** extensions).
01003 **
01004 ** Revision 1.29  2001/10/02 11:46:45  joergr
01005 ** Added functions to get/put 8 bit values/arrays from/to an item/dataset.
01006 **
01007 ** Revision 1.28  2001/10/01 15:01:14  joergr
01008 ** Introduced new general purpose functions to get/put DICOM element values
01009 ** from/to an item/dataset - removed some old and rarely used functions.
01010 **
01011 ** Revision 1.27  2001/09/25 17:19:26  meichel
01012 ** Adapted dcmdata to class OFCondition
01013 **
01014 ** Revision 1.26  2001/06/01 15:48:40  meichel
01015 ** Updated copyright header
01016 **
01017 ** Revision 1.25  2000/11/07 16:56:06  meichel
01018 ** Initial release of dcmsign module for DICOM Digital Signatures
01019 **
01020 ** Revision 1.24  2000/04/14 15:31:32  meichel
01021 ** Removed default value from output stream passed to print() method.
01022 **   Required for use in multi-thread environments.
01023 **
01024 ** Revision 1.23  2000/03/08 16:26:15  meichel
01025 ** Updated copyright header.
01026 **
01027 ** Revision 1.22  2000/03/03 14:05:24  meichel
01028 ** Implemented library support for redirecting error messages into memory
01029 **   instead of printing them to stdout/stderr for GUI applications.
01030 **
01031 ** Revision 1.21  2000/02/10 10:50:51  joergr
01032 ** Added new feature to dcmdump (enhanced print method of dcmdata): write
01033 ** pixel data/item value fields to raw files.
01034 **
01035 ** Revision 1.20  1999/03/31 09:24:40  meichel
01036 ** Updated copyright header in module dcmdata
01037 **
01038 ** Revision 1.19  1998/07/15 15:48:48  joergr
01039 ** Removed several compiler warnings reported by gcc 2.8.1 with
01040 ** additional options, e.g. missing copy constructors and assignment
01041 ** operators, initialization of member variables in the body of a
01042 ** constructor instead of the member initialization list, hiding of
01043 ** methods by use of identical names, uninitialized member variables,
01044 ** missing const declaration of char pointers. Replaced tabs by spaces.
01045 **
01046 ** Revision 1.18  1997/09/22 14:50:43  hewett
01047 ** - Added 2 simple methods to test for the existance of an attribute
01048 **   to DcmItem class (tagExists and tagExistsWithValue).  This code
01049 **   was part of dcmgpdir.cc but is more generally useful.
01050 ** - Added 2 methods to find an attribute and retrieve numeric values
01051 **   to DcmItem class (findIntegerNumber and findRealNumber).  The old
01052 **   method findLong is now marked as obsolete and reimplemented using
01053 **   findIntegerNumber.
01054 **
01055 ** Revision 1.17  1997/09/11 15:13:11  hewett
01056 ** Modified getOFString method arguments by removing a default value
01057 ** for the pos argument.  By requiring the pos argument to be provided
01058 ** ensures that callers realise getOFString only gets one component of
01059 ** a multi-valued string.
01060 **
01061 ** Revision 1.16  1997/08/29 08:32:39  andreas
01062 ** - Added methods getOFString and getOFStringArray for all
01063 **   string VRs. These methods are able to normalise the value, i. e.
01064 **   to remove leading and trailing spaces. This will be done only if
01065 **   it is described in the standard that these spaces are not relevant.
01066 **   These methods do not test the strings for conformance, this means
01067 **   especially that they do not delete spaces where they are not allowed!
01068 **   getOFStringArray returns the string with all its parts separated by \
01069 **   and getOFString returns only one value of the string.
01070 **   CAUTION: Currently getString returns a string with trailing
01071 **   spaces removed (if dcmEnableAutomaticInputDataCorrection == OFTrue) and
01072 **   truncates the original string (since it is not copied!). If you rely on this
01073 **   behaviour please change your application now.
01074 **   Future changes will ensure that getString returns the original
01075 **   string from the DICOM object (NULL terminated) inclusive padding.
01076 **   Currently, if you call getOF... before calling getString without
01077 **   normalisation, you can get the original string read from the DICOM object.
01078 **
01079 ** Revision 1.15  1997/07/21 08:25:08  andreas
01080 ** - Replace all boolean types (BOOLEAN, CTNBOOLEAN, DICOM_BOOL, BOOL)
01081 **   with one unique boolean type OFBool.
01082 **
01083 ** Revision 1.14  1997/07/07 07:42:03  andreas
01084 ** - Changed parameter type DcmTag & to DcmTagKey & in all search functions
01085 **   in DcmItem, DcmSequenceOfItems, DcmDirectoryRecord and DcmObject
01086 **
01087 ** Revision 1.13  1997/05/30 06:45:42  andreas
01088 ** - fixed problem of inconsistent interfaces and implementation that the
01089 **   syntax check of GNU C++ does not find.
01090 **
01091 ** Revision 1.12  1997/05/27 13:48:28  andreas
01092 ** - Add method canWriteXfer to class DcmObject and all derived classes.
01093 **   This method checks whether it is possible to convert the original
01094 **   transfer syntax to an new transfer syntax. The check is used in the
01095 **   dcmconv utility to prohibit the change of a compressed transfer
01096 **   syntax to a uncompressed.
01097 **
01098 ** Revision 1.11  1997/05/16 08:13:43  andreas
01099 ** - Revised handling of GroupLength elements and support of
01100 **   DataSetTrailingPadding elements. The enumeratio E_GrpLenEncoding
01101 **   got additional enumeration values (for a description see dctypes.h).
01102 **   addGroupLength and removeGroupLength methods are replaced by
01103 **   computeGroupLengthAndPadding. To support Padding, the parameters of
01104 **   element and sequence write functions changed.
01105 ** - Added a new method calcElementLength to calculate the length of an
01106 **   element, item or sequence. For elements it returns the length of
01107 **   tag, length field, vr field, and value length, for item and
01108 **   sequences it returns the length of the whole item. sequence including
01109 **   the Delimitation tag (if appropriate).  It can never return
01110 **   UndefinedLength.
01111 ** - Deleted obsolete method DcmItem::calcHeaderLength because the
01112 **   samce functionality is performed by DcmXfer::sizeofTagHeader
01113 **
01114 ** Revision 1.10  1996/08/05 08:45:23  andreas
01115 ** new print routine with additional parameters:
01116 **         - print into files
01117 **         - fix output length for elements
01118 ** corrected error in search routine with parameter ESM_fromStackTop
01119 **
01120 ** Revision 1.9  1996/07/17 12:38:58  andreas
01121 ** new nextObject to iterate a DicomDataset, DicomFileFormat, Item, ...
01122 **
01123 ** Revision 1.8  1996/04/29 15:08:53  hewett
01124 ** Replaced DcmItem::findInt(...) with the more general DcmItem::findLong(...).
01125 **
01126 ** Revision 1.7  1996/04/16 16:00:05  andreas
01127 ** - added const for Tag in newDicomElement
01128 **
01129 ** Revision 1.6  1996/03/28 18:52:30  hewett
01130 ** Added 2 simple find&get methods (findString & findInt).
01131 **
01132 ** Revision 1.5  1996/01/29 13:38:12  andreas
01133 ** - new put method for every VR to put value as a string
01134 ** - better and unique print methods
01135 **
01136 ** Revision 1.4  1996/01/09 11:06:15  andreas
01137 ** New Support for Visual C++
01138 ** Correct problems with inconsistent const declarations
01139 **
01140 ** Revision 1.3  1996/01/05 13:22:56  andreas
01141 ** - changed to support new streaming facilities
01142 ** - more cleanups
01143 ** - merged read / write methods for block and file transfer
01144 **
01145 */


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