Commit 828cd14f authored by Gustavo Pinzon's avatar Gustavo Pinzon
Browse files

BinRatio option for regTSV from mergeRegistrationAndDiscreteFields()

parent 677cf728
Pipeline #61551 passed with stages
in 25 minutes and 38 seconds
......@@ -1174,7 +1174,7 @@ def getDisplacementFromNeighbours(labIm, DVC, fileName, method = 'getLabel', cen
print('spam.deformation.deformationField.getDisplacementFromNeighbours(): Missing information in the input TSV. Make sure you are reading iterations, returnStatus, deltaPhiNorm, PSCC, LabelDilate, and error.')
print('spam.deformation.deformationField.getDisplacementFromNeighbours(): Aborting')
def mergeRegistrationAndDiscreteFields(regTSV, discreteTSV, fileName):
def mergeRegistrationAndDiscreteFields(regTSV, discreteTSV, fileName, regTSVBinRatio = 1):
This function merges a registration TSV with a discrete TSV.
Can be used to create the first guess for `spam-ddic`, using the registration over the whole file, and a previous result from `spam-ddic`.
......@@ -1192,6 +1192,9 @@ def mergeRegistrationAndDiscreteFields(regTSV, discreteTSV, fileName):
fileName : string
FileName including full path and .tsv at the end to write
regTSVBinRatio : float, optional
Change translations from regTSV, if it's been calculated on a differently-binned image. Default = 1
......@@ -1211,7 +1214,7 @@ def mergeRegistrationAndDiscreteFields(regTSV, discreteTSV, fileName):
PhiCentre = regTSV['fieldCoords'][0],
PhiPoint = deformPos)['t']
# Add the extra disp to the phi guess
phiGuess[lab][:-1,-1] += extraDisp
phiGuess[lab][:-1,-1] += extraDisp*regTSVBinRatio
# Save
outMatrix = numpy.array([numpy.array(range(discreteTSV['numberOfLabels'])),
Supports Markdown
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