Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScaleIntensityRangePercentile bug #8108

Closed
heyufan1995 opened this issue Sep 24, 2024 · 0 comments · Fixed by #8109
Closed

ScaleIntensityRangePercentile bug #8108

heyufan1995 opened this issue Sep 24, 2024 · 0 comments · Fixed by #8109
Assignees

Comments

@heyufan1995
Copy link
Member

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]

KumoLiu added a commit to KumoLiu/MONAI that referenced this issue Sep 25, 2024
Signed-off-by: YunLiu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants