-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Show generated images in 2D viewer when double-clicking on node #1776
Conversation
meshroom/ui/qml/main.qml
Outdated
viewer2D.displayedNode = node; | ||
|
||
// 3D viewer | ||
for(var i=0; i < node.attributes.count; ++i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be good to add semantic for 3D too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should make a separate issue to normalize the use of the semantic field (so we can anticipate problems that may appear on the long term before using this concept in too many places of the code), and at this point yep sure it'll be a good idea to add 3D to semantics. What do you think ?
name='depth', | ||
label='Depth Maps', | ||
description='Generated depth maps.', | ||
semantic='image', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
semantic=desc.Semantic.Image,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same answer as above : #1776 (comment)
Maybe add "panoramicImage" for PanoramaMerging output that can be loaded in 2D and 3D. |
Need to check that the node is computed to load it in the 2D viewer (or at least running?). |
If there is no param of image type to a node, it should not replace the last active node of the 2D Viewer. |
Not specific to the PR, it's an historical problem: when changing the selection in the ImageGallery using the keyboard, it would be good to update the UI accordingly, as it's done when changing the selected image with the mouse. |
I am not sure of how we could make such a behaviour user-friendly...
The issue is that there won't be any way to unload a node without replacing it by another. |
meshroom/ui/qml/Viewer/Viewer2D.qml
Outdated
@@ -990,18 +1043,18 @@ FocusScope { | |||
} | |||
|
|||
ComboBox { | |||
id: imageType | |||
id: outputAttribute | |||
property var activeNode: root.oiioPluginAvailable ? _reconstruction.activeNodes.get('allDepthMap').node : null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You removed the "imageType" ID as well as references to it everywhere but at line 563. It generates a "Viewer2D.qml:563: ReferenceError: imageType is not defined" warning when Meshroom is started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point sorry about that ^^
This raises a question though : this depthMapNodeName Label doesn't really make much sense now since we don't display just depth maps but any sequence of output images related to the viewpoints, and in addition users should be aware of what is being displayed since you actually need to double click a node to visualize it, so shouldn't we just remove that Label ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It took me a little time to find where this label was displayed (I had to add the red background shown in the image below to find it...), but now that I see it, I think that it should definitely be kept but renamed on the QML side.
It is not specific to the depth maps anymore, but since it displays the name of the node that's currently loaded in the viewer, it is quite useful. Considering that double-clicking on a node might not necessarily change the node loaded in the 2D viewer, it's a good way to keep track of what's shown in there.
Yes, but IMH that's not a problem as long as we can still display the source image as you suggested. |
Detail: maybe good to add mask and weight to PanoramaWarping. |
We need to keep the capability to drag&drop external images into the 2D Viewer. |
In the combobox, use the Label instead of the technical name of the attribute to match the information displayed in the NodeEditor. |
Double click on a node when already on "Gallery" should switch to the first element of the combobox again. BUT it's a good think that I can be on "Sim Maps" and switch between DepthMap node and DepthMapFilter node. |
Maybe rename "Gallery" as "Image Gallery" in the combo box. |
BTW could you update the labels of the output params of PanoramaMerging from "Output Folder" to "Panorama"? |
So should we keep the current behavior or change to always re-initialize the ComboBox index when we change node ? It seems like the current behavior can be useful for comparing the output of DepthMap and DepthMapFilter without clicking too many things, and it doesn't impact anything else, so maybe keep it (for now at least) ? |
I think the "close" button would unload the node from the viewer, not hide the node's name and path. |
…combo box when double clicking a node
…played node in 2D viewer to adapt UI
4c01703
to
0424ae1
Compare
Description
When double-clicking on the PrepareDenseScene, DepthMap or DepthMapFilter node, the generated images (undistorted images, depth maps, sim maps) corresponding to the currently selected viewpoint will automatically appear in the 2D viewer.
This behaviour can be applied on other nodes that generate images with the following changes in the node description :
(see DepthMap.py for an example).
Implementation remarks