Commit d57e6bdd authored by Edward Andò's avatar Edward Andò
Browse files

Finally, after six months... Merge branch 'splitScripts'

parents aaf87e58 17206f39
Pipeline #66247 passed with stages
in 26 minutes and 51 seconds
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -27,11 +27,9 @@ field, if there is a homogeneous background movement to measure
import numpy
import argparse
#import spam.helpers
#import spam.mesh
#import spam.label
import spam.helpers
import spam.DIC
#import spam.deformation
import spam.deformation
import tifffile
import os
......@@ -44,12 +42,11 @@ parser = argparse.ArgumentParser(description="spam-register "+spam.helpers.optio
# Parse arguments with external helper function
args = spam.helpers.optionsParser.register(parser)
print("Current Settings:")
print("spam-reg -- Current Settings:")
argsDict = vars(args)
for key in sorted(argsDict):
print("\t{}: {}".format(key, argsDict[key]))
# Load reference image
im1 = tifffile.imread(args.im1.name)
......@@ -92,6 +89,7 @@ if args.INTERPOLATION_ORDER == 1:
else:
interpolator = 'python'
regReturns = spam.DIC.correlate.registerMultiscale(im1,
im2,
args.BIN_BEGIN, binStop=args.BIN_END,
......@@ -115,7 +113,8 @@ if regReturns['returnStatus'] == 1:
print("\n\nRegistration hit max iterations, OK... saving")
if regReturns['returnStatus'] > 0 and args.DEF:
tifffile.imsave(args.OUT_DIR+"/"+os.path.splitext(os.path.basename(args.im1.name))[0]+'-reg-def.tif', spam.DIC.applyPhi(im1, Phi=regReturns['Phi']))
tifffile.imsave(args.OUT_DIR+"/"+os.path.splitext(os.path.basename(args.im1.name))[0]+'-reg-def.tif',
spam.DIC.applyPhi(im1, Phi=regReturns['Phi']).astype(im1.dtype))
if regReturns['returnStatus'] < 0:
print("\n\nWe're saving this registration but we don't trust it at all")
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
__all__ = ["correlate", "correlateGM", "deform", "grid"]
__all__ = ["correlate", "correlateGM", "deform", "grid", "kinematics"]
from .correlate import *
from .grid import *
from .correlateGM import *
from .deform import *
from .kinematics import *
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment