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

move bias and contrast from Image.set_colormap to Image.set_scaling? #58

Closed
kswang1029 opened this issue Sep 21, 2022 · 2 comments · Fixed by #123
Closed

move bias and contrast from Image.set_colormap to Image.set_scaling? #58

kswang1029 opened this issue Sep 21, 2022 · 2 comments · Fixed by #123
Assignees
Labels
question Further information is requested
Milestone

Comments

@kswang1029
Copy link
Contributor

kswang1029 commented Sep 21, 2022

wonder if we should move bias and contrast keyword arguments from Image.set_colormap() to Image.set_scaling()? Effectively when a non-0 bias and a non-1 contrast are applied, the resulting transfer function as seen as a grey curve is a combination of the selected scaling function (eg Square root), the bias function and the contrast function. What do you think?

Screen Shot 2022-09-21 at 14 18 35

@kswang1029 kswang1029 added the question Further information is requested label Sep 21, 2022
@confluence
Copy link
Collaborator

Sounds sensible. We'll need to consider the logic around resetting the bias and contrast values (currently they're reset when the colourmap changes, which is not what the GUI does, and we should drop that). set_scaling should accept the special AUTO value (which is being added in #79) and handle it by calling the appropriate reset function. The scaling parameter to set_scaling should also be optional, so that the function can be used to change the scaling options without changing the scaling function, and the function-specific parameters should probably be set regardless of what the function is.

@kswang1029 kswang1029 added this to the v4.0-stable milestone May 11, 2023
@I-Chenn
Copy link
Contributor

I-Chenn commented May 18, 2023

Sounds sensible. We'll need to consider the logic around resetting the bias and contrast values (currently they're reset when the colourmap changes, which is not what the GUI does, and we should drop that). set_scaling should accept the special AUTO value (which is being added in #79) and handle it by calling the appropriate reset function.

To accept the AUTO value, we need that Auto constant validator created in #79. Since #79 is still being postponed, is it proper to create that Auto validator here and deal with the conflict later when #79 is merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
No open projects
Status: Icebox
3 participants