mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-21 10:37:18 +02:00
[ui] Viewer: new option to display tracks
This commit is contained in:
parent
48d4fcacd9
commit
47f1743edc
4 changed files with 43 additions and 12 deletions
|
@ -18,7 +18,6 @@ FloatingPane {
|
|||
property var featureExtractionNode: null
|
||||
|
||||
ColumnLayout {
|
||||
|
||||
// Header
|
||||
RowLayout {
|
||||
// FeatureExtraction node name
|
||||
|
@ -77,12 +76,12 @@ FloatingPane {
|
|||
|
||||
spacing: 4
|
||||
|
||||
// Features visibility toogle (features)
|
||||
// Features visibility toogle
|
||||
MaterialToolButton {
|
||||
id: featuresVisibilityButton
|
||||
checkable: true
|
||||
checked: true
|
||||
text: featuresVisibilityButton.checked ? MaterialIcons.visibility : MaterialIcons.visibility_off
|
||||
text: MaterialIcons.center_focus_strong
|
||||
onClicked: {
|
||||
console.warn("featuresVisibilityButton.checked: " + featuresVisibilityButton.checked)
|
||||
featureType.viewer.displayfeatures = featuresVisibilityButton.checked;
|
||||
|
@ -91,20 +90,30 @@ FloatingPane {
|
|||
opacity: featureType.viewer.visible ? 1.0 : 0.6
|
||||
}
|
||||
|
||||
// Landmarks visibility toogle (sfmData)
|
||||
// Tracks visibility toogle
|
||||
MaterialToolButton {
|
||||
id: tracksVisibilityButton
|
||||
checkable: true
|
||||
checked: true
|
||||
text: MaterialIcons.timeline
|
||||
onClicked: {
|
||||
console.warn("tracksVisibilityButton.checked: " + tracksVisibilityButton.checked)
|
||||
featureType.viewer.displayTracks = tracksVisibilityButton.checked;
|
||||
}
|
||||
font.pointSize: 10
|
||||
}
|
||||
|
||||
// Landmarks visibility toogle
|
||||
MaterialToolButton {
|
||||
id: landmarksVisibilityButton
|
||||
checkable: true
|
||||
checked: true
|
||||
text: checked ? MaterialIcons.location_on : MaterialIcons.location_off
|
||||
text: MaterialIcons.fiber_manual_record
|
||||
onClicked: {
|
||||
console.warn("landmarksVisibilityButton.checked: " + landmarksVisibilityButton.checked)
|
||||
featureType.viewer.displayLandmarks = landmarksVisibilityButton.checked;
|
||||
}
|
||||
font.pointSize: 10
|
||||
// checkable: enabled
|
||||
// enabled: landmarks !== false
|
||||
// opacity: featureType.viewer.visible ? 1.0 : 0.6
|
||||
}
|
||||
|
||||
// ColorChart picker
|
||||
|
@ -118,7 +127,7 @@ FloatingPane {
|
|||
}
|
||||
// Feature type name
|
||||
Label {
|
||||
text: featureType.viewer.describerType + (featureType.viewer.loadingFeatures ? "" : ": " + featureType.viewer.features.length)
|
||||
text: featureType.viewer.describerType + (featureType.viewer.loadingFeatures ? "" : ": " + featureType.viewer.features.length + " / " + featureType.viewer.nbTracks + " / " + featureType.viewer.nbLandmarks )
|
||||
}
|
||||
// Feature loading status
|
||||
Loader {
|
||||
|
|
|
@ -15,7 +15,9 @@ Repeater {
|
|||
/// SfMData to display the data of SfM
|
||||
property var sfmData
|
||||
/// Folder containing the features files
|
||||
property string folder
|
||||
property string featureFolder
|
||||
/// Folder containing the matches files
|
||||
property var tracks
|
||||
/// The list of describer types to load
|
||||
property alias describerTypes: root.model
|
||||
/// List of available display modes
|
||||
|
@ -32,7 +34,8 @@ Repeater {
|
|||
readonly property int colorIndex: (index + colorOffset) % root.colors.length
|
||||
property int colorOffset: 0
|
||||
describerType: modelData
|
||||
folder: root.folder
|
||||
featureFolder: root.featureFolder
|
||||
mtracks: root.tracks
|
||||
viewId: root.viewId
|
||||
color: root.colors[colorIndex]
|
||||
landmarkColor: Colors.red
|
||||
|
|
6
meshroom/ui/qml/Viewer/MTracks.qml
Normal file
6
meshroom/ui/qml/Viewer/MTracks.qml
Normal file
|
@ -0,0 +1,6 @@
|
|||
import QtQuick 2.11
|
||||
import AliceVision 1.0 as AliceVision
|
||||
|
||||
AliceVision.MTracks {
|
||||
id: root
|
||||
}
|
|
@ -231,7 +231,8 @@ FocusScope {
|
|||
setSource("FeaturesViewer.qml", {
|
||||
'viewId': Qt.binding(function() { return _reconstruction.selectedViewId; }),
|
||||
'model': Qt.binding(function() { return _reconstruction.featureExtraction.attribute("describerTypes").value; }),
|
||||
'folder': Qt.binding(function() { return Filepath.stringToUrl(_reconstruction.featureExtraction.attribute("output").value); }),
|
||||
'featureFolder': Qt.binding(function() { return Filepath.stringToUrl(_reconstruction.featureExtraction.attribute("output").value); }),
|
||||
'tracks': Qt.binding(function() { return mtracksLoader.status === Loader.Ready ? mtracksLoader.item : null; }),
|
||||
'sfmData': Qt.binding(function() { return msfmDataLoader.status === Loader.Ready ? msfmDataLoader.item : null; }),
|
||||
})
|
||||
} else {
|
||||
|
@ -314,6 +315,18 @@ FocusScope {
|
|||
})
|
||||
}
|
||||
}
|
||||
Loader {
|
||||
id: mtracksLoader
|
||||
active: displayFeatures.checked // || displaySfmStatsView.checked || displaySfmDataGlobalStats.checked
|
||||
|
||||
Component.onCompleted: {
|
||||
// instantiate and initialize a SfmStatsView component dynamically using Loader.setSource
|
||||
// so it can fail safely if the c++ plugin is not available
|
||||
setSource("MTracks.qml", {
|
||||
'matchingFolder': Qt.binding(function() { return Filepath.stringToUrl(_reconstruction.featureMatching.attribute("output").value); }),
|
||||
})
|
||||
}
|
||||
}
|
||||
Loader {
|
||||
id: sfmStatsView
|
||||
anchors.fill: parent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue