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

Live Viewer calculates intensity of live images via QThreads #2457

Open
wants to merge 43 commits into
base: main
Choose a base branch
from

Conversation

MikeSullivan7
Copy link
Collaborator

@MikeSullivan7 MikeSullivan7 commented Jan 14, 2025

Issue

Closes #2448

Description

The calculation of the Intensity Profile in the Live Viewer is now done asynchronously via a QThread and the GUI is updated via the main thread upon the QThread termination. The intensity is calculated in chunks of 100 points, each done via a different thread. It is done in this way so that the GUI will remain responsive and smooth while the ROI is moved on the image, all while the intensity updates to the new position. The calculation speed is also increased by using the ImageCache class.
Unit and System tests have been added for the Live Viewer.

This PR will require PR #2425 after which this PR will need to be rebased.

Testing

make check
make test-system

Acceptance Criteria

Check that all tests pass.

  1. Open Live Viewer
  2. Right click -> Operations -> Calculate Intensity
  3. Ensure that the Intensity plot opens, the ROI is visible, and that the intensity is plotted correctly (check against known data)
  4. Move and resize the ROI and check that the Intensity plot updates smoothly with no GUI interruption.

Documentation

Release Note

…_from_cache_THEN_image_is_not_in_cache and test_WHEN_oldest_image_got_THEN_get_oldest_image
…added_to_cache, test_WHEN_image_in_cache_when_loaded_then_image_taken_from_cache, test_WHEN_cache_full_THEN_loading_image_removes_oldest_image
@MikeSullivan7 MikeSullivan7 force-pushed the 2448_live_viewer_spectrum_async branch from cc43f76 to c53660e Compare January 14, 2025 15:49
@coveralls
Copy link

coveralls commented Jan 14, 2025

Coverage Status

coverage: 73.089% (-0.5%) from 73.609%
when pulling 5e45cb2 on 2448_live_viewer_spectrum_async
into 41617ac on main.

@MikeSullivan7 MikeSullivan7 marked this pull request as ready for review January 15, 2025 13:29
@MikeSullivan7 MikeSullivan7 changed the title 2448 live viewer spectrum async Live Viewer calculates intensity of live images via QThreads Jan 15, 2025
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.

Calculate Live Viewer Spectrum asynchronously
2 participants