Skip to content

How to properly rescale pixel values to be in the range [0, 1]? #1656

Discussion options

You must be logged in to vote

Just stumbled over this old question... probably long solved, but I'll comment for anyone else finding this.

Your solution uses the modality LUT to scale the output, which is ok as long it is considered by the viewer (which it should be). If you are only interested in the display in the viewer and not in the actual pixel data, this is sufficient.

The solution from SO was related to the actual pixel data without considering the modality LUT. As you have a typical CT image with an intercept of -1024, your viewer will take that into account and accordingly shift the pixel values, so setting this to 0 is indeed needed if you don't want this. After that, you could either adapt your pixel data …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@CristianoPizzamiglio
Comment options

Answer selected by CristianoPizzamiglio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants