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

Normalize #4

Open
woo1 opened this issue Mar 7, 2019 · 1 comment
Open

Normalize #4

woo1 opened this issue Mar 7, 2019 · 1 comment

Comments

@woo1
Copy link

woo1 commented Mar 7, 2019

Hi. Thanks for sharing good code.

I'm confusing about noramlizing.

normalize_x, normalize_y functions in util.py

It looks like normalizing dicom pixel data.
How can I use this method for 8 bit images? (0 ~ 255)
Can you tell me about the variable and parameter's meaning like "lower", "upper", "1024"?

Thank you!

@hmshan
Copy link
Owner

hmshan commented Mar 7, 2019

Hi,

Thanks for your interest.

The normalization function is to normalize a certain range into [0, 1]. For your 8 bit image, you can divide it by 255.0.

For a CT image, the intensity ranges from -1000 to 1000+ HU. If the image has metal, the maximum intensity could be even larger.

The "1024" is the offset. The matrix saved in the dicom file is unsigned integer. After subtracting it from 1024, the value will be standard HU. Then you can normalize the range of [lower, upper] into [0, 1].

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

No branches or pull requests

2 participants