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 DRTIonRangeCompensatorSequence 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 DRTIRCS_H 16 #define DRTIRCS_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 IonRangeCompensatorSequence (300a,02ea) 25 */ 26 class DCMTK_DCMRT_EXPORT DRTIonRangeCompensatorSequence 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 AccessoryCode (300a,00f9) 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), -1 for all components 97 * @return status, EC_Normal if successful, an error code otherwise 98 */ 99 OFCondition getAccessoryCode(OFString &value, const signed long pos = 0) const; 100 101 /** get CompensatorColumnOffset (300a,02e5) 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 getCompensatorColumnOffset(Float32 &value, const unsigned long pos = 0) const; 107 108 /** get CompensatorColumns (300a,00e8) 109 * @param value reference to variable in which the value should be stored 110 * @param pos index of the value to get (0..vm-1), -1 for all components 111 * @return status, EC_Normal if successful, an error code otherwise 112 */ 113 OFCondition getCompensatorColumns(OFString &value, const signed long pos = 0) const; 114 115 /** get CompensatorColumns (300a,00e8) 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 getCompensatorColumns(Sint32 &value, const unsigned long pos = 0) const; 121 122 /** get CompensatorDescription (300a,02eb) 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 getCompensatorDescription(OFString &value, const signed long pos = 0) const; 128 129 /** get CompensatorDivergence (300a,02e0) 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), -1 for all components 132 * @return status, EC_Normal if successful, an error code otherwise 133 */ 134 OFCondition getCompensatorDivergence(OFString &value, const signed long pos = 0) const; 135 136 /** get CompensatorID (300a,00e5) 137 * @param value reference to variable in which the value should be stored 138 * @param pos index of the value to get (0..vm-1), -1 for all components 139 * @return status, EC_Normal if successful, an error code otherwise 140 */ 141 OFCondition getCompensatorID(OFString &value, const signed long pos = 0) const; 142 143 /** get CompensatorMillingToolDiameter (300a,02e8) 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 getCompensatorMillingToolDiameter(Float32 &value, const unsigned long pos = 0) const; 149 150 /** get CompensatorMountingPosition (300a,02e1) 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), -1 for all components 153 * @return status, EC_Normal if successful, an error code otherwise 154 */ 155 OFCondition getCompensatorMountingPosition(OFString &value, const signed long pos = 0) const; 156 157 /** get CompensatorNumber (300a,00e4) 158 * @param value reference to variable in which the value should be stored 159 * @param pos index of the value to get (0..vm-1), -1 for all components 160 * @return status, EC_Normal if successful, an error code otherwise 161 */ 162 OFCondition getCompensatorNumber(OFString &value, const signed long pos = 0) const; 163 164 /** get CompensatorNumber (300a,00e4) 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 getCompensatorNumber(Sint32 &value, const unsigned long pos = 0) const; 170 171 /** get CompensatorPixelSpacing (300a,00e9) 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 getCompensatorPixelSpacing(OFString &value, const signed long pos = 0) const; 177 178 /** get CompensatorPixelSpacing (300a,00e9) 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) 181 * @return status, EC_Normal if successful, an error code otherwise 182 */ 183 OFCondition getCompensatorPixelSpacing(Float64 &value, const unsigned long pos = 0) const; 184 185 /** get CompensatorPixelSpacing (300a,00e9) 186 * @param value reference to variable in which the value(s) should be stored 187 * @return status, EC_Normal if successful, an error code otherwise 188 */ 189 OFCondition getCompensatorPixelSpacing(OFVector<Float64> &value) const; 190 191 /** get CompensatorPosition (300a,00ea) 192 * @param value reference to variable in which the value should be stored 193 * @param pos index of the value to get (0..vm-1), -1 for all components 194 * @return status, EC_Normal if successful, an error code otherwise 195 */ 196 OFCondition getCompensatorPosition(OFString &value, const signed long pos = 0) const; 197 198 /** get CompensatorPosition (300a,00ea) 199 * @param value reference to variable in which the value should be stored 200 * @param pos index of the value to get (0..vm-1) 201 * @return status, EC_Normal if successful, an error code otherwise 202 */ 203 OFCondition getCompensatorPosition(Float64 &value, const unsigned long pos = 0) const; 204 205 /** get CompensatorPosition (300a,00ea) 206 * @param value reference to variable in which the value(s) should be stored 207 * @return status, EC_Normal if successful, an error code otherwise 208 */ 209 OFCondition getCompensatorPosition(OFVector<Float64> &value) const; 210 211 /** get CompensatorRelativeStoppingPowerRatio (300a,02e7) 212 * @param value reference to variable in which the value should be stored 213 * @param pos index of the value to get (0..vm-1) 214 * @return status, EC_Normal if successful, an error code otherwise 215 */ 216 OFCondition getCompensatorRelativeStoppingPowerRatio(Float32 &value, const unsigned long pos = 0) const; 217 218 /** get CompensatorRows (300a,00e7) 219 * @param value reference to variable in which the value should be stored 220 * @param pos index of the value to get (0..vm-1), -1 for all components 221 * @return status, EC_Normal if successful, an error code otherwise 222 */ 223 OFCondition getCompensatorRows(OFString &value, const signed long pos = 0) const; 224 225 /** get CompensatorRows (300a,00e7) 226 * @param value reference to variable in which the value should be stored 227 * @param pos index of the value to get (0..vm-1) 228 * @return status, EC_Normal if successful, an error code otherwise 229 */ 230 OFCondition getCompensatorRows(Sint32 &value, const unsigned long pos = 0) const; 231 232 /** get CompensatorThicknessData (300a,00ec) 233 * @param value reference to variable in which the value should be stored 234 * @param pos index of the value to get (0..vm-1), -1 for all components 235 * @return status, EC_Normal if successful, an error code otherwise 236 */ 237 OFCondition getCompensatorThicknessData(OFString &value, const signed long pos = 0) const; 238 239 /** get CompensatorThicknessData (300a,00ec) 240 * @param value reference to variable in which the value should be stored 241 * @param pos index of the value to get (0..vm-1) 242 * @return status, EC_Normal if successful, an error code otherwise 243 */ 244 OFCondition getCompensatorThicknessData(Float64 &value, const unsigned long pos = 0) const; 245 246 /** get CompensatorThicknessData (300a,00ec) 247 * @param value reference to variable in which the value(s) should be stored 248 * @return status, EC_Normal if successful, an error code otherwise 249 */ 250 OFCondition getCompensatorThicknessData(OFVector<Float64> &value) const; 251 252 /** get IsocenterToCompensatorDistances (300a,02e6) 253 * @param value reference to variable in which the value should be stored 254 * @param pos index of the value to get (0..vm-1) 255 * @return status, EC_Normal if successful, an error code otherwise 256 */ 257 OFCondition getIsocenterToCompensatorDistances(Float32 &value, const unsigned long pos = 0) const; 258 259 /** get IsocenterToCompensatorTrayDistance (300a,02e4) 260 * @param value reference to variable in which the value should be stored 261 * @param pos index of the value to get (0..vm-1) 262 * @return status, EC_Normal if successful, an error code otherwise 263 */ 264 OFCondition getIsocenterToCompensatorTrayDistance(Float32 &value, const unsigned long pos = 0) const; 265 266 /** get MaterialID (300a,00e1) 267 * @param value reference to variable in which the value should be stored 268 * @param pos index of the value to get (0..vm-1), -1 for all components 269 * @return status, EC_Normal if successful, an error code otherwise 270 */ 271 OFCondition getMaterialID(OFString &value, const signed long pos = 0) const; 272 273 // --- set DICOM attribute values --- 274 275 /** set AccessoryCode (300a,00f9) 276 * @param value value to be set (single value only) or "" for no value 277 * @param check check 'value' for conformance with VR (LO) and VM (1) if enabled 278 * @return status, EC_Normal if successful, an error code otherwise 279 */ 280 OFCondition setAccessoryCode(const OFString &value, const OFBool check = OFTrue); 281 282 /** set CompensatorColumnOffset (300a,02e5) 283 * @param value value to be set (should be valid for this VR) 284 * @param pos index of the value to be set (0..vm-1), vm=1 285 * @return status, EC_Normal if successful, an error code otherwise 286 */ 287 OFCondition setCompensatorColumnOffset(const Float32 value, const unsigned long pos = 0); 288 289 /** set CompensatorColumns (300a,00e8) 290 * @param value value to be set (single value only) or "" for no value 291 * @param check check 'value' for conformance with VR (IS) and VM (1) if enabled 292 * @return status, EC_Normal if successful, an error code otherwise 293 */ 294 OFCondition setCompensatorColumns(const OFString &value, const OFBool check = OFTrue); 295 296 /** set CompensatorDescription (300a,02eb) 297 * @param value value to be set (single value only) or "" for no value 298 * @param check check 'value' for conformance with VR (LT) and VM (1) if enabled 299 * @return status, EC_Normal if successful, an error code otherwise 300 */ 301 OFCondition setCompensatorDescription(const OFString &value, const OFBool check = OFTrue); 302 303 /** set CompensatorDivergence (300a,02e0) 304 * @param value value to be set (single value only) or "" for no value 305 * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled 306 * @return status, EC_Normal if successful, an error code otherwise 307 */ 308 OFCondition setCompensatorDivergence(const OFString &value, const OFBool check = OFTrue); 309 310 /** set CompensatorID (300a,00e5) 311 * @param value value to be set (single value only) or "" for no value 312 * @param check check 'value' for conformance with VR (SH) and VM (1) if enabled 313 * @return status, EC_Normal if successful, an error code otherwise 314 */ 315 OFCondition setCompensatorID(const OFString &value, const OFBool check = OFTrue); 316 317 /** set CompensatorMillingToolDiameter (300a,02e8) 318 * @param value value to be set (should be valid for this VR) 319 * @param pos index of the value to be set (0..vm-1), vm=1 320 * @return status, EC_Normal if successful, an error code otherwise 321 */ 322 OFCondition setCompensatorMillingToolDiameter(const Float32 value, const unsigned long pos = 0); 323 324 /** set CompensatorMountingPosition (300a,02e1) 325 * @param value value to be set (single value only) or "" for no value 326 * @param check check 'value' for conformance with VR (CS) and VM (1) if enabled 327 * @return status, EC_Normal if successful, an error code otherwise 328 */ 329 OFCondition setCompensatorMountingPosition(const OFString &value, const OFBool check = OFTrue); 330 331 /** set CompensatorNumber (300a,00e4) 332 * @param value value to be set (single value only) or "" for no value 333 * @param check check 'value' for conformance with VR (IS) and VM (1) if enabled 334 * @return status, EC_Normal if successful, an error code otherwise 335 */ 336 OFCondition setCompensatorNumber(const OFString &value, const OFBool check = OFTrue); 337 338 /** set CompensatorPixelSpacing (300a,00e9) 339 * @param value value to be set (possibly multi-valued) or "" for no value 340 * @param check check 'value' for conformance with VR (DS) and VM (2) if enabled 341 * @return status, EC_Normal if successful, an error code otherwise 342 */ 343 OFCondition setCompensatorPixelSpacing(const OFString &value, const OFBool check = OFTrue); 344 345 /** set CompensatorPosition (300a,00ea) 346 * @param value value to be set (possibly multi-valued) or "" for no value 347 * @param check check 'value' for conformance with VR (DS) and VM (2) if enabled 348 * @return status, EC_Normal if successful, an error code otherwise 349 */ 350 OFCondition setCompensatorPosition(const OFString &value, const OFBool check = OFTrue); 351 352 /** set CompensatorRelativeStoppingPowerRatio (300a,02e7) 353 * @param value value to be set (should be valid for this VR) 354 * @param pos index of the value to be set (0..vm-1), vm=1 355 * @return status, EC_Normal if successful, an error code otherwise 356 */ 357 OFCondition setCompensatorRelativeStoppingPowerRatio(const Float32 value, const unsigned long pos = 0); 358 359 /** set CompensatorRows (300a,00e7) 360 * @param value value to be set (single value only) or "" for no value 361 * @param check check 'value' for conformance with VR (IS) and VM (1) if enabled 362 * @return status, EC_Normal if successful, an error code otherwise 363 */ 364 OFCondition setCompensatorRows(const OFString &value, const OFBool check = OFTrue); 365 366 /** set CompensatorThicknessData (300a,00ec) 367 * @param value value to be set (possibly multi-valued) or "" for no value 368 * @param check check 'value' for conformance with VR (DS) and VM (1-n) if enabled 369 * @return status, EC_Normal if successful, an error code otherwise 370 */ 371 OFCondition setCompensatorThicknessData(const OFString &value, const OFBool check = OFTrue); 372 373 /** set IsocenterToCompensatorDistances (300a,02e6) 374 * @param value value to be set (should be valid for this VR) 375 * @param pos index of the value to be set (0..vm-1), vm=1-n 376 * @return status, EC_Normal if successful, an error code otherwise 377 */ 378 OFCondition setIsocenterToCompensatorDistances(const Float32 value, const unsigned long pos = 0); 379 380 /** set IsocenterToCompensatorTrayDistance (300a,02e4) 381 * @param value value to be set (should be valid for this VR) 382 * @param pos index of the value to be set (0..vm-1), vm=1 383 * @return status, EC_Normal if successful, an error code otherwise 384 */ 385 OFCondition setIsocenterToCompensatorTrayDistance(const Float32 value, const unsigned long pos = 0); 386 387 /** set MaterialID (300a,00e1) 388 * @param value value to be set (single value only) or "" for no value 389 * @param check check 'value' for conformance with VR (SH) and VM (1) if enabled 390 * @return status, EC_Normal if successful, an error code otherwise 391 */ 392 OFCondition setMaterialID(const OFString &value, const OFBool check = OFTrue); 393 394 private: 395 396 /// internal flag used to mark the empty default item 397 /*const*/ OFBool EmptyDefaultItem; 398 399 /// AccessoryCode (300a,00f9) vr=LO, vm=1, type=3 400 DcmLongString AccessoryCode; 401 /// CompensatorColumnOffset (300a,02e5) vr=FL, vm=1, type=1C 402 DcmFloatingPointSingle CompensatorColumnOffset; 403 /// CompensatorColumns (300a,00e8) vr=IS, vm=1, type=1 404 DcmIntegerString CompensatorColumns; 405 /// CompensatorDescription (300a,02eb) vr=LT, vm=1, type=3 406 DcmLongText CompensatorDescription; 407 /// CompensatorDivergence (300a,02e0) vr=CS, vm=1, type=1 408 DcmCodeString CompensatorDivergence; 409 /// CompensatorID (300a,00e5) vr=SH, vm=1, type=3 410 DcmShortString CompensatorID; 411 /// CompensatorMillingToolDiameter (300a,02e8) vr=FL, vm=1, type=3 412 DcmFloatingPointSingle CompensatorMillingToolDiameter; 413 /// CompensatorMountingPosition (300a,02e1) vr=CS, vm=1, type=1 414 DcmCodeString CompensatorMountingPosition; 415 /// CompensatorNumber (300a,00e4) vr=IS, vm=1, type=1 416 DcmIntegerString CompensatorNumber; 417 /// CompensatorPixelSpacing (300a,00e9) vr=DS, vm=2, type=1 418 DcmDecimalString CompensatorPixelSpacing; 419 /// CompensatorPosition (300a,00ea) vr=DS, vm=2, type=1 420 DcmDecimalString CompensatorPosition; 421 /// CompensatorRelativeStoppingPowerRatio (300a,02e7) vr=FL, vm=1, type=3 422 DcmFloatingPointSingle CompensatorRelativeStoppingPowerRatio; 423 /// CompensatorRows (300a,00e7) vr=IS, vm=1, type=1 424 DcmIntegerString CompensatorRows; 425 /// CompensatorThicknessData (300a,00ec) vr=DS, vm=1-n, type=1 426 DcmDecimalString CompensatorThicknessData; 427 /// IsocenterToCompensatorDistances (300a,02e6) vr=FL, vm=1-n, type=1C 428 DcmFloatingPointSingle IsocenterToCompensatorDistances; 429 /// IsocenterToCompensatorTrayDistance (300a,02e4) vr=FL, vm=1, type=1C 430 DcmFloatingPointSingle IsocenterToCompensatorTrayDistance; 431 /// MaterialID (300a,00e1) vr=SH, vm=1, type=2 432 DcmShortString MaterialID; 433 434 }; 435 436 // --- constructors, destructor and operators --- 437 438 /** (default) constructor 439 * @param emptyDefaultSequence internal flag used to mark the empty default sequence 440 */ 441 DRTIonRangeCompensatorSequence(const OFBool emptyDefaultSequence = OFFalse); 442 443 /** copy constructor 444 * @param copy sequence object to be copied 445 */ 446 DRTIonRangeCompensatorSequence(const DRTIonRangeCompensatorSequence ©); 447 448 /** destructor 449 */ 450 virtual ~DRTIonRangeCompensatorSequence(); 451 452 /** assigment operator 453 * @param copy sequence object to be copied 454 * @return reference to this object 455 */ 456 DRTIonRangeCompensatorSequence &operator=(const DRTIonRangeCompensatorSequence ©); 457 458 // --- general methods --- 459 460 /** clear all internal member variables 461 */ 462 void clear(); 463 464 /** check if sequence is empty 465 * @return OFTrue if sequence is empty, OFFalse otherwise 466 */ 467 OFBool isEmpty(); 468 469 /** check if sequence is valid, i.e.\ not the empty default sequence 470 * @return OFTrue if sequence is valid, OFFalse otherwise 471 */ 472 OFBool isValid() const; 473 474 /** get number of items in the sequence 475 * @return number of items 476 */ 477 size_t getNumberOfItems() const; 478 479 /** goto first item in the sequence 480 * @return status, EC_Normal if successful, an error code otherwise 481 */ 482 OFCondition gotoFirstItem(); 483 484 /** goto next item in the sequence 485 * @return status, EC_Normal if successful, an error code otherwise 486 */ 487 OFCondition gotoNextItem(); 488 489 /** goto particular item in the sequence 490 * @param num number of the item to be selected (0..num-1) 491 * @return status, EC_Normal if successful, an error code otherwise 492 */ 493 OFCondition gotoItem(const size_t num); 494 495 /** get current item in the sequence 496 * @param item reference to item pointer (result variable) 497 * @return status, EC_Normal if successful, an error code otherwise 498 */ 499 OFCondition getCurrentItem(Item *&item) const; 500 501 /** get current item in the sequence 502 * @return reference to specified item if successful, empty default item otherwise 503 */ 504 Item &getCurrentItem(); 505 506 /** get current item in the sequence 507 * @return const reference to specified item if successful, empty default item otherwise 508 */ 509 const Item &getCurrentItem() const; 510 511 /** get particular item in the sequence 512 * @param num number of the item to be retrieved (0..num-1) 513 * @param item reference to item pointer (result variable) 514 * @return status, EC_Normal if successful, an error code otherwise 515 */ 516 OFCondition getItem(const size_t num, Item *&item); 517 518 /** get particular item in the sequence 519 * @param num number of the item to be retrieved (0..num-1) 520 * @return reference to specified item if successful, empty default item otherwise 521 */ 522 Item &getItem(const size_t num); 523 524 /** get particular item in the sequence 525 * @param num number of the item to be retrieved (0..num-1) 526 * @return const reference to specified item if successful, empty default item otherwise 527 */ 528 const Item &getItem(const size_t num) const; 529 530 /** get particular item in the sequence 531 * @param num number of the item to be retrieved (0..num-1) 532 * @return reference to specified item if successful, empty default item otherwise 533 */ 534 Item &operator[](const size_t num); 535 536 /** get particular item in the sequence 537 * @param num number of the item to be retrieved (0..num-1) 538 * @return const reference to specified item if successful, empty default item otherwise 539 */ 540 const Item &operator[](const size_t num) const; 541 542 /** add new item to the end of this sequence 543 * @param item reference to new item pointer (result variable) 544 * @return status, EC_Normal if successful, an error code otherwise 545 */ 546 OFCondition addItem(Item *&item); 547 548 /** insert new item into the sequence 549 * @param pos position where the new item is to be inserted (0..num) 550 * @param item reference to new item pointer (result variable) 551 * @return status, EC_Normal if successful, an error code otherwise 552 */ 553 OFCondition insertItem(const size_t pos, Item *&item); 554 555 /** remove particular item from the sequence 556 * @param pos position of the item to be removed (0..num-1) 557 * @return status, EC_Normal if successful, an error code otherwise 558 */ 559 OFCondition removeItem(const size_t pos); 560 561 // --- input/output methods --- 562 563 /** read sequence of items from dataset 564 * @param dataset reference to DICOM dataset from which the sequence should be read 565 * @param card cardinality (valid range for number of items) 566 * @param type value type (valid value: "1", "1C", "2" or something else which is not checked) 567 * @param moduleName optional module/sequence name to be printed (default: "RT object" if NULL) 568 * @return status, EC_Normal if successful, an error code otherwise 569 */ 570 OFCondition read(DcmItem &dataset, 571 const OFString &card, 572 const OFString &type, 573 const char *moduleName = NULL); 574 575 /** write sequence of items to dataset 576 * @param dataset reference to DICOM dataset to which the sequence should be written 577 * @param card cardinality (valid range for number of items) 578 * @param type value type (valid value: "1", "2" or something else which is not checked) 579 * @param moduleName optional module/sequence name to be printed (default: "RT object" if NULL) 580 * @return status, EC_Normal if successful, an error code otherwise 581 */ 582 OFCondition write(DcmItem &dataset, 583 const OFString &card, 584 const OFString &type, 585 const char *moduleName = NULL); 586 587 protected: 588 589 /** goto particular item in the sequence 590 * @param num number of the item to be selected (0..num-1) 591 * @param iterator list iterator storing the position of the item 592 * @return status, EC_Normal if successful, an error code otherwise 593 */ 594 OFCondition gotoItem(const size_t num, 595 OFListIterator(Item *) &iterator); 596 597 /** goto particular item in the sequence 598 * @param num number of the item to be selected (0..num-1) 599 * @param iterator list iterator storing the position of the item 600 * @return status, EC_Normal if successful, an error code otherwise 601 */ 602 OFCondition gotoItem(const size_t num, 603 OFListConstIterator(Item *) &iterator) const; 604 605 private: 606 607 /// internal flag used to mark the empty default sequence 608 /*const*/ OFBool EmptyDefaultSequence; 609 610 /// list of items in this sequence 611 OFList<Item *> SequenceOfItems; 612 /// currently selected item 613 OFListIterator(Item *) CurrentItem; 614 /// empty default item 615 Item EmptyItem; 616 617 }; 618 619 620 #endif 621