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

Color Palette always selects bbr instead of bw #14

Closed
KreitnerL opened this issue Dec 21, 2021 · 7 comments
Closed

Color Palette always selects bbr instead of bw #14

KreitnerL opened this issue Dec 21, 2021 · 7 comments

Comments

@KreitnerL
Copy link

For all my scans the images are displayed with the bbr color palette instead of the usual bw.
image

The color palette is chosen based on the min value of the nifti file.
https://github.com/anibalsolon/vscode-neuro-viewer/blob/main/webview/nifti/index.ts#L24-L26

I would either like to see the standard bw scale being used or a button to switch the color palette.

@anibalsolon
Copy link
Owner

hey @Linus4world thank you! Would you mind generating a histogram of the image please? I'm planning to be able to adjust the scale, to increase contrast, but a palette picker should be faster for now.

@KreitnerL
Copy link
Author

Here is a histogram of the ct scan. Note that there are some extreme outliers so I also attached a text file with all the values and their respective frequency.
hist_values.txt

hist

@anibalsolon
Copy link
Owner

Interesting! Yes, this scenario only thresholding can solve. Maybe it can do something more intelligent about it in the future, to identify these outliers. Please bear with me! 🔜

As a workaround, you can highlight some of the data using the right histogram, by selecting a range there with the cursor (click and move).

@KreitnerL
Copy link
Author

Great thanks for your support!

Yes, however, even if I select a range, I have no control over the color. It will either be displayed in blue, black, red or yellow

@anibalsolon
Copy link
Owner

Yes indeed- I've added two new options: a color picker and a fine-tuner. The color picker is a bit obvious, but the fine-tuner allows you to adjust the color range for the distribution of your data. In the example, the image has a long tail from outliers, so I adjusted the white thumb to a more reasonable place in the image distribution. LMK what you think and if it helps in your case.

image

image

@KreitnerL
Copy link
Author

Yes perfect! That is exactly what I wanted. Thank you!
It would also be great if the extension could automatically save my preferences for the color palette so that I do not have to select it manually for every new sample.

@anibalsolon
Copy link
Owner

Yeah, that would be great indeed. I'll have to think better about the settings, and what would be the most user friendly solution. Other than global options, an option is to record the choices in the file using Nifti extensions (a XML-like payload stored in the end of the file).

I've opened an issue to track this: #18

Thank again for the feedback!

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