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

Resolves #186 by implementing spam.helpers.slicePadded in spam-ereg-discrete

parent a20f3f85
Pipeline #51286 failed with stages
in 56 minutes and 18 seconds
......@@ -108,22 +108,24 @@ class MainWindow(QWidget):
Phi[0:3,-1] -= displacementInt
print("\t\tSubtracted this displacement:", displacementInt)
#REFsubvol = REFgrey[REFlabBB[nonConvergedGrain,0]-args.margin : REFlabBB[nonConvergedGrain,1]+1+args.margin,
#REFlabBB[nonConvergedGrain,2]-args.margin : REFlabBB[nonConvergedGrain,3]+1+args.margin,
#REFlabBB[nonConvergedGrain,4]-args.margin : REFlabBB[nonConvergedGrain,5]+1+args.margin]
REFgl = spam.label.getLabel(REFlab, nonConvergedGrain,
boundingBoxes=REFlabBB, centresOfMass=REFlabCOM,
labelDilate=args.LABEL_DILATE, margin=args.margin,
maskOtherLabels=args.MASK)
REFsubvol = REFgrey[REFgl['slice']]
# 2020-10-23: EA on Issue #186: using spam.helpers.slicePadded
REFsubvol = spam.helpers.slicePadded(REFgrey, REFgl['boundingBox']+numpy.array([0,1,0,1,0,1]))
if args.MASK:
# If mask asked, also flatten greylevels
REFsubvol[REFgl['subvol'] == 0] = 0
DEFsubvol = DEFgrey[REFlabBB[nonConvergedGrain,0]+displacementInt[0]-args.margin : REFlabBB[nonConvergedGrain,1]+1+displacementInt[0]+args.margin,
REFlabBB[nonConvergedGrain,2]+displacementInt[1]-args.margin : REFlabBB[nonConvergedGrain,3]+1+displacementInt[1]+args.margin,
REFlabBB[nonConvergedGrain,4]+displacementInt[2]-args.margin : REFlabBB[nonConvergedGrain,5]+1+displacementInt[2]+args.margin]
# 2020-10-23: EA on Issue #186: using spam.helpers.slicePadded
REFsubvol = spam.helpers.slicePadded(REFgrey, REFgl['boundingBox']+numpy.array([0,1,0,1,0,1]))
DEFsubvol = spam.helpers.slicePadded(DEFgrey, REFgl['boundingBox']+
numpy.array([0,1,0,1,0,1])+
numpy.array([displacementInt[0], displacementInt[0],
displacementInt[1], displacementInt[1],
displacementInt[2], displacementInt[2]]))
self.eregWidget = visual.ereg( [REFsubvol, DEFsubvol],
Phi, 1,
......
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