Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
XRD
darfix
Commits
db209a84
Commit
db209a84
authored
Jun 07, 2021
by
Julia Garriga Ferrer
Browse files
[gui][grainplot] Add label to plots and start with COM
parent
4cd01777
Changes
1
Hide whitespace changes
Inline
Side-by-side
darfix/gui/grainPlotWidget.py
View file @
db209a84
...
...
@@ -130,7 +130,6 @@ class GrainPlotWidget(qt.QMainWindow):
self
.
_computeContoursB
.
clicked
.
connect
(
self
.
_computeContours
)
self
.
_methodCB
.
model
().
item
(
4
).
setEnabled
(
True
)
self
.
_methodCB
.
setCurrentIndex
(
4
)
self
.
_updatePlot
(
self
.
_methodCB
.
currentText
())
self
.
_thread
=
OperationThread
(
self
,
self
.
dataset
.
apply_moments
)
self
.
_thread
.
setArgs
(
self
.
indices
)
self
.
_thread
.
finished
.
connect
(
self
.
_updateData
)
...
...
@@ -156,6 +155,7 @@ class GrainPlotWidget(qt.QMainWindow):
rg
=
len
(
Method
)
if
self
.
dataset
.
dims
.
ndim
>
1
else
4
for
i
in
range
(
rg
):
self
.
_methodCB
.
model
().
item
(
i
).
setEnabled
(
True
)
self
.
_methodCB
.
setCurrentIndex
(
0
)
else
:
print
(
"
\n
Computation aborted"
)
...
...
@@ -237,10 +237,10 @@ class GrainPlotWidget(qt.QMainWindow):
xscale
=
(
self
.
dataset
.
transformation
[
0
][
-
1
][
-
1
]
-
px
)
/
len
(
self
.
dataset
.
transformation
[
0
][
0
])
yscale
=
(
self
.
dataset
.
transformation
[
1
][
-
1
][
-
1
]
-
py
)
/
len
(
self
.
dataset
.
transformation
[
1
][
0
])
for
i
,
plot
in
enumerate
(
self
.
_plots
):
plot
.
addImage
(
self
.
_moments
[
i
][
0
],
origin
=
(
px
,
py
),
scale
=
(
xscale
,
yscale
))
plot
.
addImage
(
self
.
_moments
[
i
][
0
],
origin
=
(
px
,
py
),
scale
=
(
xscale
,
yscale
)
,
xlabel
=
'µm'
,
ylabel
=
'µm'
)
else
:
for
i
,
plot
in
enumerate
(
self
.
_plots
):
plot
.
addImage
(
self
.
_moments
[
i
][
0
])
plot
.
addImage
(
self
.
_moments
[
i
][
0
]
,
xlabel
=
'pixels'
,
ylabel
=
'pixels'
)
elif
method
==
Method
.
SKEWNESS
:
self
.
_plotWidget
.
show
()
for
i
,
plot
in
enumerate
(
self
.
_plots
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment