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 c21c64c7 authored by Gustavo Pinzon's avatar Gustavo Pinzon
Browse files

Fixed bug on spam-ereg-discrete

parent fbad6269
Pipeline #53965 passed with stages
in 24 minutes and 38 seconds
......@@ -85,16 +85,21 @@ class MainWindow(QWidget):
# Issue #192 will be fixed here, by making sure the loew return stat list also has real boundin boxes
# (i.e., grains are really defined)
nonConvergedGrains = DDIC['returnStatus'] < args.RETURN_STAT_THRESHOLD
nonConvergedGrains = DDIC['returnStatus'][0:REFlabBB.shape[0]] < args.RETURN_STAT_THRESHOLD
presentGrains = REFlabBB[:,1]>REFlabBB[:,0]
# In the very unlucky case that there is a nax numbered nonConverged grain that is not present at all:
if REFlabBB.shape[0] < len(nonConvergedGrains):
print("Warning: there are higher-numbered labels in your TSV file that are not in the labelled image, discarding them")
print(numpy.where(nonConvergedGrains), presentGrains)
self.nonConvergedGrains = numpy.where(numpy.logical_and(nonConvergedGrains, presentGrains))[0][0:]
self.N = 0 # Number of the current nonConvergedGrain that's being studied
print("Going to work on these labels:\n", self.nonConvergedGrains, "(p.s. I removed non-existent labels:", numpy.where(~presentGrains)[0][1:]," )")
if len(self.nonConvergedGrains) > 0:
self.labAndPhi = []
self.labelExists = False
print("No labels to work on")
......@@ -120,6 +125,7 @@ class MainWindow(QWidget):
if REFgl is not None:
self.labelExists = True
# 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]))
......@@ -142,10 +148,13 @@ class MainWindow(QWidget):
self.mainWindowGrid.addWidget(self.nextLabelButton, 2, 1)
#print('alignOneGrain(): warning refgl is none')
self.labelExists = False
def nextLabel(self, widgetOpen=True):
if widgetOpen:
def nextLabel(self):
#print("Entering nextLabel(): self.labelExists = ", self.labelExists)
if self.labelExists:
# Get Phi output from graphical
......@@ -154,7 +163,9 @@ class MainWindow(QWidget):
PhiTmp[0:3, -1] += self.diplacementInt
# nonConvergedGrain label number, eye-Phi
self.labAndPhi.append([self.nonConvergedGrains[self.N], PhiTmp])
print("nextLabel: I accepted a Phi for label {}".format([self.nonConvergedGrains[self.N]]))
print("nextLabel: I skipped label {}".format([self.nonConvergedGrains[self.N]]))
# This grain was skipped, let's add nothing in its place
self.labAndPhi.append([self.nonConvergedGrains[self.N], numpy.eye(4)])
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