pydicom.sequence.Sequence¶
-
class
pydicom.sequence.Sequence(iterable=None)[source]¶ Class to hold multiple
Datasetin alist.This class is derived from
MultiValueand as such enforces that all items added to the list areDatasetinstances. In order to do this, a validator is substituted for type_constructor when constructing theMultiValuesuper class.Methods
__init__([iterable])Initialize a list of
Dataset.append(val)S.append(value) – append value to the end of the sequence
clear()count(value)extend(values)S.extend(iterable) – extend sequence by appending elements from the iterable
index(value, [start, [stop]])Raises ValueError if the value is not present.
insert(position, val)S.insert(index, value) – insert value before index
pop([index])Raise IndexError if list is empty or index is out of range.
remove(value)S.remove(value) – remove first occurrence of value.
reverse()S.reverse() – reverse IN PLACE
sort([key, reverse])Attributes
Return a weak reference to the parent
Dataset.