Commit 0d3540fc authored by Emmanuel Roubin's avatar Emmanuel Roubin
Browse files

[skip-ci] fix mmr sliders linking wrong image

parent 0b03fdc3
Pipeline #46423 passed with stages
in 29 minutes and 20 seconds
......@@ -86,7 +86,7 @@ class MainWindow(QWidget):
tmp.append("{tab}o You can load 4 files:\n{tab2}o Image 1 and Image 2 (tif, mandatory - Gradients computed in im2)\n{tab2}o Phi file and Crop file (tsv, optional)".format(tab=" " * 4, tab2=" " * 12))
tmp.append("{tab}o Phi (im1 -> im2) and Crop files are saved configurations of previous registrations.\n{tab}{tab}They are automatically adapted to the binning level.".format(tab=" " * 4))
tmp.append("{tab}o The first image loaded is the one that is going to be deformed (i.e. interpolated).".format(tab=" " * 4))
tmp.append("{tab}o You can load the files directly with the command line:\n\n{tab2}SPAM MMR-graphical im1.tif im2.tif phi.tsv crop.tsv\n".format(tab=" " * 4, tab2=" " * 12))
tmp.append("{tab}o You can load the files directly with the command line:\n\n{tab2}spam-mmr-graphical im1.tif im2.tif phi.tsv crop.tsv\n".format(tab=" " * 4, tab2=" " * 12))
tmp.append("{tab}o If the files are not loaded with the command line a file manager will pop up\n{tab}{tab}after choosing the binning level.".format(tab=" " * 4))
labelWelcome = QLabel("\n".join(tmp))
grid.addWidget(labelWelcome, 2, 1, 1, 3)
......
......@@ -681,17 +681,17 @@ class ereg(QWidget):
if value < self.im1Slider.maximum() and value > self.im1Slider.minimum():
self.im1Slider.setValue(value)
# check the selected axe
if self.axis == "z": self.slice[1][0] = value
elif self.axis == "y": self.slice[1][1] = value
elif self.axis == "x": self.slice[1][2] = value
if self.axis == "z": self.slice[0][0] = value
elif self.axis == "y": self.slice[0][1] = value
elif self.axis == "x": self.slice[0][2] = value
# change the label with the new value
self.labelSlice1.setText("{}: {}".format(self.axis, self.im1Slider.value()))
# check if the 2slidebars are linked together
if self.slaveBox.isChecked():
self.im2Slider.setValue(value)
if self.axis == "z": self.slice[0][0] = value
elif self.axis == "y": self.slice[0][1] = value
elif self.axis == "x": self.slice[0][2] = value
if self.axis == "z": self.slice[1][0] = value
elif self.axis == "y": self.slice[1][1] = value
elif self.axis == "x": self.slice[1][2] = value
self.labelSlice2.setText("{}: {}".format(self.axis, self.im2Slider.value()))
self.showImages() # call the function to display images
# change the delta string
......@@ -704,15 +704,15 @@ class ereg(QWidget):
# same as the slideIm1() but for other parameters
if value < self.im2Slider.maximum() and value > self.im2Slider.minimum():
self.im2Slider.setValue(value)
if self.axis == "z": self.slice[0][0] = value
elif self.axis == "y": self.slice[0][1] = value
elif self.axis == "x": self.slice[0][2] = value
if self.axis == "z": self.slice[1][0] = value
elif self.axis == "y": self.slice[1][1] = value
elif self.axis == "x": self.slice[1][2] = value
self.labelSlice2.setText("{}: {}".format(self.axis, self.im2Slider.value()))
if self.slaveBox.isChecked():
self.im1Slider.setValue(value)
if self.axis == "z": self.slice[1][0] = value
elif self.axis == "y": self.slice[1][1] = value
elif self.axis == "x": self.slice[1][2] = value
if self.axis == "z": self.slice[0][0] = value
elif self.axis == "y": self.slice[0][1] = value
elif self.axis == "x": self.slice[0][2] = value
self.labelSlice1.setText("{}: {}".format(self.axis, self.im1Slider.value()))
self.showImages()
# self.delta.setText("Delta " + self.axis + ": " + str(self.im2Slider.value() - self.im1Slider.value()))
......
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