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

1922 live view emit dir structure on load #1923

Merged
merged 2 commits into from
Sep 13, 2023

Conversation

JackEAllen
Copy link
Collaborator

Issue

Closes #1922

Description

View makes a call on initialisation to the model to emit a signal to load images so that if images are already present in the selected directory, they are loaded into the live viewer. Previously Images if present were not loaded into live viewer on initialisation.

Testing

Try loading the image viewer with and without images already populated inside the selected directory.

  1. Create a empty directory
  2. Load live viewer using CLI flag python -W default -m mantidimaging --log-level DEBUG -lv <LIVE_DIR_OUT/> or from the menu: File>Live Viewer select a folder.
  3. Verify that the live viewer window opens with no data loaded successfully
  4. Begin copying image files over to the live viewer using the utility script scripts/simulate_live_data.py: python simulate_live_data.py -s ../<LIVE_DIR_IN/>/ -d <../LIVE_DIR_OUT/>/ --faulty
    and verify images display in the live viewer.
  5. Close Mantid Imaging and repeat steps with the populated directory verifying that the live viewer shows loaded data on opening.

Acceptance Criteria

  • Live viewer opens successfully when selected with an empty directory.
  • Live viewer displays images present in a selected directory that already contains images.

Documentation

docs/release_notes/next/fix-1922-live_view_image_load_on_init

@coveralls
Copy link

coveralls commented Sep 12, 2023

Coverage Status

coverage: 76.482%. remained the same when pulling 9e75dd4 on 1922_live_view_emit_dir_structure_on_load into b8a7a2f on main.

@JackEAllen JackEAllen marked this pull request as ready for review September 12, 2023 12:15
@JackEAllen JackEAllen force-pushed the 1922_live_view_emit_dir_structure_on_load branch from 6435880 to 527ffab Compare September 12, 2023 15:19
Copy link
Collaborator

@samtygier-stfc samtygier-stfc left a comment

Choose a reason for hiding this comment

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

Fine with the unused function removed.

Wondering if this could just be added directly to ImageWatcher, so that it calls self._handle_directory_change() in its constructor. Is there a time we'd want to create and ImageWatcher and not an immediate file list?

mantidimaging/gui/windows/live_viewer/view.py Outdated Show resolved Hide resolved
@JackEAllen JackEAllen force-pushed the 1922_live_view_emit_dir_structure_on_load branch 2 times, most recently from f6557f2 to e3819dc Compare September 13, 2023 09:08
@JackEAllen JackEAllen force-pushed the 1922_live_view_emit_dir_structure_on_load branch 2 times, most recently from ac51912 to 38ee914 Compare September 13, 2023 14:20
@JackEAllen JackEAllen force-pushed the 1922_live_view_emit_dir_structure_on_load branch from 38ee914 to 9e75dd4 Compare September 13, 2023 14:44
@samtygier-stfc samtygier-stfc added this pull request to the merge queue Sep 13, 2023
Merged via the queue into main with commit 2a4c477 Sep 13, 2023
8 checks passed
@samtygier-stfc samtygier-stfc deleted the 1922_live_view_emit_dir_structure_on_load branch September 13, 2023 15:39
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.

Live Viewer: Load Existing Images From Selected Directory
3 participants