The QTPlgDicomDataSet class is a collection of Data Elements that share the
same Group Number. You specify the data element to add to or retrieve from the collection by specifying its
Element Number into the key of the
class property.
By convenience, the QTPlugin defines a few built–in classes, derived from this class, to help you to deal with such a
collections; these classes, representing some of
the most common groups of Standard Data Elements you can encounter reading or writing dicom files, provide you with some pre–defined
class properties that allow you to deal with data elements in an easier way. However, you must be aware that such a properties are far
from to be an exahustive list of the data elements defined by the DICOM Standard.
The QTPlgDicomDataSet class, along with its derived classes, provide support whether for data elements with
"plain" values or data elements with a value consisting of a
of zero or more
, where each item contains a set of Data Elements.
Since version 6.3 of the plugin this class can be used in Console Applications
→
The QTPlgDicomDataSet class constructors are called when you create a new instance of the class, while
the ˜QTPlgDicomDataSet class destructor, is called automatically when the
class is no more in use. Also, you can invoke the class destructor by setting the instance of the class to nil.
Once a new class instance is returned, it is good practice to check the
class property
to
be sure that the new object can be used. See the
validity requirements for more details.
The class provides you with the following initializer methods:
use this contructor to create a new empty container for the set of data elements belonging to the group defined by the
groupID parameter. You can specify either a set of
Standard Data Elements or a private one; this
being the case you shall set the
groupID parameter with an odd value (you can not use values of
&h0001,
&h0003,
&h0005,
&h0007 and
&hFFFF)
This is the copy constructor. The properties of the object to be copied will be used to initialize the
new class instance properties
specifies the group number of the data elements in the current data set
specifies the value of the Group Length (groupID,&h0000) standard data element,
if any; otherwise is set to 0
returns a list of the element numbers of the data elements currently inserted into to the data set
specifies the value of the data element into the data set that corresponds to the element number specified by the
key. The type of object that can be used as value along with this property depends on the
value representation of the data element in use. If the data element has a value representation of "
SQ",
then the object to be used is an instance of the
class, otherwise is an instance of
the class. In setting mode, specifying a data
element that is not yet in the data set, causes the data element to be added to the list; if the data element is already
in the list, its value will be replaced by that new one
use this method to add a data element along with its value to a private data set. As the class requires that the value representation
for the data element to be added can be compared with that one of the value associated to it to be ensure that it is valid for the
data element, in case of a private data set (where the value representation of the data elements is not known
"a priori") the
mechanism is not appropriate; so this method
lets you declare explictly the value representation of the data element