mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-03 08:48:40 +02:00
[node] Add SfMFilter node
Select views using regex
This commit is contained in:
parent
c2d4159cef
commit
2519a57e76
1 changed files with 54 additions and 0 deletions
54
meshroom/nodes/aliceVision/SfMFilter.py
Normal file
54
meshroom/nodes/aliceVision/SfMFilter.py
Normal file
|
@ -0,0 +1,54 @@
|
|||
__version__ = "1.0"
|
||||
|
||||
from meshroom.core import desc
|
||||
from meshroom.core.utils import VERBOSE_LEVEL
|
||||
|
||||
|
||||
class SfMFilter(desc.CommandLineNode):
|
||||
commandLine = 'aliceVision_sfmFilter {allParams}'
|
||||
category = 'Utils'
|
||||
documentation = '''
|
||||
This node allows select views from sfmData file using a regular expresion.
|
||||
'''
|
||||
|
||||
inputs = [
|
||||
desc.File(
|
||||
name="inputFile",
|
||||
label="inputFile",
|
||||
description="SfMData file.",
|
||||
value="",
|
||||
uid=[],
|
||||
),
|
||||
desc.StringParam(
|
||||
name="fileMatchingPattern",
|
||||
label="File Matching Pattern",
|
||||
description="Matching regular expression.\n"
|
||||
"You should capture specific parts of the filepath with parentheses to define matching elements.\n"
|
||||
"Some examples of patterns:\n"
|
||||
" - Match the filename without extension (default value): "
|
||||
r'".*\/(.*?)\.\w{3}"' + "\n"
|
||||
" - Match the filename suffix after \"_\": "
|
||||
r'".*\/.*(_.*?\.\w{3})"' + "\n"
|
||||
" - Match the filename prefix before \"_\": "
|
||||
r'".*\/(.*?)_.*\.\w{3}"',
|
||||
value=r'.*\/(.*?)\.\w{3}',
|
||||
uid=[],
|
||||
),
|
||||
]
|
||||
|
||||
outputs = [
|
||||
desc.File(
|
||||
name="outputSfMData_selected",
|
||||
label="SfMData_selected",
|
||||
description="Output SfMData file containing selected views.",
|
||||
value=desc.Node.internalFolder + "/selectedSfmData.sfm",
|
||||
uid=[],
|
||||
),
|
||||
desc.File(
|
||||
name="outputSfMData_unselected",
|
||||
label="SfMData_unselected",
|
||||
description="Output SfMData file containing remaining views.",
|
||||
value=desc.Node.internalFolder + "/unselectedSfmData.sfm",
|
||||
uid=[],
|
||||
),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue