help="Ratio of binning level between loaded Phi file and current calculation. If the input Phi file has been obtained on a 500x500x500 image and now the calculation is on 1000x1000x1000, this should be 2. Default = 1")
parser.add_argument('-pfd',
'--phiFile-direct',
action="store_true",
#default=1,
dest='PHIFILE_DIRECT',
help="Trust the Phi file completely? This option ignores and overrides -pfni and requires same nodes in same positions. Default = False")
parser.add_argument('-pfni',
'--neighbours-for-phi-field-interpolation',
type=int,
...
...
@@ -2101,32 +2108,9 @@ def pixelSearch(parser):
ifnotos.path.isdir(args.OUT_DIR):
raise
# Catch interdependent node spacing and correlation window sizes
ifargs.NSisNone:
print("\nUsing default node spacing: "),
ifargs.HWSisNone:
print("2x default half window size"),
args.HWS=[10]
print("({}) which is".format(args.HWS[0])),
args.NS=[args.HWS[0]*2]
else:
print("2x user-set half window size"),
iflen(args.HWS)==1:
print("({}) which is".format(args.HWS[0])),
args.NS=[int(args.HWS[0]*2)]
eliflen(args.HWS)==3:
print("({} -- selecting smallest) which is".format(args.HWS)),
args.NS=[int(min(args.HWS)*2)]
print(args.NS)
# Catch 3D options
iflen(args.NS)==1:
args.NS=[args.NS[0],args.NS[0],args.NS[0]]
iflen(args.HWS)==1:
args.HWS=[args.HWS[0],args.HWS[0],args.HWS[0]]
ifargs.LAB1isnotNone:
# We have a labelled image and so no nodeSpacing or halfWindowSize
print("I have been passed a labelled image and so I am disactivating node spacing and half-window size and mask and setting mask coverage to 0")
args.HWS=None
args.NS=None
...
...
@@ -2136,12 +2120,39 @@ def pixelSearch(parser):
iftwoD:
args.SEARCH_RANGE[0]=0
args.SEARCH_RANGE[1]=0
# Catch and overwrite 2D options
eliftwoD:
args.NS[0]=1
args.HWS[0]=0
args.SEARCH_RANGE[0]=0
args.SEARCH_RANGE[1]=0
else:
# We are in grid, with a nodeSpacing and halfWindowSize
# Catch interdependent node spacing and correlation window sizes
ifargs.NSisNone:
print("\nUsing default node spacing: "),
ifargs.HWSisNone:
print("2x default half window size"),
args.HWS=[10]
print("({}) which is".format(args.HWS[0])),
args.NS=[args.HWS[0]*2]
else:
print("2x user-set half window size"),
iflen(args.HWS)==1:
print("({}) which is".format(args.HWS[0])),
args.NS=[int(args.HWS[0]*2)]
eliflen(args.HWS)==3:
print("({} -- selecting smallest) which is".format(args.HWS)),