Logo Search packages:      
Sourcecode: gdcm version File versions

const SequenceOfItems * gdcm::DataElement::GetSequenceOfItems (  )  const [inherited]

Return the Value of DataElement as a Sequence Of Items (if possible)

Warning:
: You need to check for NULL return value

: In some case a Value could not have been recognized as a SequenceOfItems in those case the return of the function will be NULL, while the Value would be a valid SequenceOfItems, in those case prefer GetValueAsSQ. In which case the code internally trigger an assert to warn developper.

Definition at line 45 of file gdcmDataElement.cxx.

References gdcm::SmartPointer< ObjectType >::GetPointer(), and gdcm::DataElement::IsEmpty().

Referenced by gdcm::DICOMDIRGenerator::Generate().

                                                               {
    const SequenceOfItems *sqi = dynamic_cast<SequenceOfItems*>(ValueField.GetPointer());
    if(!sqi)
      {
      // Was the element loaded as a byte value ? Let's check:
      assert( IsEmpty() );
      }
    return sqi;
  }


Generated by  Doxygen 1.6.0   Back to index