Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 778535ea authored by Edward Andò's avatar Edward Andò
Browse files

output F=I in CLQC in filter and fix ereg-discrete with visual

parent 1732ee71
Pipeline #66880 passed with stages
in 27 minutes and 4 seconds
......@@ -122,13 +122,12 @@ if args.PHIFILE is not None:
print("\tZoom")
print("\t\t", decomposedPhiInit['z'])
# We have a registration to apply to all points.
# This is done in 2 steps:
# 1. by copying the registration's little F to the Fs of all points
# 2. by calling the decomposePhi function to compute the translation of each point
for label in range(numberOfLabels):
PhiField[label] = PhiInit.copy()
PhiField[label][0:3, -1] = spam.deformation.decomposePhi(PhiInit.copy(), PhiCentre=PhiFromFile["fieldCoords"][0], PhiPoint=centresOfMass[label])["t"]
PhiField = spam.DIC.applyRegistrationToPoints(PhiInit.copy(),
PhiFromFile["fieldCoords"][0],
centresOfMass,
applyF=args.APPLY_F,
nProcesses=args.PROCESSES,
verbose=False)
# If the read Phi-file contains multiple lines it's an F field!
else:
......
......@@ -141,8 +141,11 @@ class MainWindow(QWidget):
displacementInt[2], displacementInt[2]]))
self.eregWidget = visual.ereg( [REFsubvol, DEFsubvol],
Phi, 1,
["{} - label {}".format(REFstr, nonConvergedGrain), "{} - label {}".format(DEFstr, nonConvergedGrain)], 0)
Phi,
[f"{REFstr} - label {nonConvergedGrain}",
f"{DEFstr} - label {nonConvergedGrain}"],
binning=1,
imUpdate=0)
self.mainWindowGrid.addWidget(self.eregWidget, 1, 1)
self.nextLabelButton = QPushButton("Accept and move on to next grain", self)
self.nextLabelButton.clicked.connect(self.nextLabel)
......
......@@ -221,6 +221,7 @@ elif args.CLQF:
nProcesses=args.PROCESSES,
verbose=True)
# pass the displacements
outputPhiField[inputBad, 0:3, 0:3] = numpy.eye(3)
outputPhiField[inputBad, 0:3, -1] = dispLQC
outputReturnStatus[inputBad] = 1
......
......@@ -211,7 +211,7 @@ def pixelSearchOneNode(nodeNumber):
margin=args.LABEL_DILATE,
labelDilate=args.LABEL_DILATE,
applyF=args.APPLY_F,
volumeThreshold=3**3)
volumeThreshold=args.LABEL_VOLUME_THRESHOLD)
imagetteReturns['imagette2mask'] = None
else:
imagetteReturns = spam.DIC.getImagettes(im1,
......
......@@ -69,6 +69,13 @@ def pixelSearch(parser):
dest='LABEL_DILATE',
help="Only if -lab1 is defined: Number of times to dilate labels. Default = 1")
parser.add_argument('-lvt',
'--label-volume-threshold',
type=numpy.uint,
default=100,
dest='LABEL_VOLUME_THRESHOLD',
help="Volume threshold below which labels are ignored. Default = 100")
parser.add_argument('-mf1',
'--maskFile1',
dest='MASK1',
......@@ -950,13 +957,13 @@ def ddicParser(parser):
dest='PHIFILE_BIN_RATIO',
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")
# PFD now strictly assumed
#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 -cif and requires labels to be aligned between Phi file and labelled image. Default = False")
parser.add_argument('-F',
'--apply-F',
type=str,
default='rigid',
dest='APPLY_F',
help="Apply the F part of Phi guess? Accepted values are:\n\t\"all\": apply all of F" +
"\n\t\"rigid\": apply rigid part (mostly rotation) \n\t\"no\": don't apply it \"rigid\" is default")
parser.add_argument('-m',
'-mar',
......@@ -966,15 +973,6 @@ def ddicParser(parser):
dest='MARGIN',
help="Margin in pixels for the correlation of each local subvolume. Default = 5 px")
#parser.add_argument('-m3',
#'-mar3',
#'-margin3',
#nargs=3,
#type=int,
#default=None,
#dest='MARGIN',
#help="Margin in pixels for the correlation of each local subvolume. Default = 3 px")
parser.add_argument('-it',
'--max-iterations',
type=numpy.uint,
......
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