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

[ui] 2D viewer: image sequence player #1989

Merged
merged 24 commits into from
Jul 12, 2023
Merged

[ui] 2D viewer: image sequence player #1989

merged 24 commits into from
Jul 12, 2023

Conversation

mugulmd
Copy link
Contributor

@mugulmd mugulmd commented Apr 18, 2023

Description

This PR introduces a new UI element in the 2D viewer: an image sequence player.
This player allows user to navigate smoothly between viewpoints and provides playback functionnalities.

For performance and interactivity purposes, this feature relies on a newly introduces image sequence cache in QtAliceVision: alicevision/QtAliceVision#36

sequence_player

Features list

  • SequencePlayer component with :
    • slider to scroll through viewpoints
    • play/pause functionnalities
    • cached regions indicator in background
  • new pickedViewId concept in reconstruction subordinated to selectedViewId to allow only partial UI updates
  • bug fix in the float image viewer: avoid black image when a new image is being loaded

@mugulmd mugulmd self-assigned this Apr 18, 2023
@mugulmd mugulmd force-pushed the mug/sequencePlayer branch from 20dd6d1 to e8cc706 Compare April 24, 2023 12:28
@mugulmd mugulmd marked this pull request as ready for review April 25, 2023 16:49
@cbentejac cbentejac added the feature new feature (proposed as PR or issue planned by dev) label Apr 26, 2023
@mugulmd mugulmd added this to the Meshroom 2023.2.0 milestone Apr 28, 2023
@mugulmd mugulmd force-pushed the mug/sequencePlayer branch from ba2d684 to 7b077c7 Compare May 30, 2023 12:41
@mugulmd mugulmd added the UI label Jun 15, 2023
@mugulmd mugulmd marked this pull request as draft June 19, 2023 14:52
@mugulmd mugulmd force-pushed the mug/sequencePlayer branch from 7b077c7 to e928ef0 Compare June 19, 2023 15:08
@mugulmd mugulmd force-pushed the mug/sequencePlayer branch from e928ef0 to d852dc1 Compare July 3, 2023 09:54
@mugulmd mugulmd marked this pull request as ready for review July 3, 2023 13:07
@cbentejac cbentejac force-pushed the mug/sequencePlayer branch from 4134d79 to 5b2b431 Compare July 10, 2023 14:21
return getViewpointMetadata(_reconstruction.selectedViewId);
let vp = getViewpoint(_reconstruction.selectedViewId);
let metadata = vp ? vp.childAttribute("metadata").value : "";
return JSON.parse(metadata);
Copy link
Contributor

Choose a reason for hiding this comment

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

Not exactly sure how it is triggered, but this line generates some SyntaxError: JSON.parse: Parse error as soon as a project is loaded, probably because the viewpoint (and thus the metadata) is not yet available at that point.

target: _reconstruction
function onSelectedViewIdChanged() {
for (let idx = 0; idx < sortedViewIds.length; idx++) {
if (_reconstruction.selectedViewId == sortedViewIds[idx] && (m.frame != idx)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think type coercion could be applied here:

Suggested change
if (_reconstruction.selectedViewId == sortedViewIds[idx] && (m.frame != idx)) {
if (_reconstruction.selectedViewId === sortedViewIds[idx] && (m.frame != idx)) {

@mugulmd mugulmd force-pushed the mug/sequencePlayer branch from 97e27dd to 73533cf Compare July 12, 2023 07:14
@cbentejac cbentejac merged commit e0a3944 into develop Jul 12, 2023
@cbentejac cbentejac deleted the mug/sequencePlayer branch July 12, 2023 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature new feature (proposed as PR or issue planned by dev) UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants