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

Show generated images in 2D viewer when double-clicking on node #1776

Merged
merged 30 commits into from
Oct 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
fc5ab54
added outputImageTypes in node desc to update the viewer2D imageType …
mugulmd Sep 16, 2022
a574c0f
use semantic field in file attributes to specify images and store dis…
mugulmd Sep 20, 2022
b4f0b53
added some comments
mugulmd Sep 21, 2022
22226d5
applied visualization workflow to PrepareDenseScene
mugulmd Sep 21, 2022
e35c5a7
[ui] adapt combobox width to contained attr names
mugulmd Sep 23, 2022
592dc11
[ui] check node is computed or running before loading in viewer2D
mugulmd Sep 23, 2022
4e19cf4
[ui] update selected view from grid when using keys
mugulmd Sep 23, 2022
f1c6b48
[ui] ensure viewpoints are always accessible in 2D viewer using combobox
mugulmd Sep 23, 2022
f90942b
[ui] only load in 2D viewer nodes that output images
mugulmd Sep 23, 2022
9de858e
[ui] minor code cleanup
mugulmd Sep 23, 2022
b1a800d
[ui] fix outputAttribute.name property updating
mugulmd Sep 26, 2022
f899e24
[ui] replaced depthMapNodeName Label with displayedNodeName Label
mugulmd Sep 26, 2022
44c0086
[ui] always enable outputAttribute ComboBox
mugulmd Sep 27, 2022
6b7d4d6
[ui] prevent loading image output attributes in 3D viewer
mugulmd Sep 27, 2022
8abe45d
[ui] update outputAttributes when displayedNode is undefined
mugulmd Sep 27, 2022
400c68a
[ui] do nothing when double clicking attribute
mugulmd Sep 27, 2022
a36abd9
[ui] disable outputAttributes ComboBox when it is empty
mugulmd Sep 28, 2022
a94be6c
[nodes] update desc for nodes in panoramaHDR pipeline to visualize th…
mugulmd Sep 28, 2022
38b1caf
[node] PanoramaWarping: add visualization for mask and weight maps
mugulmd Sep 29, 2022
c714495
[ui] use label instead of name in outputAttribute ComboBox
mugulmd Sep 29, 2022
b91d0b3
[ui] only load nodes in Viewer2D when at least one chunk is finished
mugulmd Sep 29, 2022
88e822a
[ui] fix drag and drop external images on Viewer2D
mugulmd Sep 29, 2022
91cc786
[ui] coherent naming "Image Gallery" across app
mugulmd Sep 30, 2022
a5fbbe7
[node] output labels renaming without 'Output' prefix
mugulmd Sep 30, 2022
18b5f4b
[ui] always display at least "Image Gallery" in ComboBox
mugulmd Oct 7, 2022
0496f0c
[ui] button to clear node from 2d viewer
mugulmd Oct 7, 2022
72218ed
[ui] minor fix
mugulmd Oct 7, 2022
426cdbe
[ui] use tempCameraInit node to get viewpoints when it exists
mugulmd Oct 10, 2022
61a10a2
[ui] fix metadata display bug
mugulmd Oct 10, 2022
0424ae1
[nodes] LdrToHdrCalibration: fix trailing space in label
fabiencastan Oct 18, 2022
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
8 changes: 8 additions & 0 deletions meshroom/core/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,9 @@ def isRunning(self):
def isStopped(self):
return self._status.status == Status.STOPPED

def isFinished(self):
return self._status.status == Status.SUCCESS

def process(self, forceCompute=False):
if not forceCompute and self._status.status == Status.SUCCESS:
logging.info("Node chunk already computed: {}".format(self.name))
Expand Down Expand Up @@ -752,6 +755,11 @@ def isFinishedOrRunning(self):
""" Return True if all chunks of this Node is either finished or running, False otherwise. """
return all(chunk.isFinishedOrRunning() for chunk in self._chunks)

@Slot(result=bool)
def isPartiallyFinished(self):
""" Return True is at least one chunk of this Node is finished, False otherwise. """
return any(chunk.isFinished() for chunk in self._chunks)

def alreadySubmittedChunks(self):
return [ch for ch in self._chunks if ch.isAlreadySubmitted()]

Expand Down
4 changes: 2 additions & 2 deletions meshroom/nodes/aliceVision/CameraLocalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,14 @@ class CameraLocalization(desc.CommandLineNode):
outputs = [
desc.File(
name='outputAlembic',
label='Output Alembic',
label='Alembic',
description='''Filename for the SfMData export file (where camera poses will be stored)''',
value=desc.Node.internalFolder + 'trackedCameras.abc',
uid=[],
),
desc.File(
name='outputJSON',
label='Output JSON',
label='JSON',
description='''Filename for the localization results as .json''',
value=desc.Node.internalFolder + 'trackedCameras.json',
uid=[],
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/CameraRigCalibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class CameraRigCalibration(desc.CommandLineNode):
outputs = [
desc.File(
name='outfile',
label='Output File',
label='File',
description='''The name of the file where to store the calibration data''',
value=desc.Node.internalFolder + 'cameraRigCalibration.rigCal',
uid=[],
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/CameraRigLocalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class CameraRigLocalization(desc.CommandLineNode):
outputs = [
desc.File(
name='outputAlembic',
label='Output Alembic',
label='Alembic',
description='''Filename for the SfMData export file (where camera poses will be stored).''',
value=desc.Node.internalFolder + 'trackedcameras.abc',
uid=[],
Expand Down
4 changes: 2 additions & 2 deletions meshroom/nodes/aliceVision/ColorCheckerCorrection.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ class ColorCheckerCorrection(desc.CommandLineNode):
outputs = [
desc.File(
name='outSfMData',
label='Output sfmData',
label='SfmData',
description='Output sfmData.',
value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in ['.abc', '.sfm']) else '',
uid=[],
group='', # do not export on the command line
),
desc.File(
name='output',
label='Output Folder',
label='Folder',
description='Output Images Folder.',
value=desc.Node.internalFolder,
uid=[],
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/ConvertMesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ConvertMesh(desc.CommandLineNode):
outputs = [
desc.File(
name='output',
label='Output Mesh',
label='Mesh',
description='''Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).''',
value=desc.Node.internalFolder + 'mesh.' + '{outputMeshFileTypeValue}',
uid=[],
Expand Down
23 changes: 22 additions & 1 deletion meshroom/nodes/aliceVision/DepthMap.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,30 @@ class DepthMap(desc.CommandLineNode):
outputs = [
desc.File(
name='output',
label='Output',
label='Folder',
description='Output folder for generated depth maps.',
value=desc.Node.internalFolder,
uid=[],
),
# these attributes are only here to describe more accurately the output of the node
# by specifying that it generates 2 sequences of images
# (see in Viewer2D.qml how these attributes can be used)
desc.File(
name='depth',
label='Depth Maps',
description='Generated depth maps.',
semantic='image',
Copy link
Member

Choose a reason for hiding this comment

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

semantic=desc.Semantic.Image,

Copy link
Contributor Author

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)

value=desc.Node.internalFolder + '<VIEW_ID>_depthMap.exr',
uid=[],
group='', # do not export on the command line
),
desc.File(
name='sim',
label='Sim Maps',
description='Generated sim maps.',
semantic='image',
value=desc.Node.internalFolder + '<VIEW_ID>_simMap.exr',
uid=[],
group='', # do not export on the command line
),
]
21 changes: 21 additions & 0 deletions meshroom/nodes/aliceVision/DepthMapFilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,25 @@ class DepthMapFilter(desc.CommandLineNode):
value=desc.Node.internalFolder,
uid=[],
),
# these attributes are only here to describe more accurately the output of the node
# by specifying that it generates 2 sequences of images
# (see in Viewer2D.qml how these attributes can be used)
desc.File(
name='depth',
label='Depth Maps',
description='Filtered depth maps.',
semantic='image',
value=desc.Node.internalFolder + '<VIEW_ID>_depthMap.exr',
uid=[],
group='', # do not export on the command line
),
desc.File(
name='sim',
label='Sim Maps',
description='Filtered sim maps.',
semantic='image',
value=desc.Node.internalFolder + '<VIEW_ID>_simMap.exr',
uid=[],
group='', # do not export on the command line
),
]
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/DistortionCalibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class DistortionCalibration(desc.CommandLineNode):
outputs = [
desc.File(
name='outSfMData',
label='Output SfmData File',
label='SfmData File',
description='Path to the output sfmData file',
value=desc.Node.internalFolder + 'sfmData.sfm',
uid=[],
Expand Down
6 changes: 3 additions & 3 deletions meshroom/nodes/aliceVision/ExportAnimatedCamera.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,22 @@ class ExportAnimatedCamera(desc.CommandLineNode):
outputs = [
desc.File(
name='output',
label='Output filepath',
label='Filepath',
description='Output filepath for the alembic animated camera.',
value=desc.Node.internalFolder,
uid=[],
),
desc.File(
name='outputCamera',
label='Output Camera Filepath',
label='Camera Filepath',
description='Output filename for the alembic animated camera.',
value=desc.Node.internalFolder + 'camera.abc',
group='', # exclude from command line
uid=[],
),
desc.File(
name='outputUndistorted',
label='Output Undistorted images Filepath',
label='Undistorted images Filepath',
description='Output Undistorted images.',
value=desc.Node.internalFolder + 'undistort',
group='', # exclude from command line
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/ExportColoredPointCloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ExportColoredPointCloud(desc.CommandLineNode):
outputs = [
desc.File(
name='output',
label='Output Point Cloud Filepath',
label='Point Cloud Filepath',
description='Output point cloud with visibilities as SfMData file.',
value="{cache}/{nodeType}/{uid0}/pointCloud.abc",
uid=[],
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/ExportMatches.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class ExportMatches(desc.CommandLineNode):
outputs = [
desc.File(
name='output',
label='Output Folder',
label='Folder',
description='Output path for the features and descriptors files (*.feat, *.desc).',
value=desc.Node.internalFolder,
uid=[],
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/ExportMaya.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ExportMaya(desc.CommandLineNode):
outputs = [
desc.File(
name='output',
label='Output Folder',
label='Folder',
description='Folder for MeshroomMaya outputs: undistorted images and thumbnails.',
value=desc.Node.internalFolder,
uid=[],
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/FeatureRepeatability.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class FeatureRepeatability(desc.CommandLineNode):
outputs = [
desc.File(
name='output',
label='Output Folder',
label='Folder',
description='Output path for the features and descriptors files (*.feat, *.desc).',
value=desc.Node.internalFolder,
uid=[],
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/GlobalSfM.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class GlobalSfM(desc.CommandLineNode):
),
desc.File(
name='extraInfoFolder',
label='Output Folder',
label='Folder',
description='Folder for intermediate reconstruction files and additional reconstruction information files.',
value=desc.Node.internalFolder,
uid=[],
Expand Down
4 changes: 2 additions & 2 deletions meshroom/nodes/aliceVision/ImageMatchingMultiSfM.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,14 @@ class ImageMatchingMultiSfM(desc.CommandLineNode):
outputs = [
desc.File(
name='output',
label='Output List File',
label='List File',
description='Filepath to the output file with the list of selected image pairs.',
value=desc.Node.internalFolder + 'imageMatches.txt',
uid=[],
),
desc.File(
name='outputCombinedSfM',
label='Output Combined SfM',
label='Combined SfM',
description='Path for the combined SfMData file',
value=desc.Node.internalFolder + 'combineSfM.sfm',
uid=[],
Expand Down
9 changes: 5 additions & 4 deletions meshroom/nodes/aliceVision/ImageProcessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def outputImagesValueFunct(attr):

if inputExt in ['.abc', '.sfm']:
# If we have an SfM in input
return desc.Node.internalFolder + '*' + (outputExt or '.*')
return desc.Node.internalFolder + '<VIEW_ID>' + (outputExt or '.*')

if inputExt:
# if we have one or multiple files in input
Expand Down Expand Up @@ -325,23 +325,24 @@ class ImageProcessing(desc.CommandLineNode):
outputs = [
desc.File(
name='outSfMData',
label='Output sfmData',
label='SfmData',
description='Output sfmData.',
value=lambda attr: (desc.Node.internalFolder + os.path.basename(attr.node.input.value)) if (os.path.splitext(attr.node.input.value)[1] in ['.abc', '.sfm']) else '',
uid=[],
group='', # do not export on the command line
),
desc.File(
name='output',
label='Output Folder',
label='Folder',
description='Output Images Folder.',
value=desc.Node.internalFolder,
uid=[],
),
desc.File(
name='outputImages',
label='Output Images',
label='Images',
description='Output Image Files.',
semantic='image',
value= outputImagesValueFunct,
group='', # do not export on the command line
uid=[],
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/KeyframeSelection.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class KeyframeSelection(desc.CommandLineNode):
outputs = [
desc.File(
name='outputFolder',
label='Output Folder',
label='Folder',
description='''Output keyframes folder for extracted frames.''',
value=desc.Node.internalFolder,
uid=[],
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/LdrToHdrCalibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class LdrToHdrCalibration(desc.CommandLineNode):
outputs = [
desc.File(
name='response',
label='Output response File',
label='Response File',
description='Path to the output response file',
value=desc.Node.internalFolder + 'response.csv',
uid=[],
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/LdrToHdrMerge.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class LdrToHdrMerge(desc.CommandLineNode):
outputs = [
desc.File(
name='outSfMData',
label='Output SfMData File',
label='SfMData File',
description='Path to the output sfmdata file',
value=desc.Node.internalFolder + 'sfmData.sfm',
uid=[],
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/LdrToHdrSampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class LdrToHdrSampling(desc.CommandLineNode):
outputs = [
desc.File(
name='output',
label='Output Folder',
label='Folder',
description='Output path for the samples.',
value=desc.Node.internalFolder,
uid=[],
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/LightingEstimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class LightingEstimation(desc.CommandLineNode):
outputs = [
desc.File(
name='output',
label='Output Folder',
label='Folder',
description='Folder for output lighting vector files.',
value=desc.Node.internalFolder,
uid=[],
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/MergeMeshes.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class MergeMeshes(desc.CommandLineNode):
outputs = [
desc.File(
name='output',
label='Output mesh',
label='Mesh',
description='''Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).''',
value=desc.Node.internalFolder + 'mesh.stl',
uid=[],
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/MeshDecimate.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class MeshDecimate(desc.CommandLineNode):
outputs = [
desc.File(
name="output",
label="Output mesh",
label="Mesh",
description="Output mesh (OBJ file format).",
value=desc.Node.internalFolder + 'mesh.obj',
uid=[],
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/MeshMasking.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class MeshMasking(desc.CommandLineNode):
outputs = [
desc.File(
name='outputMesh',
label='Output Mesh',
label='Mesh',
description='''Output mesh.''',
value=desc.Node.internalFolder + 'mesh.{outputMeshFileTypeValue}',
uid=[],
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/MeshResampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class MeshResampling(desc.CommandLineNode):
outputs = [
desc.File(
name="output",
label="Output mesh",
label="Mesh",
description="Output mesh (OBJ file format).",
value=desc.Node.internalFolder + 'mesh.obj',
uid=[],
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/PanoramaCompositing.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class PanoramaCompositing(desc.CommandLineNode):
outputs = [
desc.File(
name='output',
label='Output Folder',
label='Folder',
description='',
value=desc.Node.internalFolder,
uid=[],
Expand Down
4 changes: 2 additions & 2 deletions meshroom/nodes/aliceVision/PanoramaEstimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,14 @@ class PanoramaEstimation(desc.CommandLineNode):
outputs = [
desc.File(
name='output',
label='Output SfMData File',
label='SfMData File',
description='Path to the output sfmdata file',
value=desc.Node.internalFolder + 'panorama.abc',
uid=[],
),
desc.File(
name='outputViewsAndPoses',
label='Output Poses',
label='Poses',
description='''Path to the output sfmdata file with cameras (views and poses).''',
value=desc.Node.internalFolder + 'cameras.sfm',
uid=[],
Expand Down
2 changes: 1 addition & 1 deletion meshroom/nodes/aliceVision/PanoramaInit.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class PanoramaInit(desc.CommandLineNode):
outputs = [
desc.File(
name='outSfMData',
label='Output SfMData File',
label='SfMData File',
description='Path to the output sfmdata file',
value=desc.Node.internalFolder + 'sfmData.sfm',
uid=[],
Expand Down
Loading