pydicom.config.overlay_data_handlers¶
-
pydicom.config.
overlay_data_handlers
= [<module 'pydicom.overlay_data_handlers.numpy_handler' from '/builddir/build/BUILD/pydicom-1.4.2/pydicom/overlay_data_handlers/numpy_handler.py'>]¶ Handlers for converting (60xx,3000) Overlay Data
New in version 1.4.
This is an ordered list of Overlay Data handlers that the
overlay_array()
method will use to try to extract a correctly sized numpy array from an Overlay Data element.Handlers shall have three methods:
- def supports_transfer_syntax(ds)
Return
True
if the handler supports the transfer syntax indicated inDataset
ds,False
otherwise.- def is_available():
Return
True
if the handler’s dependencies are installed,False
otherwise.- def get_overlay_array(ds, group):
Return a correctly shaped
numpy.ndarray
derived from the Overlay Data with element tag group, inDataset
ds or raise an exception.
The first handler that both announces that it supports the transfer syntax and does not raise an exception is the handler that will provide the data.
If all handlers fail to convert the data only the last exception is raised.
If none raise an exception, but they all refuse to support the transfer syntax, then a
NotImplementedError
is raised.