Describe the bug
In ScaleIntensityRangePercentile, the output is converted back to input dtype and ignored the dtype input. If input is uint8, the scaled image is wrong.
|
return convert_to_dst_type(img_t, dst=img)[0] |
In ScaleIntensityRange, the implementation is correct
|
ret: NdarrayOrTensor = convert_data_type(img, dtype=dtype)[0] |
Describe the bug
In ScaleIntensityRangePercentile, the output is converted back to input dtype and ignored the
dtypeinput. If input is uint8, the scaled image is wrong.MONAI/monai/transforms/intensity/array.py
Line 1414 in 59a7211
In ScaleIntensityRange, the implementation is correct
MONAI/monai/transforms/intensity/array.py
Line 1006 in 59a7211