1 /* 2 * 3 * Copyright (C) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany 4 * Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany 5 * All rights reserved. See COPYRIGHT file for details. 6 * 7 * Header file for class DRTIconImageSequence 8 * 9 * Generated automatically from DICOM PS 3.3-2017e 10 * File created on 2017-12-05 09:30:54 11 * 12 */ 13 14 15 #ifndef DRTIIS_H 16 #define DRTIIS_H 17 18 #include "dcmtk/config/osconfig.h" // make sure OS specific configuration is included first 19 20 #include "dcmtk/ofstd/oflist.h" // for standard list class 21 #include "dcmtk/dcmrt/drttypes.h" // module-specific helper class 22 23 24 /** Interface class for IconImageSequence (0088,0200) 25 */ 26 class DCMTK_DCMRT_EXPORT DRTIconImageSequence 27 : protected DRTTypes 28 { 29 30 public: 31 32 /** Item class 33 */ 34 class DCMTK_DCMRT_EXPORT Item 35 : protected DRTTypes 36 { 37 38 public: 39 40 // --- constructors, destructor and operators --- 41 42 /** (default) constructor 43 * @param emptyDefaultItem flag used to mark the empty default item 44 */ 45 Item(const OFBool emptyDefaultItem = OFFalse); 46 47 /** copy constructor 48 * @param copy item object to be copied 49 */ 50 Item(const Item ©); 51 52 /** destructor 53 */ 54 virtual ~Item(); 55 56 /** assigment operator 57 * @param copy item object to be copied 58 * @return reference to this object 59 */ 60 Item &operator=(const Item ©); 61 62 // --- general methods --- 63 64 /** clear all internal member variables 65 */ 66 void clear(); 67 68 /** check if item is empty 69 * @return OFTrue if item is empty, OFFalse otherwise 70 */ 71 OFBool isEmpty(); 72 73 /** check if item is valid, i.e.\ not the empty default item 74 * @return OFTrue if item is valid, OFFalse otherwise 75 */ 76 OFBool isValid() const; 77 78 // --- input/output methods --- 79 80 /** read elements from sequence item 81 * @param item reference to DICOM sequence item from which the elements should be read 82 * @return status, EC_Normal if successful, an error code otherwise 83 */ 84 OFCondition read(DcmItem &item); 85 86 /** write elements to sequence item 87 * @param item reference to DICOM sequence item to which the elements should be written 88 * @return status, EC_Normal if successful, an error code otherwise 89 */ 90 OFCondition write(DcmItem &item); 91 92 // --- get DICOM attribute values --- 93 94 /** get BitsAllocated (0028,0100) 95 * @param value reference to variable in which the value should be stored 96 * @param pos index of the value to get (0..vm-1) 97 * @return status, EC_Normal if successful, an error code otherwise 98 */ 99 OFCondition getBitsAllocated(Uint16 &value, const unsigned long pos = 0) const; 100 101 /** get BitsStored (0028,0101) 102 * @param value reference to variable in which the value should be stored 103 * @param pos index of the value to get (0..vm-1) 104 * @return status, EC_Normal if successful, an error code otherwise 105 */ 106 OFCondition getBitsStored(Uint16 &value, const unsigned long pos = 0) const; 107 108 /** get BluePaletteColorLookupTableData (0028,1203) 109 * @param value reference to variable in which the value should be stored 110 * @param count stores number of items in the result array (if not NULL) 111 * @return status, EC_Normal if successful, an error code otherwise 112 */ 113 OFCondition getBluePaletteColorLookupTableData(Uint16 *&value, unsigned long *count = NULL) const; 114 115 /** get BluePaletteColorLookupTableDescriptor (0028,1103) 116 * @param value reference to variable in which the value should be stored 117 * @param pos index of the value to get (0..vm-1) 118 * @return status, EC_Normal if successful, an error code otherwise 119 */ 120 OFCondition getBluePaletteColorLookupTableDescriptor(Uint16 &value, const unsigned long pos = 0) const; 121 122 /** get ColorSpace (0028,2002) 123 * @param value reference to variable in which the value should be stored 124 * @param pos index of the value to get (0..vm-1), -1 for all components 125 * @return status, EC_Normal if successful, an error code otherwise 126 */ 127 OFCondition getColorSpace(OFString &value, const signed long pos = 0) const; 128 129 /** get Columns (0028,0011) 130 * @param value reference to variable in which the value should be stored 131 * @param pos index of the value to get (0..vm-1) 132 * @return status, EC_Normal if successful, an error code otherwise 133 */ 134 OFCondition getColumns(Uint16 &value, const unsigned long pos = 0) const; 135 136 /** get GreenPaletteColorLookupTableData (0028,1202) 137 * @param value reference to variable in which the value should be stored 138 * @param count stores number of items in the result array (if not NULL) 139 * @return status, EC_Normal if successful, an error code otherwise 140 */ 141 OFCondition getGreenPaletteColorLookupTableData(Uint16 *&value, unsigned long *count = NULL) const; 142 143 /** get GreenPaletteColorLookupTableDescriptor (0028,1102) 144 * @param value reference to variable in which the value should be stored 145 * @param pos index of the value to get (0..vm-1) 146 * @return status, EC_Normal if successful, an error code otherwise 147 */ 148 OFCondition getGreenPaletteColorLookupTableDescriptor(Uint16 &value, const unsigned long pos = 0) const; 149 150 /** get HighBit (0028,0102) 151 * @param value reference to variable in which the value should be stored 152 * @param pos index of the value to get (0..vm-1) 153 * @return status, EC_Normal if successful, an error code otherwise 154 */ 155 OFCondition getHighBit(Uint16 &value, const unsigned long pos = 0) const; 156 157 /** get ICCProfile (0028,2000) 158 * @param value reference to variable in which the value should be stored 159 * @param count stores number of items in the result array (if not NULL) 160 * @return status, EC_Normal if successful, an error code otherwise 161 */ 162 OFCondition getICCProfile(Uint8 *&value, unsigned long *count = NULL) const; 163 164 /** get LargestImagePixelValue (0028,0107) 165 * @param value reference to variable in which the value should be stored 166 * @param pos index of the value to get (0..vm-1) 167 * @return status, EC_Normal if successful, an error code otherwise 168 */ 169 OFCondition getLargestImagePixelValue(Uint16 &value, const unsigned long pos = 0) const; 170 171 /** get PhotometricInterpretation (0028,0004) 172 * @param value reference to variable in which the value should be stored 173 * @param pos index of the value to get (0..vm-1), -1 for all components 174 * @return status, EC_Normal if successful, an error code otherwise 175 */ 176 OFCondition getPhotometricInterpretation(OFString &value, const signed long pos = 0) const; 177 178 /** get PixelAspectRatio (0028,0034) 179 * @param value reference to variable in which the value should be stored 180 * @param pos index of the value to get (0..vm-1), -1 for all components 181 * @return status, EC_Normal if successful, an error code otherwise 182 */ 183 OFCondition getPixelAspectRatio(OFString &value, const signed long pos = 0) const; 184 185 /** get PixelAspectRatio (0028,0034) 186 * @param value reference to variable in which the value should be stored 187 * @param pos index of the value to get (0..vm-1) 188 * @return status, EC_Normal if successful, an error code otherwise 189 */ 190 OFCondition getPixelAspectRatio(Sint32 &value, const unsigned long pos = 0) const; 191 192 /** get PixelRepresentation (0028,0103) 193 * @param value reference to variable in which the value should be stored 194 * @param pos index of the value to get (0..vm-1) 195 * @return status, EC_Normal if successful, an error code otherwise 196 */ 197 OFCondition getPixelRepresentation(Uint16 &value, const unsigned long pos = 0) const; 198 199 /** get PlanarConfiguration (0028,0006) 200 * @param value reference to variable in which the value should be stored 201 * @param pos index of the value to get (0..vm-1) 202 * @return status, EC_Normal if successful, an error code otherwise 203 */ 204 OFCondition getPlanarConfiguration(Uint16 &value, const unsigned long pos = 0) const; 205 206 /** get RedPaletteColorLookupTableData (0028,1201) 207 * @param value reference to variable in which the value should be stored 208 * @param count stores number of items in the result array (if not NULL) 209 * @return status, EC_Normal if successful, an error code otherwise 210 */ 211 OFCondition getRedPaletteColorLookupTableData(Uint16 *&value, unsigned long *count = NULL) const; 212 213 /** get RedPaletteColorLookupTableDescriptor (0028,1101) 214 * @param value reference to variable in which the value should be stored 215 * @param pos index of the value to get (0..vm-1) 216 * @return status, EC_Normal if successful, an error code otherwise 217 */ 218 OFCondition getRedPaletteColorLookupTableDescriptor(Uint16 &value, const unsigned long pos = 0) const; 219 220 /** get Rows (0028,0010) 221 * @param value reference to variable in which the value should be stored 222 * @param pos index of the value to get (0..vm-1) 223 * @return status, EC_Normal if successful, an error code otherwise 224 */ 225 OFCondition getRows(Uint16 &value, const unsigned long pos = 0) const; 226 227 /** get SamplesPerPixel (0028,0002) 228 * @param value reference to variable in which the value should be stored 229 * @param pos index of the value to get (0..vm-1) 230 * @return status, EC_Normal if successful, an error code otherwise 231 */ 232 OFCondition getSamplesPerPixel(Uint16 &value, const unsigned long pos = 0) const; 233 234 /** get SmallestImagePixelValue (0028,0106) 235 * @param value reference to variable in which the value should be stored 236 * @param pos index of the value to get (0..vm-1) 237 * @return status, EC_Normal if successful, an error code otherwise 238 */ 239 OFCondition getSmallestImagePixelValue(Uint16 &value, const unsigned long pos = 0) const; 240 241 // --- get pixel data element --- 242 243 /** get PixelData (7fe0,0010) 244 * @return reference to pixel data element 245 */ getPixelData()246 DcmPixelData &getPixelData() 247 { return PixelData; } 248 249 /** get PixelData (7fe0,0010) 250 * @return const reference to pixel data element 251 */ getPixelData()252 const DcmPixelData &getPixelData() const 253 { return PixelData; } 254 255 // --- set DICOM attribute values --- 256 257 /** set BitsAllocated (0028,0100) 258 * @param value value to be set (should be valid for this VR) 259 * @param pos index of the value to be set (0..vm-1), vm=1 260 * @return status, EC_Normal if successful, an error code otherwise 261 */ 262 OFCondition setBitsAllocated(const Uint16 value, const unsigned long pos = 0); 263 264 /** set BitsStored (0028,0101) 265 * @param value value to be set (should be valid for this VR) 266 * @param pos index of the value to be set (0..vm-1), vm=1 267 * @return status, EC_Normal if successful, an error code otherwise 268 */ 269 OFCondition setBitsStored(const Uint16 value, const unsigned long pos = 0); 270 271 /** set BluePaletteColorLookupTableData (0028,1203) 272 * @param value array value to be set (data is copied) 273 * @param count number of items in the array 274 * @return status, EC_Normal if successful, an error code otherwise 275 */ 276 OFCondition setBluePaletteColorLookupTableData(const Uint16 *value, const unsigned long count); 277 278 /** set BluePaletteColorLookupTableDescriptor (0028,1103) 279 * @param value value to be set (should be valid for this VR) 280 * @param pos index of the value to be set (0..vm-1), vm=3 281 * @return status, EC_Normal if successful, an error code otherwise 282 */ 283 OFCondition setBluePaletteColorLookupTableDescriptor(const Uint16 value, const unsigned long pos = 0); 284 285 /** set ColorSpace (0028,2002) 286 * @param value value to be set (single value only) or "" for no value 287 * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled 288 * @return status, EC_Normal if successful, an error code otherwise 289 */ 290 OFCondition setColorSpace(const OFString &value, const OFBool check = OFTrue); 291 292 /** set Columns (0028,0011) 293 * @param value value to be set (should be valid for this VR) 294 * @param pos index of the value to be set (0..vm-1), vm=1 295 * @return status, EC_Normal if successful, an error code otherwise 296 */ 297 OFCondition setColumns(const Uint16 value, const unsigned long pos = 0); 298 299 /** set GreenPaletteColorLookupTableData (0028,1202) 300 * @param value array value to be set (data is copied) 301 * @param count number of items in the array 302 * @return status, EC_Normal if successful, an error code otherwise 303 */ 304 OFCondition setGreenPaletteColorLookupTableData(const Uint16 *value, const unsigned long count); 305 306 /** set GreenPaletteColorLookupTableDescriptor (0028,1102) 307 * @param value value to be set (should be valid for this VR) 308 * @param pos index of the value to be set (0..vm-1), vm=3 309 * @return status, EC_Normal if successful, an error code otherwise 310 */ 311 OFCondition setGreenPaletteColorLookupTableDescriptor(const Uint16 value, const unsigned long pos = 0); 312 313 /** set HighBit (0028,0102) 314 * @param value value to be set (should be valid for this VR) 315 * @param pos index of the value to be set (0..vm-1), vm=1 316 * @return status, EC_Normal if successful, an error code otherwise 317 */ 318 OFCondition setHighBit(const Uint16 value, const unsigned long pos = 0); 319 320 /** set ICCProfile (0028,2000) 321 * @param value array value to be set (data is copied) 322 * @param count number of items in the array 323 * @return status, EC_Normal if successful, an error code otherwise 324 */ 325 OFCondition setICCProfile(const Uint8 *value, const unsigned long count); 326 327 /** set LargestImagePixelValue (0028,0107) 328 * @param value value to be set (should be valid for this VR) 329 * @param pos index of the value to be set (0..vm-1), vm=1 330 * @return status, EC_Normal if successful, an error code otherwise 331 */ 332 OFCondition setLargestImagePixelValue(const Uint16 value, const unsigned long pos = 0); 333 334 /** set PhotometricInterpretation (0028,0004) 335 * @param value value to be set (single value only) or "" for no value 336 * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled 337 * @return status, EC_Normal if successful, an error code otherwise 338 */ 339 OFCondition setPhotometricInterpretation(const OFString &value, const OFBool check = OFTrue); 340 341 /** set PixelAspectRatio (0028,0034) 342 * @param value value to be set (possibly multi-valued) or "" for no value 343 * @param check check 'value' for conformance with VR (IS) and VM (2) if enabled 344 * @return status, EC_Normal if successful, an error code otherwise 345 */ 346 OFCondition setPixelAspectRatio(const OFString &value, const OFBool check = OFTrue); 347 348 /** set PixelRepresentation (0028,0103) 349 * @param value value to be set (should be valid for this VR) 350 * @param pos index of the value to be set (0..vm-1), vm=1 351 * @return status, EC_Normal if successful, an error code otherwise 352 */ 353 OFCondition setPixelRepresentation(const Uint16 value, const unsigned long pos = 0); 354 355 /** set PlanarConfiguration (0028,0006) 356 * @param value value to be set (should be valid for this VR) 357 * @param pos index of the value to be set (0..vm-1), vm=1 358 * @return status, EC_Normal if successful, an error code otherwise 359 */ 360 OFCondition setPlanarConfiguration(const Uint16 value, const unsigned long pos = 0); 361 362 /** set RedPaletteColorLookupTableData (0028,1201) 363 * @param value array value to be set (data is copied) 364 * @param count number of items in the array 365 * @return status, EC_Normal if successful, an error code otherwise 366 */ 367 OFCondition setRedPaletteColorLookupTableData(const Uint16 *value, const unsigned long count); 368 369 /** set RedPaletteColorLookupTableDescriptor (0028,1101) 370 * @param value value to be set (should be valid for this VR) 371 * @param pos index of the value to be set (0..vm-1), vm=3 372 * @return status, EC_Normal if successful, an error code otherwise 373 */ 374 OFCondition setRedPaletteColorLookupTableDescriptor(const Uint16 value, const unsigned long pos = 0); 375 376 /** set Rows (0028,0010) 377 * @param value value to be set (should be valid for this VR) 378 * @param pos index of the value to be set (0..vm-1), vm=1 379 * @return status, EC_Normal if successful, an error code otherwise 380 */ 381 OFCondition setRows(const Uint16 value, const unsigned long pos = 0); 382 383 /** set SamplesPerPixel (0028,0002) 384 * @param value value to be set (should be valid for this VR) 385 * @param pos index of the value to be set (0..vm-1), vm=1 386 * @return status, EC_Normal if successful, an error code otherwise 387 */ 388 OFCondition setSamplesPerPixel(const Uint16 value, const unsigned long pos = 0); 389 390 /** set SmallestImagePixelValue (0028,0106) 391 * @param value value to be set (should be valid for this VR) 392 * @param pos index of the value to be set (0..vm-1), vm=1 393 * @return status, EC_Normal if successful, an error code otherwise 394 */ 395 OFCondition setSmallestImagePixelValue(const Uint16 value, const unsigned long pos = 0); 396 397 private: 398 399 /// internal flag used to mark the empty default item 400 /*const*/ OFBool EmptyDefaultItem; 401 402 /// BitsAllocated (0028,0100) vr=US, vm=1, type=1 403 DcmUnsignedShort BitsAllocated; 404 /// BitsStored (0028,0101) vr=US, vm=1, type=1 405 DcmUnsignedShort BitsStored; 406 /// BluePaletteColorLookupTableData (0028,1203) vr=OW, vm=1, type=1C 407 DcmOtherByteOtherWord BluePaletteColorLookupTableData; 408 /// BluePaletteColorLookupTableDescriptor (0028,1103) vr=US/SS, vm=3, type=1C 409 DcmUnsignedShort BluePaletteColorLookupTableDescriptor; 410 /// ColorSpace (0028,2002) vr=CS, vm=1, type=3 411 DcmCodeString ColorSpace; 412 /// Columns (0028,0011) vr=US, vm=1, type=1 413 DcmUnsignedShort Columns; 414 /// GreenPaletteColorLookupTableData (0028,1202) vr=OW, vm=1, type=1C 415 DcmOtherByteOtherWord GreenPaletteColorLookupTableData; 416 /// GreenPaletteColorLookupTableDescriptor (0028,1102) vr=US/SS, vm=3, type=1C 417 DcmUnsignedShort GreenPaletteColorLookupTableDescriptor; 418 /// HighBit (0028,0102) vr=US, vm=1, type=1 419 DcmUnsignedShort HighBit; 420 /// ICCProfile (0028,2000) vr=OB, vm=1, type=3 421 DcmOtherByteOtherWord ICCProfile; 422 /// LargestImagePixelValue (0028,0107) vr=US/SS, vm=1, type=3 423 DcmUnsignedShort LargestImagePixelValue; 424 /// PhotometricInterpretation (0028,0004) vr=CS, vm=1, type=1 425 DcmCodeString PhotometricInterpretation; 426 /// PixelAspectRatio (0028,0034) vr=IS, vm=2, type=1C 427 DcmIntegerString PixelAspectRatio; 428 /// PixelData (7fe0,0010) vr=OB/OW, vm=1, type=1 429 DcmPixelData PixelData; 430 /// PixelRepresentation (0028,0103) vr=US, vm=1, type=1 431 DcmUnsignedShort PixelRepresentation; 432 /// PlanarConfiguration (0028,0006) vr=US, vm=1, type=1C 433 DcmUnsignedShort PlanarConfiguration; 434 /// RedPaletteColorLookupTableData (0028,1201) vr=OW, vm=1, type=1C 435 DcmOtherByteOtherWord RedPaletteColorLookupTableData; 436 /// RedPaletteColorLookupTableDescriptor (0028,1101) vr=US/SS, vm=3, type=1C 437 DcmUnsignedShort RedPaletteColorLookupTableDescriptor; 438 /// Rows (0028,0010) vr=US, vm=1, type=1 439 DcmUnsignedShort Rows; 440 /// SamplesPerPixel (0028,0002) vr=US, vm=1, type=1 441 DcmUnsignedShort SamplesPerPixel; 442 /// SmallestImagePixelValue (0028,0106) vr=US/SS, vm=1, type=3 443 DcmUnsignedShort SmallestImagePixelValue; 444 445 }; 446 447 // --- constructors, destructor and operators --- 448 449 /** (default) constructor 450 * @param emptyDefaultSequence internal flag used to mark the empty default sequence 451 */ 452 DRTIconImageSequence(const OFBool emptyDefaultSequence = OFFalse); 453 454 /** copy constructor 455 * @param copy sequence object to be copied 456 */ 457 DRTIconImageSequence(const DRTIconImageSequence ©); 458 459 /** destructor 460 */ 461 virtual ~DRTIconImageSequence(); 462 463 /** assigment operator 464 * @param copy sequence object to be copied 465 * @return reference to this object 466 */ 467 DRTIconImageSequence &operator=(const DRTIconImageSequence ©); 468 469 // --- general methods --- 470 471 /** clear all internal member variables 472 */ 473 void clear(); 474 475 /** check if sequence is empty 476 * @return OFTrue if sequence is empty, OFFalse otherwise 477 */ 478 OFBool isEmpty(); 479 480 /** check if sequence is valid, i.e.\ not the empty default sequence 481 * @return OFTrue if sequence is valid, OFFalse otherwise 482 */ 483 OFBool isValid() const; 484 485 /** get number of items in the sequence 486 * @return number of items 487 */ 488 size_t getNumberOfItems() const; 489 490 /** goto first item in the sequence 491 * @return status, EC_Normal if successful, an error code otherwise 492 */ 493 OFCondition gotoFirstItem(); 494 495 /** goto next item in the sequence 496 * @return status, EC_Normal if successful, an error code otherwise 497 */ 498 OFCondition gotoNextItem(); 499 500 /** goto particular item in the sequence 501 * @param num number of the item to be selected (0..num-1) 502 * @return status, EC_Normal if successful, an error code otherwise 503 */ 504 OFCondition gotoItem(const size_t num); 505 506 /** get current item in the sequence 507 * @param item reference to item pointer (result variable) 508 * @return status, EC_Normal if successful, an error code otherwise 509 */ 510 OFCondition getCurrentItem(Item *&item) const; 511 512 /** get current item in the sequence 513 * @return reference to specified item if successful, empty default item otherwise 514 */ 515 Item &getCurrentItem(); 516 517 /** get current item in the sequence 518 * @return const reference to specified item if successful, empty default item otherwise 519 */ 520 const Item &getCurrentItem() const; 521 522 /** get particular item in the sequence 523 * @param num number of the item to be retrieved (0..num-1) 524 * @param item reference to item pointer (result variable) 525 * @return status, EC_Normal if successful, an error code otherwise 526 */ 527 OFCondition getItem(const size_t num, Item *&item); 528 529 /** get particular item in the sequence 530 * @param num number of the item to be retrieved (0..num-1) 531 * @return reference to specified item if successful, empty default item otherwise 532 */ 533 Item &getItem(const size_t num); 534 535 /** get particular item in the sequence 536 * @param num number of the item to be retrieved (0..num-1) 537 * @return const reference to specified item if successful, empty default item otherwise 538 */ 539 const Item &getItem(const size_t num) const; 540 541 /** get particular item in the sequence 542 * @param num number of the item to be retrieved (0..num-1) 543 * @return reference to specified item if successful, empty default item otherwise 544 */ 545 Item &operator[](const size_t num); 546 547 /** get particular item in the sequence 548 * @param num number of the item to be retrieved (0..num-1) 549 * @return const reference to specified item if successful, empty default item otherwise 550 */ 551 const Item &operator[](const size_t num) const; 552 553 /** add new item to the end of this sequence 554 * @param item reference to new item pointer (result variable) 555 * @return status, EC_Normal if successful, an error code otherwise 556 */ 557 OFCondition addItem(Item *&item); 558 559 /** insert new item into the sequence 560 * @param pos position where the new item is to be inserted (0..num) 561 * @param item reference to new item pointer (result variable) 562 * @return status, EC_Normal if successful, an error code otherwise 563 */ 564 OFCondition insertItem(const size_t pos, Item *&item); 565 566 /** remove particular item from the sequence 567 * @param pos position of the item to be removed (0..num-1) 568 * @return status, EC_Normal if successful, an error code otherwise 569 */ 570 OFCondition removeItem(const size_t pos); 571 572 // --- input/output methods --- 573 574 /** read sequence of items from dataset 575 * @param dataset reference to DICOM dataset from which the sequence should be read 576 * @param card cardinality (valid range for number of items) 577 * @param type value type (valid value: "1", "1C", "2" or something else which is not checked) 578 * @param moduleName optional module/sequence name to be printed (default: "RT object" if NULL) 579 * @return status, EC_Normal if successful, an error code otherwise 580 */ 581 OFCondition read(DcmItem &dataset, 582 const OFString &card, 583 const OFString &type, 584 const char *moduleName = NULL); 585 586 /** write sequence of items to dataset 587 * @param dataset reference to DICOM dataset to which the sequence should be written 588 * @param card cardinality (valid range for number of items) 589 * @param type value type (valid value: "1", "2" or something else which is not checked) 590 * @param moduleName optional module/sequence name to be printed (default: "RT object" if NULL) 591 * @return status, EC_Normal if successful, an error code otherwise 592 */ 593 OFCondition write(DcmItem &dataset, 594 const OFString &card, 595 const OFString &type, 596 const char *moduleName = NULL); 597 598 protected: 599 600 /** goto particular item in the sequence 601 * @param num number of the item to be selected (0..num-1) 602 * @param iterator list iterator storing the position of the item 603 * @return status, EC_Normal if successful, an error code otherwise 604 */ 605 OFCondition gotoItem(const size_t num, 606 OFListIterator(Item *) &iterator); 607 608 /** goto particular item in the sequence 609 * @param num number of the item to be selected (0..num-1) 610 * @param iterator list iterator storing the position of the item 611 * @return status, EC_Normal if successful, an error code otherwise 612 */ 613 OFCondition gotoItem(const size_t num, 614 OFListConstIterator(Item *) &iterator) const; 615 616 private: 617 618 /// internal flag used to mark the empty default sequence 619 /*const*/ OFBool EmptyDefaultSequence; 620 621 /// list of items in this sequence 622 OFList<Item *> SequenceOfItems; 623 /// currently selected item 624 OFListIterator(Item *) CurrentItem; 625 /// empty default item 626 Item EmptyItem; 627 628 }; 629 630 631 #endif 632