1- __version__ = "3.3 "
1+ __version__ = "4.0 "
22
33from meshroom .core import desc
44from meshroom .core .utils import COLORSPACES , EXR_STORAGE_DATA_TYPE , RAW_COLOR_INTERPRETATION , VERBOSE_LEVEL
55
66import os .path
7+ from pyalicevision import parallelization as avpar
78
89
910def outputImagesValueFunct (attr ):
10- basename = os .path .basename (attr .node .input .value )
11- fileStem = os .path .splitext (basename )[0 ]
12- inputExt = os .path .splitext (basename )[1 ]
1311 outputExt = ('.' + attr .node .extension .value ) if attr .node .extension .value else None
14-
15- if inputExt in ['.abc' , '.sfm' ]:
16- fileStem = '<FILESTEM>' if attr .node .keepImageFilename .value else '<VIEW_ID>'
17- # If we have an SfM in input
18- return "{nodeCacheFolder}/" + fileStem + (outputExt or '.*' )
19-
20- if inputExt :
21- # If we have one or multiple files in input
22- return "{nodeCacheFolder}/" + fileStem + (outputExt or inputExt )
23-
24- if '*' in fileStem :
25- # The fileStem of the input param is a regular expression,
26- # so even if there is no file extension,
27- # we consider that the expression represents files.
28- return "{nodeCacheFolder}/" + fileStem + (outputExt or '.*' )
29-
30- # No extension and no expression means that the input param is a folder path
31- return "{nodeCacheFolder}/" + '*' + (outputExt or '.*' )
12+ fileStem = '<FILESTEM>' if attr .node .keepImageFilename .value else '<VIEW_ID>'
13+ return "{nodeCacheFolder}/" + fileStem + (outputExt or '.*' )
3214
3315
3416class ImageProcessing (desc .AVCommandLineNode ):
3517 commandLine = "aliceVision_imageProcessing {allParams}"
36- size = desc .DynamicNodeSize ("input" )
37- # parallelization = desc.Parallelization(blockSize=40)
38- # commandLineRange = '--rangeStart {rangeStart} --rangeSize {rangeBlockSize}'
18+ size = avpar .DynamicViewsSize ("input" )
19+
20+ parallelization = desc .Parallelization (blockSize = 30 )
21+ commandLineRange = '--rangeIteration {rangeIteration} --rangeBlocksCount {rangeBlocksCount}'
3922
4023 category = "Utils"
4124 documentation = """Convert or apply filtering to the input images."""
@@ -44,25 +27,9 @@ class ImageProcessing(desc.AVCommandLineNode):
4427 desc .File (
4528 name = "input" ,
4629 label = "Input" ,
47- description = "SfMData file input, image filenames or regex(es) on the image file path.\n "
48- "Supported regex:\n "
49- " - '#' matches a single digit.\n "
50- " - '@' matches one or more digits.\n "
51- " - '?' matches one character.\n "
52- " - '*' matches zero character or more." ,
30+ description = "SfMData file input" ,
5331 value = "" ,
5432 ),
55- desc .ListAttribute (
56- elementDesc = desc .File (
57- name = "inputFolder" ,
58- label = "Input Folder" ,
59- description = "Folder containing images." ,
60- value = "" ,
61- ),
62- name = "inputFolders" ,
63- label = "Input Images Folders" ,
64- description = "Use images from specific folder(s)." ,
65- ),
6633 desc .ListAttribute (
6734 elementDesc = desc .StringParam (
6835 name = "metadataFolder" ,
0 commit comments