pydicom.pixel_data_handlers.jpeg_ls_handler

Use the jpeg_ls (pyjpegls) Python package to decode Pixel Data.

Functions

get_pixeldata(ds)

Return the Pixel Data as a numpy.ndarray.

is_available()

Return True if the handler has its dependencies met.

needs_to_convert_to_RGB(ds)

Return True if the Pixel Data should to be converted from YCbCr to RGB.

should_change_PhotometricInterpretation_to_RGB(ds)

Return True if the Photometric Interpretation should be changed to RGB.

supports_transfer_syntax(transfer_syntax)

Return True if the handler supports the transfer_syntax.

pydicom.pixel_data_handlers.jpeg_ls_handler.get_pixeldata(ds: Dataset) numpy.ndarray[source]

Return the Pixel Data as a numpy.ndarray.

Returns:

A correctly sized (but not shaped) numpy array of the Pixel Data.

Return type:

numpy.ndarray

Raises:
pydicom.pixel_data_handlers.jpeg_ls_handler.is_available() bool[source]

Return True if the handler has its dependencies met.

pydicom.pixel_data_handlers.jpeg_ls_handler.needs_to_convert_to_RGB(ds: Dataset) bool[source]

Return True if the Pixel Data should to be converted from YCbCr to RGB.

This affects JPEG transfer syntaxes.

pydicom.pixel_data_handlers.jpeg_ls_handler.should_change_PhotometricInterpretation_to_RGB(ds: Dataset) bool[source]

Return True if the Photometric Interpretation should be changed to RGB.

This affects JPEG transfer syntaxes.

pydicom.pixel_data_handlers.jpeg_ls_handler.supports_transfer_syntax(transfer_syntax: UID) bool[source]

Return True if the handler supports the transfer_syntax.

Parameters:

transfer_syntax (uid.UID) – The Transfer Syntax UID of the Pixel Data that is to be used with the handler.