pydicom.config.overlay_data_handlers¶
-
pydicom.config.
overlay_data_handlers
= [<module 'pydicom.overlays.numpy_handler' from '/home/circleci/project/pydicom/overlays/numpy_handler.py'>]¶ Handlers for converting (60xx,3000) Overlay Data
New in version 1.4.
Deprecated since version 2.1.
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 have two required methods:
- 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.
And two required attributes:
- DEPENDENCIESdict
A dict containing the dependencies of the handler as {‘package_import_name’: (‘http://package.com/url’, ‘Package Name’)}
- HANDLER_NAMEstr
The name of the handler, e.g. ‘Numpy Overlay’
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.