pydicom.sequence.Sequence¶
- class pydicom.sequence.Sequence(iterable: Iterable[Dataset] | None = None)[source]¶
Class to hold multiple
Dataset
in alist
.Methods
__init__
([iterable])Initialize a list of
Dataset
.append
(item)Append an item.
clear
()count
(value)extend
(val)index
(value, [start, [stop]])Raises ValueError if the value is not present.
insert
(position, item)Insert an item at position.
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
- index(value[, start[, stop]]) integer -- return first index of value. [source]¶
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but recommended.
- pop([index]) item -- remove and return item at index (default last). [source]¶
Raise IndexError if list is empty or index is out of range.