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

Viewer slider #365

Merged
merged 29 commits into from
Apr 25, 2024
Merged

Viewer slider #365

merged 29 commits into from
Apr 25, 2024

Conversation

paskino
Copy link
Collaborator

@paskino paskino commented Sep 11, 2023

Adding a slider widget to control the slice that is being displayed. Both the mouse wheel and this slider can be used to change the slice.

A SliceSliderRepresentation with default colors (CIL pinks), orientation (horizontal) and position is introduced.

Closes #358

The orientation and position of the slider can be changed.

I tested on Windows with the web app and it doesn't seem to be able to grab the slider.

image

image

@paskino
Copy link
Collaborator Author

paskino commented Sep 27, 2023

TODO:

  • Slider resets when changing orientation
  • Slider is reset when loading a new image
  • Slider can be hidden

paskino and others added 2 commits October 22, 2023 10:10
…#362)

* closes Downsampling should use round rather than int TomographicImaging#359
* update unittest and remove temporary test files
* use pytest in action
* move functionality to utils.conversion
@DanicaSTFC DanicaSTFC self-requested a review February 5, 2024 13:39
Wrappers/Python/ccpi/viewer/widgets/slider.py Outdated Show resolved Hide resolved
self.bar_ends_color = 'Yellow'


def get_slider_widget(self, orientation='horizontal', offset=0.12):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand this method returns the widget but more importantly it creates it. Can we change the name to "Make" or "Create" or similar?

Wrappers/Python/ccpi/viewer/widgets/slider.py Show resolved Hide resolved
Wrappers/Python/ccpi/viewer/widgets/slider.py Show resolved Hide resolved
Wrappers/Python/ccpi/viewer/widgets/slider.py Show resolved Hide resolved
Wrappers/Python/examples/viewer_slider.py Outdated Show resolved Hide resolved
@DanicaSTFC
Copy link
Collaborator

I tested on Windows and magma data .npy and it seemed to work correctly.

@DanicaSTFC
Copy link
Collaborator

I changed the bar colour back to gray. The previous magenta was not giving enough contrast with the viewer blue background.

gray

@DanicaSTFC
Copy link
Collaborator

DanicaSTFC commented Apr 5, 2024

I opened two issues to add features to this slider so we can close this PR and continue the enhancements at a later stage

#381 #380

@DanicaSTFC DanicaSTFC removed the request for review from lauramurgatroyd April 17, 2024 13:35
@DanicaSTFC DanicaSTFC self-assigned this Apr 17, 2024
@DanicaSTFC DanicaSTFC merged commit 6d6baa9 into TomographicImaging:master Apr 25, 2024
3 checks passed
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 this pull request may close these issues.

Adding slider for slicing
4 participants