OFFIS DCMTK  Version 3.6.0
dcitem.h
1 /*
2  *
3  * Copyright (C) 1994-2010, OFFIS e.V.
4  * All rights reserved. See COPYRIGHT file for details.
5  *
6  * This software and supporting documentation were developed by
7  *
8  * OFFIS e.V.
9  * R&D Division Health
10  * Escherweg 2
11  * D-26121 Oldenburg, Germany
12  *
13  *
14  * Module: dcmdata
15  *
16  * Author: Gerd Ehlers
17  *
18  * Purpose: Interface of class DcmItem
19  *
20  * Last Update: $Author: joergr $
21  * Update Date: $Date: 2010-11-02 15:31:06 $
22  * CVS/RCS Revision: $Revision: 1.83 $
23  * Status: $State: Exp $
24  *
25  * CVS/RCS Log at end of file
26  *
27  */
28 
29 
30 #ifndef DCITEM_H
31 #define DCITEM_H
32 
33 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
34 
35 #include "dcmtk/ofstd/offile.h" /* for offile_off_t */
36 #include "dcmtk/dcmdata/dctypes.h"
37 #include "dcmtk/dcmdata/dcobject.h"
38 #include "dcmtk/dcmdata/dclist.h"
39 #include "dcmtk/dcmdata/dcpcache.h"
40 
41 
42 // forward declaration
43 class DcmSequenceOfItems;
44 class DcmElement;
45 
46 
51 class DcmItem
52  : public DcmObject
53 {
54  public:
55 
58  DcmItem();
59 
65  DcmItem(const DcmTag &tag,
66  const Uint32 len = 0);
67 
71  DcmItem(const DcmItem &old);
72 
77  DcmItem &operator=(const DcmItem &obj);
78 
81  virtual ~DcmItem();
82 
86  virtual DcmObject *clone() const
87  {
88  return new DcmItem(*this);
89  }
90 
103  virtual OFCondition copyFrom(const DcmObject& rhs);
104 
108  virtual DcmEVR ident() const;
109 
113  virtual unsigned long getVM();
114 
118  virtual unsigned long card() const;
119 
126  virtual OFBool isLeaf() const { return OFFalse; }
127 
135  virtual void print(STD_NAMESPACE ostream&out,
136  const size_t flags = 0,
137  const int level = 0,
138  const char *pixelFileName = NULL,
139  size_t *pixelCounter = NULL);
140 
157  virtual Uint32 calcElementLength(const E_TransferSyntax xfer,
158  const E_EncodingType enctype);
159 
172  virtual Uint32 getLength(const E_TransferSyntax xfer = EXS_LittleEndianImplicit,
173  const E_EncodingType enctype = EET_UndefinedLength);
174 
178  virtual void transferInit();
179 
183  virtual void transferEnd();
184 
190  virtual OFBool canWriteXfer(const E_TransferSyntax newXfer,
191  const E_TransferSyntax oldXfer);
192 
206  virtual OFCondition read(DcmInputStream &inStream,
207  const E_TransferSyntax ixfer,
208  const E_GrpLenEncoding glenc = EGL_noChange,
209  const Uint32 maxReadLength = DCM_MaxReadLength);
210 
218  virtual OFCondition write(
219  DcmOutputStream &outStream,
220  const E_TransferSyntax oxfer,
221  const E_EncodingType enctype,
222  DcmWriteCache *wcache);
223 
229  virtual OFCondition writeXML(STD_NAMESPACE ostream&out,
230  const size_t flags = 0);
231 
240  DcmOutputStream &outStream,
241  const E_TransferSyntax oxfer,
242  const E_EncodingType enctype,
243  DcmWriteCache *wcache);
244 
248  virtual OFBool containsUnknownVR() const;
249 
255  virtual OFBool containsExtendedCharacters(const OFBool checkAllStrings = OFFalse);
256 
263  virtual OFBool isAffectedBySpecificCharacterSet() const;
264 
277  virtual OFCondition insert(DcmElement *elem,
278  OFBool replaceOld = OFFalse,
279  OFBool checkInsertOrder = OFFalse);
280 
286  virtual DcmElement *getElement(const unsigned long num);
287 
303  virtual OFCondition nextObject(DcmStack &stack,
304  const OFBool intoSub);
305 
316  virtual DcmObject *nextInContainer(const DcmObject *obj);
317 
324  virtual DcmElement *remove(const unsigned long num);
325 
332  virtual DcmElement *remove(DcmObject *elem);
333 
340  virtual DcmElement *remove(const DcmTagKey &tag);
341 
346  virtual OFBool isEmpty(const OFBool normalize = OFTrue);
347 
351  virtual OFCondition clear();
352 
357  virtual OFCondition verify(const OFBool autocorrect = OFFalse );
358 
381  virtual OFCondition search(const DcmTagKey &xtag, // in
382  DcmStack &resultStack, // inout
383  E_SearchMode mode = ESM_fromHere, // in
384  OFBool searchIntoSub = OFTrue ); // in
385 
394 
423  virtual OFCondition computeGroupLengthAndPadding(const E_GrpLenEncoding glenc,
424  const E_PaddingEncoding padenc = EPD_noChange,
425  const E_TransferSyntax xfer = EXS_Unknown,
426  const E_EncodingType enctype = EET_ExplicitLength,
427  const Uint32 padlen = 0,
428  const Uint32 subPadlen = 0,
429  Uint32 instanceLength = 0);
430 
431 
438  OFBool tagExists(const DcmTagKey &key,
439  OFBool searchIntoSub = OFFalse);
440 
448  OFBool tagExistsWithValue(const DcmTagKey &key,
449  OFBool searchIntoSub = OFFalse);
450 
451  /* --- findAndGet functions: find an element and get it or the value, respectively --- */
452 
463  DcmElement *&element,
464  const OFBool searchIntoSub = OFFalse,
465  const OFBool createCopy = OFFalse);
466 
475  DcmStack &resultStack);
476 
487  OFCondition findAndGetString(const DcmTagKey &tagKey,
488  const char *&value,
489  const OFBool searchIntoSub = OFFalse);
490 
508  OFString &value,
509  const unsigned long pos = 0,
510  const OFBool searchIntoSub = OFFalse);
511 
526  OFString &value,
527  const OFBool searchIntoSub = OFFalse);
528 
538  OFCondition findAndGetUint8(const DcmTagKey &tagKey,
539  Uint8 &value,
540  const unsigned long pos = 0,
541  const OFBool searchIntoSub = OFFalse);
542 
553  const Uint8 *&value,
554  unsigned long *count = NULL,
555  const OFBool searchIntoSub = OFFalse);
556 
566  OFCondition findAndGetUint16(const DcmTagKey &tagKey,
567  Uint16 &value,
568  const unsigned long pos = 0,
569  const OFBool searchIntoSub = OFFalse);
570 
581  const Uint16 *&value,
582  unsigned long *count = NULL,
583  const OFBool searchIntoSub = OFFalse);
584 
594  OFCondition findAndGetSint16(const DcmTagKey &tagKey,
595  Sint16 &value,
596  const unsigned long pos = 0,
597  const OFBool searchIntoSub = OFFalse);
598 
609  const Sint16 *&value,
610  unsigned long *count = NULL,
611  const OFBool searchIntoSub = OFFalse);
612 
622  OFCondition findAndGetUint32(const DcmTagKey &tagKey,
623  Uint32 &value,
624  const unsigned long pos = 0,
625  const OFBool searchIntoSub = OFFalse);
626 
637  const Uint32 *&value,
638  unsigned long *count = NULL,
639  const OFBool searchIntoSub = OFFalse);
640 
650  OFCondition findAndGetSint32(const DcmTagKey &tagKey,
651  Sint32 &value,
652  const unsigned long pos = 0,
653  const OFBool searchIntoSub = OFFalse);
654 
665  const Sint32 *&value,
666  unsigned long *count = NULL,
667  const OFBool searchIntoSub = OFFalse);
668 
679  long int &value,
680  const unsigned long pos = 0,
681  const OFBool searchIntoSub = OFFalse);
682 
693  Float32 &value,
694  const unsigned long pos = 0,
695  const OFBool searchIntoSub = OFFalse);
696 
707  const Float32 *&value,
708  unsigned long *count = NULL,
709  const OFBool searchIntoSub = OFFalse);
710 
721  Float64 &value,
722  const unsigned long pos = 0,
723  const OFBool searchIntoSub = OFFalse);
724 
735  const Float64 *&value,
736  unsigned long *count = NULL,
737  const OFBool searchIntoSub = OFFalse);
738 
749  OFCondition findAndGetSequence(const DcmTagKey &seqTagKey,
750  DcmSequenceOfItems *&sequence,
751  const OFBool searchIntoSub = OFFalse,
752  const OFBool createCopy = OFFalse);
753 
766  DcmItem *&item,
767  const signed long itemNum = 0,
768  const OFBool createCopy = OFFalse);
769 
770 
771  /* --- findOrCreate functions: find an element or create a new one --- */
772 
786  DcmItem *&item,
787  const signed long itemNum = 0);
788 
789  /* --- findAndXXX functions: find an element and do something with it --- */
790 
803  DcmItem *destItem,
804  const OFBool replaceOld = OFTrue);
805 
815  const OFBool allOccurrences = OFFalse,
816  const OFBool searchIntoSub = OFFalse);
817 
825  const signed long itemNum);
826 
827 
828  /* --- putAndInsert functions: put value and insert new element --- */
829 
839  const char *value,
840  const OFBool replaceOld = OFTrue);
841 
850  const OFString &value,
851  const OFBool replaceOld = OFTrue);
852 
862  const Uint8 *value,
863  const unsigned long count,
864  const OFBool replaceOld = OFTrue);
865 
876  const Uint16 value,
877  const unsigned long pos = 0,
878  const OFBool replaceOld = OFTrue);
879 
889  const Uint16 *value,
890  const unsigned long count,
891  const OFBool replaceOld = OFTrue);
892 
903  const Sint16 value,
904  const unsigned long pos = 0,
905  const OFBool replaceOld = OFTrue);
906 
916  const Sint16 *value,
917  const unsigned long count,
918  const OFBool replaceOld = OFTrue);
919 
930  const Uint32 value,
931  const unsigned long pos = 0,
932  const OFBool replaceOld = OFTrue);
933 
944  const Sint32 value,
945  const unsigned long pos = 0,
946  const OFBool replaceOld = OFTrue);
947 
958  const Float32 value,
959  const unsigned long pos = 0,
960  const OFBool replaceOld = OFTrue);
961 
972  const Float64 value,
973  const unsigned long pos = 0,
974  const OFBool replaceOld = OFTrue);
975 
976 
977  /* --- insertXXX functions: insert new element --- */
978 
987  const OFBool replaceOld = OFTrue);
988 
1001  OFCondition insertSequenceItem(const DcmTag &seqTag,
1002  DcmItem *item,
1003  const signed long itemNum = -2);
1004 
1005  protected:
1006 
1009 
1015 
1020  offile_off_t fStartPosition;
1021 
1022  protected:
1023 
1042  OFCondition readTagAndLength(DcmInputStream &inStream, // inout
1043  const E_TransferSyntax xfer, // in
1044  DcmTag &tag, // out
1045  Uint32 &length, // out
1046  Uint32 &bytesRead); // out
1047 
1064  OFCondition readSubElement(DcmInputStream &inStream, // inout
1065  DcmTag &newTag, // inout
1066  const Uint32 newLength, // in
1067  const E_TransferSyntax xfer, // in
1068  const E_GrpLenEncoding glenc, // in
1069  const Uint32 maxReadLength = DCM_MaxReadLength);
1070 
1080  E_TransferSyntax checkTransferSyntax(DcmInputStream &inStream);
1081 
1090  void checkAndUpdateVR(DcmItem &item,
1091  DcmTag &tag);
1092 
1093 
1094  private:
1095 
1105  OFCondition searchSubFromHere(const DcmTagKey &tag, // in
1106  DcmStack &resultStack, // inout
1107  OFBool searchIntoSub ); // in
1108 
1115  static OFBool foundVR(const Uint8* atposition);
1116 
1119 };
1120 
1121 //
1122 // SUPPORT FUNCTIONS
1123 //
1124 
1135 OFCondition newDicomElement(DcmElement *&newElement,
1136  DcmTag &tag,
1137  const Uint32 length,
1138  DcmPrivateTagCache *privateCreatorCache,
1139  OFBool& readAsUN);
1140 
1148 OFCondition newDicomElement(DcmElement *&newElement,
1149  const DcmTag &tag,
1150  const Uint32 length = 0);
1151 
1158 DcmElement *newDicomElement(const DcmTag &tag,
1159  const Uint32 length = 0);
1160 
1166 OFCondition nextUp(DcmStack &st);
1167 
1168 
1169 #endif // DCITEM_H
1170 
1171 
1172 /*
1173 ** CVS/RCS Log:
1174 ** $Log: dcitem.h,v $
1175 ** Revision 1.83 2010-11-02 15:31:06 joergr
1176 ** Added special handling for data elements that are associated with different
1177 ** VRs (according to the data dictinary) when read with an implicit transfer
1178 ** syntax, e.g. PixelPaddingValue or WaveformData.
1179 **
1180 ** Revision 1.82 2010-10-14 13:15:41 joergr
1181 ** Updated copyright header. Added reference to COPYRIGHT file.
1182 **
1183 ** Revision 1.81 2010-10-01 13:55:01 joergr
1184 ** Added new helper function findAndInsertCopyOfElement().
1185 **
1186 ** Revision 1.80 2010-03-01 09:08:44 uli
1187 ** Removed some unnecessary include directives in the headers.
1188 **
1189 ** Revision 1.79 2010-02-22 11:39:53 uli
1190 ** Remove some unneeded includes.
1191 **
1192 ** Revision 1.78 2009-09-02 09:58:21 joergr
1193 ** Revised documentation of parameter "pos" for some putAndInsertXXX() functions
1194 ** in order to make clear what the possible range of values is.
1195 **
1196 ** Revision 1.77 2009-08-07 14:40:38 joergr
1197 ** Enhanced isEmpty() method by checking whether the data element value consists
1198 ** of non-significant characters only.
1199 **
1200 ** Revision 1.76 2009-03-25 10:22:09 joergr
1201 ** Added new method isEmpty() to DICOM object, item and sequence class.
1202 **
1203 ** Revision 1.75 2009-03-05 14:07:56 onken
1204 ** Fixed typo.
1205 **
1206 ** Revision 1.74 2009-03-05 13:35:47 onken
1207 ** Added checks for sequence and item lengths which prevents overflow in length
1208 ** field, if total length of contained items (or sequences) exceeds
1209 ** 32-bit length field. Also introduced new flag (default: enabled)
1210 ** for writing in explicit length mode, which allows for automatically
1211 ** switching encoding of only that very sequence/item to undefined
1212 ** length coding (thus permitting to actually write the file).
1213 **
1214 ** Revision 1.73 2009-02-04 17:52:17 joergr
1215 ** Fixes various type mismatches reported by MSVC introduced with OFFile class.
1216 **
1217 ** Revision 1.72 2008-12-12 11:44:40 onken
1218 ** Moved path access functions to separate classes
1219 **
1220 ** Revision 1.71 2008-12-05 13:28:14 onken
1221 ** Splitted findOrCreatePath() function API for also offering a simple API
1222 ** for non-wildcard searches.
1223 **
1224 ** Revision 1.70 2008-12-04 16:55:14 onken
1225 ** Changed findOrCreatePath() to also support wildcard as item numbers.
1226 **
1227 ** Revision 1.69 2008-11-26 12:08:22 joergr
1228 ** Updated documentation of newDicomElement() in order to reflect the current
1229 ** implementation.
1230 **
1231 ** Revision 1.68 2008-10-15 12:31:20 onken
1232 ** Added findOrCreatePath() functions which allow for finding or creating a
1233 ** hierarchy of sequences, items and attributes according to a given "path"
1234 ** string.
1235 **
1236 ** Revision 1.67 2008-07-17 11:19:48 onken
1237 ** Updated copyFrom() documentation.
1238 **
1239 ** Revision 1.66 2008-07-17 10:30:23 onken
1240 ** Implemented copyFrom() method for complete DcmObject class hierarchy, which
1241 ** permits setting an instance's value from an existing object. Implemented
1242 ** assignment operator where necessary.
1243 **
1244 ** Revision 1.65 2008-06-23 12:09:13 joergr
1245 ** Fixed inconsistencies in Doxygen API documentation.
1246 **
1247 ** Revision 1.64 2007/11/29 14:30:19 meichel
1248 ** Write methods now handle large raw data elements (such as pixel data)
1249 ** without loading everything into memory. This allows very large images to
1250 ** be sent over a network connection, or to be copied without ever being
1251 ** fully in memory.
1252 **
1253 ** Revision 1.63 2007/09/21 10:40:15 onken
1254 ** Changed foundVR() API and implementation to use Uint8* instead of char* to
1255 ** avoid calls to isalpha() with negative arguments (undef. behaviour/assertion)
1256 **
1257 ** Revision 1.62 2007/06/29 14:17:49 meichel
1258 ** Code clean-up: Most member variables in module dcmdata are now private,
1259 ** not protected anymore.
1260 **
1261 ** Revision 1.61 2007/06/08 14:56:04 joergr
1262 ** Added new helper functions insertSequenceItem(), findAndDeleteSequenceItem().
1263 ** Replaced helper function findAndCopyElement() by new optional parameter
1264 ** 'createCopy' in various findAndGetXXX() functions.
1265 **
1266 ** Revision 1.60 2007/03/09 10:38:13 joergr
1267 ** Added support for missing VRs (SL, SS, UL, SS) to insertEmptyElement().
1268 **
1269 ** Revision 1.59 2007/02/19 15:04:34 meichel
1270 ** Removed searchErrors() methods that are not used anywhere and added
1271 ** error() methods only in the DcmObject subclasses where really used.
1272 **
1273 ** Revision 1.58 2006/12/15 14:18:07 joergr
1274 ** Added new method that checks whether a DICOM object or element is affected
1275 ** by SpecificCharacterSet (0008,0005).
1276 **
1277 ** Revision 1.57 2006/12/13 13:58:14 joergr
1278 ** Added new optional parameter "checkAllStrings" to method containsExtended
1279 ** Characters().
1280 **
1281 ** Revision 1.56 2006/08/15 15:49:56 meichel
1282 ** Updated all code in module dcmdata to correctly compile when
1283 ** all standard C++ classes remain in namespace std.
1284 **
1285 ** Revision 1.55 2006/05/30 15:01:52 joergr
1286 ** Modified comment of method containsExtendedCharacters().
1287 **
1288 ** Revision 1.54 2006/05/11 08:54:00 joergr
1289 ** Moved checkForNonASCIICharacters() from application to library.
1290 **
1291 ** Revision 1.53 2005/12/08 16:28:19 meichel
1292 ** Changed include path schema for all DCMTK header files
1293 **
1294 ** Revision 1.52 2005/11/15 18:28:02 meichel
1295 ** Added new global flag dcmEnableUnknownVRConversion that enables the automatic
1296 ** re-conversion of defined length UN elements read in an explicit VR transfer
1297 ** syntax, if the real VR is defined in the data dictionary. Default is OFFalse,
1298 ** i.e. to retain the previous behavior.
1299 **
1300 ** Revision 1.51 2005/06/24 10:03:14 joergr
1301 ** Added support for internal VR "xs" to putAndInsertXXX() helper methods.
1302 **
1303 ** Revision 1.50 2004/07/01 12:28:25 meichel
1304 ** Introduced virtual clone method for DcmObject and derived classes.
1305 **
1306 ** Revision 1.49 2004/02/04 16:02:08 joergr
1307 ** Removed pointer declaration from parameter "resultStack" in method
1308 ** findAndGetElements().
1309 **
1310 ** Revision 1.48 2003/10/08 10:24:40 joergr
1311 ** Added support for AT, OB, OF, OW, SL, SS, UL, US to putAndInsertString().
1312 **
1313 ** Revision 1.47 2003/07/16 14:34:05 joergr
1314 ** Added new function findAndGetSequence().
1315 **
1316 ** Revision 1.46 2003/06/26 09:17:25 onken
1317 ** Added commandline-application dcmodify.
1318 **
1319 ** Revision 1.45 2003/06/12 13:33:46 joergr
1320 ** Fixed inconsistent API documentation reported by Doxygen.
1321 **
1322 ** Revision 1.44 2003/06/02 17:16:23 joergr
1323 ** Added new helper function DcmItem::findAndCopyElement().
1324 **
1325 ** Revision 1.43 2003/06/02 16:58:12 meichel
1326 ** Renamed local variables to avoid name clashes with STL
1327 **
1328 ** Revision 1.42 2003/05/20 09:01:58 joergr
1329 ** Added new helper methods: findAndGetElement(), findAndGetUint32Array(),
1330 ** FindAndGetSint32Array(), findAndGetFloat64Array(), findAndDeleteElement().
1331 ** Enhanced findAndGetSequenceItem() and findOrCreateSequenceItem() by checking
1332 ** the return value of ident() - avoids crashes when applied to non-sequence
1333 ** elements.
1334 **
1335 ** Revision 1.41 2002/12/09 09:31:15 wilkens
1336 ** Modified/Added doc++ documentation.
1337 **
1338 ** Revision 1.40 2002/12/06 12:49:10 joergr
1339 ** Enhanced "print()" function by re-working the implementation and replacing
1340 ** the boolean "showFullData" parameter by a more general integer flag.
1341 ** Added doc++ documentation.
1342 ** Made source code formatting more consistent with other modules/files.
1343 **
1344 ** Revision 1.39 2002/08/27 16:55:34 meichel
1345 ** Initial release of new DICOM I/O stream classes that add support for stream
1346 ** compression (deflated little endian explicit VR transfer syntax)
1347 **
1348 ** Revision 1.38 2002/08/02 08:42:44 joergr
1349 ** Added optional 'pos' parameter to the putAndInsertXXX() methods.
1350 **
1351 ** Revision 1.37 2002/07/23 14:21:26 meichel
1352 ** Added support for private tag data dictionaries to dcmdata
1353 **
1354 ** Revision 1.36 2002/06/26 15:47:40 joergr
1355 ** Added support for polymorp OB/OW value representation (e.g. pixel data) to
1356 ** putAndInsertUint8/16Array() methods.
1357 **
1358 ** Revision 1.35 2002/05/17 09:58:14 meichel
1359 ** fixed bug in DcmItem which caused the parser to fail if the same attribute
1360 ** tag appeared twice within one dataset (which is illegal in DICOM anyway).
1361 ** Added console warning if the attributes read are not in ascending order.
1362 **
1363 ** Revision 1.34 2002/04/25 10:06:46 joergr
1364 ** Added support for XML output of DICOM objects.
1365 **
1366 ** Revision 1.33 2001/12/18 11:37:24 joergr
1367 ** Added helper method allowing to create and insert empty elements into an
1368 ** item/dataset.
1369 **
1370 ** Revision 1.32 2001/11/16 15:54:38 meichel
1371 ** Adapted digital signature code to final text of supplement 41.
1372 **
1373 ** Revision 1.31 2001/11/09 15:51:59 joergr
1374 ** Added new helper routines for managing sequences and items.
1375 **
1376 ** Revision 1.30 2001/10/10 15:14:04 joergr
1377 ** Changed parameter DcmTagKey to DcmTag in DcmItem::putAndInsert... methods
1378 ** to support elements which are not in the data dictionary (e.g. private
1379 ** extensions).
1380 **
1381 ** Revision 1.29 2001/10/02 11:46:45 joergr
1382 ** Added functions to get/put 8 bit values/arrays from/to an item/dataset.
1383 **
1384 ** Revision 1.28 2001/10/01 15:01:14 joergr
1385 ** Introduced new general purpose functions to get/put DICOM element values
1386 ** from/to an item/dataset - removed some old and rarely used functions.
1387 **
1388 ** Revision 1.27 2001/09/25 17:19:26 meichel
1389 ** Adapted dcmdata to class OFCondition
1390 **
1391 ** Revision 1.26 2001/06/01 15:48:40 meichel
1392 ** Updated copyright header
1393 **
1394 ** Revision 1.25 2000/11/07 16:56:06 meichel
1395 ** Initial release of dcmsign module for DICOM Digital Signatures
1396 **
1397 ** Revision 1.24 2000/04/14 15:31:32 meichel
1398 ** Removed default value from output stream passed to print() method.
1399 ** Required for use in multi-thread environments.
1400 **
1401 ** Revision 1.23 2000/03/08 16:26:15 meichel
1402 ** Updated copyright header.
1403 **
1404 ** Revision 1.22 2000/03/03 14:05:24 meichel
1405 ** Implemented library support for redirecting error messages into memory
1406 ** instead of printing them to stdout/stderr for GUI applications.
1407 **
1408 ** Revision 1.21 2000/02/10 10:50:51 joergr
1409 ** Added new feature to dcmdump (enhanced print method of dcmdata): write
1410 ** pixel data/item value fields to raw files.
1411 **
1412 ** Revision 1.20 1999/03/31 09:24:40 meichel
1413 ** Updated copyright header in module dcmdata
1414 **
1415 ** Revision 1.19 1998/07/15 15:48:48 joergr
1416 ** Removed several compiler warnings reported by gcc 2.8.1 with
1417 ** additional options, e.g. missing copy constructors and assignment
1418 ** operators, initialization of member variables in the body of a
1419 ** constructor instead of the member initialization list, hiding of
1420 ** methods by use of identical names, uninitialized member variables,
1421 ** missing const declaration of char pointers. Replaced tabs by spaces.
1422 **
1423 ** Revision 1.18 1997/09/22 14:50:43 hewett
1424 ** - Added 2 simple methods to test for the existance of an attribute
1425 ** to DcmItem class (tagExists and tagExistsWithValue). This code
1426 ** was part of dcmgpdir.cc but is more generally useful.
1427 ** - Added 2 methods to find an attribute and retrieve numeric values
1428 ** to DcmItem class (findIntegerNumber and findRealNumber). The old
1429 ** method findLong is now marked as obsolete and reimplemented using
1430 ** findIntegerNumber.
1431 **
1432 ** Revision 1.17 1997/09/11 15:13:11 hewett
1433 ** Modified getOFString method arguments by removing a default value
1434 ** for the pos argument. By requiring the pos argument to be provided
1435 ** ensures that callers realise getOFString only gets one component of
1436 ** a multi-valued string.
1437 **
1438 ** Revision 1.16 1997/08/29 08:32:39 andreas
1439 ** - Added methods getOFString and getOFStringArray for all
1440 ** string VRs. These methods are able to normalise the value, i. e.
1441 ** to remove leading and trailing spaces. This will be done only if
1442 ** it is described in the standard that these spaces are not relevant.
1443 ** These methods do not test the strings for conformance, this means
1444 ** especially that they do not delete spaces where they are not allowed!
1445 ** getOFStringArray returns the string with all its parts separated by \
1446 ** and getOFString returns only one value of the string.
1447 ** CAUTION: Currently getString returns a string with trailing
1448 ** spaces removed (if dcmEnableAutomaticInputDataCorrection == OFTrue) and
1449 ** truncates the original string (since it is not copied!). If you rely on this
1450 ** behaviour please change your application now.
1451 ** Future changes will ensure that getString returns the original
1452 ** string from the DICOM object (NULL terminated) inclusive padding.
1453 ** Currently, if you call getOF... before calling getString without
1454 ** normalisation, you can get the original string read from the DICOM object.
1455 **
1456 ** Revision 1.15 1997/07/21 08:25:08 andreas
1457 ** - Replace all boolean types (BOOLEAN, CTNBOOLEAN, DICOM_BOOL, BOOL)
1458 ** with one unique boolean type OFBool.
1459 **
1460 ** Revision 1.14 1997/07/07 07:42:03 andreas
1461 ** - Changed parameter type DcmTag & to DcmTagKey & in all search functions
1462 ** in DcmItem, DcmSequenceOfItems, DcmDirectoryRecord and DcmObject
1463 **
1464 ** Revision 1.13 1997/05/30 06:45:42 andreas
1465 ** - fixed problem of inconsistent interfaces and implementation that the
1466 ** syntax check of GNU C++ does not find.
1467 **
1468 ** Revision 1.12 1997/05/27 13:48:28 andreas
1469 ** - Add method canWriteXfer to class DcmObject and all derived classes.
1470 ** This method checks whether it is possible to convert the original
1471 ** transfer syntax to an new transfer syntax. The check is used in the
1472 ** dcmconv utility to prohibit the change of a compressed transfer
1473 ** syntax to a uncompressed.
1474 **
1475 ** Revision 1.11 1997/05/16 08:13:43 andreas
1476 ** - Revised handling of GroupLength elements and support of
1477 ** DataSetTrailingPadding elements. The enumeratio E_GrpLenEncoding
1478 ** got additional enumeration values (for a description see dctypes.h).
1479 ** addGroupLength and removeGroupLength methods are replaced by
1480 ** computeGroupLengthAndPadding. To support Padding, the parameters of
1481 ** element and sequence write functions changed.
1482 ** - Added a new method calcElementLength to calculate the length of an
1483 ** element, item or sequence. For elements it returns the length of
1484 ** tag, length field, vr field, and value length, for item and
1485 ** sequences it returns the length of the whole item. sequence including
1486 ** the Delimitation tag (if appropriate). It can never return
1487 ** UndefinedLength.
1488 ** - Deleted obsolete method DcmItem::calcHeaderLength because the
1489 ** samce functionality is performed by DcmXfer::sizeofTagHeader
1490 **
1491 ** Revision 1.10 1996/08/05 08:45:23 andreas
1492 ** new print routine with additional parameters:
1493 ** - print into files
1494 ** - fix output length for elements
1495 ** corrected error in search routine with parameter ESM_fromStackTop
1496 **
1497 ** Revision 1.9 1996/07/17 12:38:58 andreas
1498 ** new nextObject to iterate a DicomDataset, DicomFileFormat, Item, ...
1499 **
1500 ** Revision 1.8 1996/04/29 15:08:53 hewett
1501 ** Replaced DcmItem::findInt(...) with the more general DcmItem::findLong(...).
1502 **
1503 ** Revision 1.7 1996/04/16 16:00:05 andreas
1504 ** - added const for Tag in newDicomElement
1505 **
1506 ** Revision 1.6 1996/03/28 18:52:30 hewett
1507 ** Added 2 simple find&get methods (findString & findInt).
1508 **
1509 ** Revision 1.5 1996/01/29 13:38:12 andreas
1510 ** - new put method for every VR to put value as a string
1511 ** - better and unique print methods
1512 **
1513 ** Revision 1.4 1996/01/09 11:06:15 andreas
1514 ** New Support for Visual C++
1515 ** Correct problems with inconsistent const declarations
1516 **
1517 ** Revision 1.3 1996/01/05 13:22:56 andreas
1518 ** - changed to support new streaming facilities
1519 ** - more cleanups
1520 ** - merged read / write methods for block and file transfer
1521 **
1522 */


Generated on Thu Dec 20 2012 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.2