[core] split Param into specific types and update nodes accordingly

This commit is contained in:
Fabien Castan 2017-10-16 10:56:05 +02:00
parent 931ad23f50
commit 287c0f13ce
16 changed files with 558 additions and 501 deletions

View file

@ -1,55 +1,58 @@
import sys
from meshroom.core import desc
class ImageMatching(desc.CommandLineNode):
internalFolder = '{cache}/{nodeType}/{uid0}/'
commandLine = 'openMVG_main_generatePairList {allParams}'
commandLine = 'aliceVision_imageMatching {allParams}'
verbose = desc.ParamAttribute(
label='Verbose',
description='''Verbosity level, 0 to mute.''',
value=1,
shortName='v',
arg='arg',
uid=[0],
)
weights = desc.FileAttribute(
label='Weights',
description='''Input name for the weight file, if not provided the weights will be computed on the database built with the provided set.''',
input = desc.File(
label='Input',
description='''SfMData file or filepath to a simple text file with one image filepath per line, or path to the descriptors folder.''',
value='',
shortName='w',
arg='arg',
uid=[0],
isOutput=False,
)
tree = desc.FileAttribute(
tree = desc.File(
label='Tree',
description='''Input name for the tree file''',
description='''Input name for the vocabulary tree file.''',
value='',
shortName='t',
arg='arg',
uid=[0],
isOutput=False,
)
keylist = desc.FileAttribute(
label='Keylist',
description='''Path to the list file (list.txt or sfm_data) generated by OpenMVG or the path to a directory containing the descriptors.''',
value='',
shortName='l',
arg='arg',
uid=[0],
output = desc.File(
label='Output',
description='''Filepath to the output file with the list of selected image pairs. Optional parameters:''',
value='{cache}/{nodeType}/{uid0}/',
uid=[],
isOutput=True,
)
nbMaxDescriptors = desc.ParamAttribute(
label='Nb Max Descriptors',
maxDescriptors = desc.IntParam(
label='Max Descriptors',
description='''Limit the number of descriptors you load per image. Zero means no limit.''',
value=0,
shortName='m',
arg='arg',
value=500,
range=(-sys.maxsize, sys.maxsize, 1),
uid=[0],
)
outfile = desc.FileAttribute(
label='Outfile',
description='''(=pairList.txt) Name of the output file.''',
nbMatches = desc.IntParam(
label='Nb Matches',
description='''The number of matches to retrieve for each image (If 0 it will retrieve all the matches).''',
value=50,
range=(-sys.maxsize, sys.maxsize, 1),
uid=[0],
)
weights = desc.File(
label='Weights',
description='''Input name for the weight file, if not provided the weights will be computed on the database built with the provided set. Log parameters:''',
value='',
shortName='o',
arg='arg',
uid=[0],
isOutput=False,
)
verboseLevel = desc.ChoiceParam(
label='Verbose Level',
description='''verbosity level (fatal, error, warning, info, debug, trace).''',
value='info',
values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'],
exclusive=True,
uid=[0],
)