Closed hackermd closed 2 years ago
A note that we should update the explanation of the softcopy_voi_luts
and modality_lut
in the various SOPClass docstrings to make sure that it's clear that they will be copied from the referenced images if none are provided.
@hackermd it seems you have forgotten to add a test image called sm_image_grayscale.dcm
, so tests are failing for me
This PR introduces the following changes based on discussion on #139:
copy_modality_lut
andcopy_voi_lut
parameters from constructor ofGrayscaleSoftcopyPresentationState
and friends and instead always copy attributes of Modality LUT and VOI LUT modules from referenced source images by default. In almost all cases, this is probably the desired behavior. In case a developers really wants to override that behavior and not apply a Modality LUT or VOI LUT, a custom Modality LUT or VOI LUT can be provided via themodality_lut
orsoftcopy_voi_lut
, respectively, to describe an identity function.GrayscaleSoftcopyPresentationState
, an ICC Profile from one of the referenced color images will be used by default forColorSoftcopyPresentationState
if no ICC Profile is provided via theicc_profile
parameter. ForPseudoColorSoftcopyPresentationState
, a default ICC Profile for the sRGB color space will be included if none is provided by the developer via theicc_profile
parameter.