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] Reflect changes made in QtAliceVision refactorize PR #1924

Merged
merged 5 commits into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions meshroom/ui/qml/Viewer/FeaturesInfoOverlay.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ FloatingPane {
property int pluginStatus: Loader.Null
property Item featuresViewer: null
property var mfeatures: null
property var featureExtractionNode: null
property var mtracks: null
property var msfmdata: null

ColumnLayout {
// Header
RowLayout {
// FeatureExtraction node name
// Node used to read features
Label {
text: featureExtractionNode ? featureExtractionNode.label : ""
text: _reconstruction ? _reconstruction.activeNodes.get("featureProvider").node.label : ""
Layout.fillWidth: true
}
// Settings menu
Expand Down Expand Up @@ -157,7 +158,7 @@ FloatingPane {
Layout.alignment: Qt.AlignRight
from: -1
to: 50
value: root.mfeatures.timeWindow
value: root.featuresViewer.timeWindow
stepSize: 1
editable: true

Expand All @@ -174,7 +175,7 @@ FloatingPane {
}

onValueChanged: {
root.mfeatures.timeWindow = timeWindowSB.value;
root.featuresViewer.timeWindow = timeWindowSB.value;
}
}
}
Expand Down Expand Up @@ -224,7 +225,7 @@ FloatingPane {
ToolTip.text: "Display Tracks"
onClicked: {
featureType.viewer.displayTracks = tracksVisibilityButton.checked;
root.mfeatures.enableTimeWindow = tracksVisibilityButton.checked;
root.featuresViewer.enableTimeWindow = tracksVisibilityButton.checked;
}
font.pointSize: 10
}
Expand Down Expand Up @@ -263,18 +264,13 @@ FloatingPane {
}
// Feature type name
Label {
text: {
if(featureType.viewer.loadingFeatures)
return featureType.viewer.describerType;
return featureType.viewer.describerType + ": " +
((featureExtractionNode && featureExtractionNode.isComputed) ? root.mfeatures.featuresInfo[featureType.viewer.describerType][root.mfeatures.currentViewId]['nbFeatures'] : " - ") + " / " +
(root.mfeatures.haveValidTracks ? root.mfeatures.featuresInfo[featureType.viewer.describerType][root.mfeatures.currentViewId]['nbTracks'] : " - ") + " / " +
(root.mfeatures.haveValidLandmarks ? root.mfeatures.featuresInfo[featureType.viewer.describerType][root.mfeatures.currentViewId]['nbLandmarks'] : " - ");
}
property string descType: featureType.viewer.describerType
property int viewId: root.featuresViewer.currentViewId
text: descType + ": " + ((root.mfeatures && root.mfeatures.status === MFeatures.Ready) ? root.mfeatures.nbFeatures(descType, viewId) : " - ") + " / " + ((root.mtracks && root.mtracks.status === MTracks.Ready) ? root.mtracks.nbMatches(descType, viewId) : " - ") + " / " + ((root.msfmdata && root.msfmdata.status === MSfMData.Ready) ? root.msfmdata.nbLandmarks(descType, viewId) : " - ")
}
// Feature loading status
Loader {
active: (root.mfeatures.status === MFeatures.Loading)
active: (root.mfeatures && root.mfeatures.status === MFeatures.Loading)
sourceComponent: BusyIndicator {
padding: 0
implicitWidth: 12
Expand Down
26 changes: 25 additions & 1 deletion meshroom/ui/qml/Viewer/FeaturesViewer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,53 @@ import Utils 1.0
Repeater {
id: root

/// Features to display
/// Features
property var features
/// Tracks
property var tracks
/// SfMData
property var sfmData

/// The list of describer types to load
property alias describerTypes: root.model

/// List of available feature display modes
readonly property var featureDisplayModes: ['Points', 'Squares', 'Oriented Squares']
/// Current feature display mode index
property int featureDisplayMode: 2

/// List of available track display modes
readonly property var trackDisplayModes: ['Lines Only', 'Current Matches', 'All Matches']
/// Current track display mode index
property int trackDisplayMode: 1

// Minimum feature scale score to display
property real featureMinScaleFilter: 0
// Maximum feature scale score to display
property real featureMaxScaleFilter: 1

/// Display 3d tracks
property bool display3dTracks: false

/// Display only contiguous tracks
property bool trackContiguousFilter: true

/// Display only tracks with at least one inlier
property bool trackInliersFilter: false

/// Display track endpoints
property bool displayTrackEndpoints: true

/// The list of colors used for displaying several describers
property var colors: [Colors.blue, Colors.green, Colors.yellow, Colors.cyan, Colors.pink, Colors.lime] //, Colors.orange, Colors.red

/// Current view ID
property var currentViewId

/// Time window
property bool enableTimeWindow: false
property int timeWindow: 1

model: root.describerTypes

// instantiate one FeaturesViewer by describer type
Expand All @@ -56,6 +75,11 @@ Repeater {
matchColor: Colors.orange
landmarkColor: Colors.red
describerType: modelData
currentViewId: root.currentViewId
enableTimeWindow: root.enableTimeWindow
timeWindow: root.timeWindow
mfeatures: root.features
mtracks: root.tracks
msfmData: root.sfmData
}
}
Loading