Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SiDicomDataSet Class Referenceabstract

VolumeViz DICOM data. More...

#include <VolumeViz/readers/dicom/SiDicomDataSet.h>

Public Member Functions

virtual ~SiDicomDataSet ()
 Destructor.
 
virtual SiDicomDataSetclone () const =0
 Create a clone of the current data set.
 
virtual size_t getLength () const =0
 Get the number of elements in the data set.
 
virtual const SiDicomElementgetElement (const SoDicomTag &tag) const =0
 Get an element of this data set.
 
virtual const SiDicomElementgetElement (const size_t idx) const =0
 Get the n-th element of this data set.
 
virtual const SiDicomValuegetElementValue (const SoDicomTag &tag) const =0
 Shortcut to get an element's value fast.
 
virtual bool getElementBufferValue (const SoDicomTag &tag, SoBufferObject *buffer) const =0
 Shortcut to extract an element's buffer value.
 
virtual SbString getElementStringValue (const SoDicomTag &tag, const size_t idx, const SbString &defaultValue) const =0
 Shortcut to extract a STRING element's value.
 
virtual int64_t getElementIntValue (const SoDicomTag &tag, const size_t idx, const int64_t defaultValue) const =0
 Shortcut to extract a INT element's value.
 
virtual uint64_t getElementUIntValue (const SoDicomTag &tag, const size_t idx, const uint64_t defaultValue) const =0
 Shortcut to extract a UINT element's value.
 
virtual double getElementDoubleValue (const SoDicomTag &tag, const size_t idx, const double defaultValue) const =0
 Shortcut to extract a DOUBLE element's value.
 

Detailed Description

VolumeViz DICOM data.

Access data in a DICOM data object.

DICOM is a widely used file format for storing medical image data (CT, MRI, etc), defined by the National Electrical Manufacturers Association (NEMA) (http://dicom.nema.org).

This class, along with SoDicomTag, SiDicomElement, SiDicomValue and SiDicomSequence, allows an application to iterate over or randomly access all the attributes in a DICOM data object. This includes attributes that are not used by VolumeViz for rendering.

This class cannot directly open a DICOM file. An SiDicomDataSet object can be requested from an SoVRDicomFileReader object or an SoVRDicomData object using the getDicomDataSet() method.

SEE ALSO

SoVRDicomFileReader, SoVRDicomData, SoDicomTag, SiDicomElement, SiDicomValue, SiDicomSequence

Definition at line 41 of file SiDicomDataSet.h.

Constructor & Destructor Documentation

◆ ~SiDicomDataSet()

virtual SiDicomDataSet::~SiDicomDataSet ( )
inlinevirtual

Destructor.

Definition at line 47 of file SiDicomDataSet.h.

Member Function Documentation

◆ clone()

virtual SiDicomDataSet * SiDicomDataSet::clone ( ) const
pure virtual

Create a clone of the current data set.

Returns
a newly created DICOM data set, that must be deleted by the caller.

◆ getElement() [1/2]

virtual const SiDicomElement * SiDicomDataSet::getElement ( const size_t  idx) const
pure virtual

Get the n-th element of this data set.

Parameters
idxthe index of the element in the data set.
Returns
a pointer to the n-th element or NULL if idx is greater than the data set length.

◆ getElement() [2/2]

virtual const SiDicomElement * SiDicomDataSet::getElement ( const SoDicomTag tag) const
pure virtual

Get an element of this data set.

Parameters
tagthe tag of the element to find.
Returns
a pointer to the found element or NULL if it cannot be found.

◆ getElementBufferValue()

virtual bool SiDicomDataSet::getElementBufferValue ( const SoDicomTag tag,
SoBufferObject buffer 
) const
pure virtual

Shortcut to extract an element's buffer value.

Parameters
tagThe tag of the element to find.
bufferThe buffer to fill with element's value.
Returns
true if the extraction was successful, or false otherwise.

◆ getElementDoubleValue()

virtual double SiDicomDataSet::getElementDoubleValue ( const SoDicomTag tag,
const size_t  idx,
const double  defaultValue 
) const
pure virtual

Shortcut to extract a DOUBLE element's value.

If the value is of a numeric type different from DOUBLE, it will be casted to a double. That casting may cause a precision loss.

Parameters
tagThe tag of the element to find.
idxThe index of the scalar value to extract.
defaultValueThe value returned if the extraction fails.
Returns
The double stored at the given index in the element with the given tag, or the default value if the extraction fails.

◆ getElementIntValue()

virtual int64_t SiDicomDataSet::getElementIntValue ( const SoDicomTag tag,
const size_t  idx,
const int64_t  defaultValue 
) const
pure virtual

Shortcut to extract a INT element's value.

If the value is of a numeric type different from INT, it will be casted to a 64 bits integer. That casting may cause a precision loss.

Parameters
tagThe tag of the element to find.
idxThe index of the scalar value to extract.
defaultValueThe value returned if the extraction fails.
Returns
The 64 bits integer stored at the given index in the element with the given tag, or the default value if the extraction fails.

◆ getElementStringValue()

virtual SbString SiDicomDataSet::getElementStringValue ( const SoDicomTag tag,
const size_t  idx,
const SbString defaultValue 
) const
pure virtual

Shortcut to extract a STRING element's value.

If the stored value if not of type STRING, this method will return a string representation of the value. currently works for INT, UINT, and DOUBLE.

Parameters
tagThe tag of the element to find.
idxThe index of the scalar value to extract.
defaultValueThe value returned if the extraction fails.
Returns
The string stored at the given index in the element with the given tag, or the default value if the extraction fails.

◆ getElementUIntValue()

virtual uint64_t SiDicomDataSet::getElementUIntValue ( const SoDicomTag tag,
const size_t  idx,
const uint64_t  defaultValue 
) const
pure virtual

Shortcut to extract a UINT element's value.

If the value is of a numeric type different from UINT, it will be casted to an unsigned 64 bits integer. That casting may cause a precision loss.

Parameters
tagThe tag of the element to find.
idxThe index of the scalar value to extract.
defaultValueThe value returned if the extraction fails.
Returns
The unsigned 64 bits integer stored at the given index in the element with the given tag, or the default value if the extraction fails.

◆ getElementValue()

virtual const SiDicomValue * SiDicomDataSet::getElementValue ( const SoDicomTag tag) const
pure virtual

Shortcut to get an element's value fast.

Parameters
tagThe tag of the element to find.
Returns
The element's value, or NULL if the element cannot be found.

◆ getLength()

virtual size_t SiDicomDataSet::getLength ( ) const
pure virtual

Get the number of elements in the data set.


The documentation for this class was generated from the following file: