replace scalar/vector option with data
vtk does not care 1D data array length
This commit is contained in:
parent
ee38bb0206
commit
f3308dbef6
|
@ -31,13 +31,10 @@ parser.add_option('-r', '--render',
|
||||||
dest = 'render',
|
dest = 'render',
|
||||||
action = 'store_true',
|
action = 'store_true',
|
||||||
help = 'open output in VTK render window')
|
help = 'open output in VTK render window')
|
||||||
parser.add_option('-s', '--scalar', dest='scalar', action='extend',
|
parser.add_option('-d', '--data',
|
||||||
metavar ='<string LIST>',
|
dest = 'data',
|
||||||
help = 'scalar values')
|
|
||||||
parser.add_option('-v', '--vector',
|
|
||||||
dest = 'vector',
|
|
||||||
action = 'extend', metavar = '<string LIST>',
|
action = 'extend', metavar = '<string LIST>',
|
||||||
help = 'vector value label(s)')
|
help = 'scalar/vector value(s) label(s)')
|
||||||
parser.add_option('-t', '--tensor',
|
parser.add_option('-t', '--tensor',
|
||||||
dest = 'tensor',
|
dest = 'tensor',
|
||||||
action = 'extend', metavar = '<string LIST>',
|
action = 'extend', metavar = '<string LIST>',
|
||||||
|
@ -46,8 +43,7 @@ parser.add_option('-c', '--color', dest='color', action='extend',
|
||||||
metavar ='<string LIST>',
|
metavar ='<string LIST>',
|
||||||
help = 'RGB color tuples')
|
help = 'RGB color tuples')
|
||||||
|
|
||||||
parser.set_defaults(scalar = [],
|
parser.set_defaults(data = [],
|
||||||
vector = [],
|
|
||||||
tensor = [],
|
tensor = [],
|
||||||
color = [],
|
color = [],
|
||||||
inplace = False,
|
inplace = False,
|
||||||
|
@ -101,8 +97,7 @@ for name in filenames:
|
||||||
VTKarray = {}
|
VTKarray = {}
|
||||||
active = defaultdict(list)
|
active = defaultdict(list)
|
||||||
|
|
||||||
for datatype,dimension,label in [['scalar',1,options.scalar],
|
for datatype,dimension,label in [['data',99,options.vector],
|
||||||
['vector',99,options.vector],
|
|
||||||
['tensor',9,options.tensor],
|
['tensor',9,options.tensor],
|
||||||
['color' ,3,options.color],
|
['color' ,3,options.color],
|
||||||
]:
|
]:
|
||||||
|
|
|
@ -31,14 +31,10 @@ parser.add_option('-r', '--render',
|
||||||
dest = 'render',
|
dest = 'render',
|
||||||
action = 'store_true',
|
action = 'store_true',
|
||||||
help = 'open output in VTK render window')
|
help = 'open output in VTK render window')
|
||||||
parser.add_option('-s', '--scalar',
|
parser.add_option('-d', '--data',
|
||||||
dest = 'scalar',
|
dest = 'data',
|
||||||
action = 'extend', metavar = '<string LIST>',
|
action = 'extend', metavar = '<string LIST>',
|
||||||
help = 'scalar value label(s)')
|
help = 'scalar/vector value(s) label(s)')
|
||||||
parser.add_option('-v', '--vector',
|
|
||||||
dest = 'vector',
|
|
||||||
action = 'extend', metavar = '<string LIST>',
|
|
||||||
help = 'vector value label(s)')
|
|
||||||
parser.add_option('-t', '--tensor',
|
parser.add_option('-t', '--tensor',
|
||||||
dest = 'tensor',
|
dest = 'tensor',
|
||||||
action = 'extend', metavar = '<string LIST>',
|
action = 'extend', metavar = '<string LIST>',
|
||||||
|
@ -48,8 +44,7 @@ parser.add_option('-c', '--color',
|
||||||
action = 'extend', metavar = '<string LIST>',
|
action = 'extend', metavar = '<string LIST>',
|
||||||
help = 'RGB color tuple label')
|
help = 'RGB color tuple label')
|
||||||
|
|
||||||
parser.set_defaults(scalar = [],
|
parser.set_defaults(data = [],
|
||||||
vector = [],
|
|
||||||
tensor = [],
|
tensor = [],
|
||||||
color = [],
|
color = [],
|
||||||
inplace = False,
|
inplace = False,
|
||||||
|
@ -99,8 +94,7 @@ for name in filenames:
|
||||||
VTKarray = {}
|
VTKarray = {}
|
||||||
active = defaultdict(list)
|
active = defaultdict(list)
|
||||||
|
|
||||||
for datatype,dimension,label in [['scalar',1,options.scalar],
|
for datatype,dimension,label in [['data',99,options.data],
|
||||||
['vector',99,options.vector],
|
|
||||||
['tensor',9,options.tensor],
|
['tensor',9,options.tensor],
|
||||||
['color' ,3,options.color],
|
['color' ,3,options.color],
|
||||||
]:
|
]:
|
||||||
|
|
Loading…
Reference in New Issue