pydicom.config.overlay_data_handlers¶
-
pydicom.config.overlay_data_handlers= [<module 'pydicom.overlay_data_handlers.numpy_handler' from '/home/circleci/project/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
Trueif the handler supports the transfer syntax indicated inDatasetds,Falseotherwise.- def is_available():
Return
Trueif the handler’s dependencies are installed,Falseotherwise.- def get_overlay_array(ds, group):
Return a correctly shaped
numpy.ndarrayderived from the Overlay Data with element tag group, inDatasetds 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
NotImplementedErroris raised.