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
2b0c0c4f
Commit
2b0c0c4f
authored
Aug 03, 2021
by
Julia Garriga Ferrer
Browse files
[gui][grainplot] Define dictionary of maps and write maps to file
parent
83d54ce4
Pipeline
#51996
passed with stage
in 2 minutes and 16 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
darfix/gui/grainPlotWidget.py
View file @
2b0c0c4f
...
...
@@ -282,11 +282,22 @@ class GrainPlotWidget(qt.QMainWindow):
"""
Loads the file from a FileDialog.
"""
list_of_maps
=
{}
for
axis
,
dim
in
self
.
dataset
.
dims
:
list_of_maps
[
dim
.
name
]
=
{
Method
.
COM
.
name
:
self
.
_moments
[
axis
][
0
],
Method
.
FWHM
.
name
:
self
.
_moments
[
axis
][
1
],
Method
.
SKEWNESS
.
name
:
self
.
_moments
[
axis
][
2
],
Method
.
KURTOSIS
.
name
:
self
.
_moments
[
axis
][
3
]
}
list_of_maps
[
Method
.
MOSAICITY
.
name
]
=
hsv_to_rgb
(
self
.
_computeMosaicity
())
fileDialog
=
qt
.
QFileDialog
()
fileDialog
.
setFileMode
(
fileDialog
.
AnyFile
)
fileDialog
.
setAcceptMode
(
fileDialog
.
AcceptSave
)
fileDialog
.
setOption
(
fileDialog
.
DontUseNativeDialog
)
fileDialog
.
setDefaultSuffix
(
".h5"
)
# if fileDialog.exec_():
# write_maps(fileDialog.selectedFiles()[0], 'entry',)
\ No newline at end of file
if
fileDialog
.
exec_
():
write_maps
(
fileDialog
.
selectedFiles
()[
0
],
list_of_maps
,
Method
.
MOSAICITY
.
name
,
'entry'
,
1
)
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