tomwer 1.0.3__py3-none-any.whl → 1.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. orangecontrib/tomwer/tutorials/EBS_tomo_listener.ows +39 -0
  2. orangecontrib/tomwer/tutorials/cast_volume.ows +34 -0
  3. orangecontrib/tomwer/tutorials/simple_slice_reconstruction.ows +39 -0
  4. orangecontrib/tomwer/tutorials/simple_volume_local_reconstruction.ows +49 -0
  5. orangecontrib/tomwer/tutorials/simple_volume_to_slurm_reconstruction.ows +59 -0
  6. orangecontrib/tomwer/tutorials/using_saaxis_to_find_cor.ows +44 -0
  7. orangecontrib/tomwer/widgets/cluster/FutureSupervisorOW.py +1 -1
  8. orangecontrib/tomwer/widgets/cluster/SlurmClusterOW.py +14 -4
  9. orangecontrib/tomwer/widgets/cluster/__init__.py +1 -1
  10. orangecontrib/tomwer/widgets/control/DataListOW.py +12 -5
  11. orangecontrib/tomwer/widgets/control/DataListenerOW.py +18 -9
  12. orangecontrib/tomwer/widgets/control/DataSelectorOW.py +13 -6
  13. orangecontrib/tomwer/widgets/control/DataTransfertOW.py +3 -5
  14. orangecontrib/tomwer/widgets/control/DataValidatorOW.py +8 -4
  15. orangecontrib/tomwer/widgets/control/DataWatcherOW.py +4 -6
  16. orangecontrib/tomwer/widgets/control/EDF2NXTomomillOW.py +49 -62
  17. orangecontrib/tomwer/widgets/control/FilterOW.py +2 -4
  18. orangecontrib/tomwer/widgets/control/NXTomomillMixIn.py +93 -0
  19. orangecontrib/tomwer/widgets/control/NXTomomillOW.py +135 -129
  20. orangecontrib/tomwer/widgets/control/NotifierOW.py +34 -9
  21. orangecontrib/tomwer/widgets/control/SingleTomoObjOW.py +3 -5
  22. orangecontrib/tomwer/widgets/control/TomoObjSerieOW.py +19 -13
  23. orangecontrib/tomwer/widgets/control/VolumeSelector.py +12 -4
  24. orangecontrib/tomwer/widgets/control/VolumeSymLinkOW.py +11 -7
  25. orangecontrib/tomwer/widgets/control/icons/notification.svg +4 -4
  26. orangecontrib/tomwer/widgets/control/icons/nxtomomill.png +0 -0
  27. orangecontrib/tomwer/widgets/control/icons/nxtomomill.svg +8 -5
  28. orangecontrib/tomwer/widgets/control/icons/tomoobjserie.png +0 -0
  29. orangecontrib/tomwer/widgets/control/icons/tomoobjserie.svg +73 -78
  30. orangecontrib/tomwer/widgets/edit/DarkFlatPatchOW.py +16 -4
  31. orangecontrib/tomwer/widgets/edit/NXtomoEditorOW.py +100 -0
  32. orangecontrib/tomwer/widgets/edit/icons/image_key_editor.png +0 -0
  33. orangecontrib/tomwer/widgets/edit/icons/image_key_upgrader.png +0 -0
  34. orangecontrib/tomwer/widgets/edit/icons/nx_tomo_editor.png +0 -0
  35. orangecontrib/tomwer/widgets/edit/icons/nx_tomo_editor.svg +123 -0
  36. orangecontrib/tomwer/widgets/edit/test/test_dark_flat_patch.py +21 -1
  37. orangecontrib/tomwer/widgets/edit/test/test_image_key_editor.py +1 -1
  38. orangecontrib/tomwer/widgets/edit/test/test_image_key_upgrader.py +1 -1
  39. orangecontrib/tomwer/widgets/edit/test/test_nxtomo_editor.py +25 -0
  40. orangecontrib/tomwer/widgets/other/PythonScriptOW.py +19 -11
  41. orangecontrib/tomwer/widgets/reconstruction/AxisOW.py +20 -14
  42. orangecontrib/tomwer/widgets/reconstruction/CastNabuVolumeOW.py +24 -10
  43. orangecontrib/tomwer/widgets/reconstruction/DarkRefAndCopyOW.py +26 -21
  44. orangecontrib/tomwer/widgets/reconstruction/NabuOW.py +29 -12
  45. orangecontrib/tomwer/widgets/reconstruction/NabuVolumeOW.py +44 -17
  46. orangecontrib/tomwer/widgets/reconstruction/SAAxisOW.py +28 -20
  47. orangecontrib/tomwer/widgets/reconstruction/SADeltaBetaOW.py +24 -18
  48. orangecontrib/tomwer/widgets/reconstruction/SinoNormOW.py +6 -6
  49. orangecontrib/tomwer/widgets/reconstruction/TofuOW.py +4 -2
  50. orangecontrib/tomwer/widgets/reconstruction/icons/nabu_2d.png +0 -0
  51. orangecontrib/tomwer/widgets/reconstruction/icons/nabu_2d.svg +11 -8
  52. orangecontrib/tomwer/widgets/visualization/DataViewerOW.py +10 -4
  53. orangecontrib/tomwer/widgets/visualization/DiffViewerOW.py +1 -1
  54. orangecontrib/tomwer/widgets/visualization/NXtomoMetadataViewerOW.py +69 -0
  55. orangecontrib/tomwer/widgets/visualization/SampleMovedOW.py +2 -4
  56. orangecontrib/tomwer/widgets/visualization/icons/nx_tomo_metadata_viewer.png +0 -0
  57. orangecontrib/tomwer/widgets/visualization/icons/nx_tomo_metadata_viewer.svg +105 -0
  58. tomwer/__main__.py +10 -5
  59. tomwer/app/canvas_launcher/config.py +10 -10
  60. tomwer/app/canvas_launcher/mainwindow.py +68 -6
  61. tomwer/app/canvas_launcher/widgetsscheme.py +1 -3
  62. tomwer/app/darkref.py +16 -12
  63. tomwer/app/imagekeyeditor.py +2 -2
  64. tomwer/app/imagekeyupgrader.py +104 -0
  65. tomwer/app/intensitynormalization.py +0 -1
  66. tomwer/app/nxtomoeditor.py +103 -0
  67. tomwer/app/rsync.py +1 -1
  68. tomwer/core/cluster/cluster.py +1 -1
  69. tomwer/core/futureobject.py +1 -0
  70. tomwer/core/process/control/datalistener/datalistener.py +7 -1
  71. tomwer/core/process/control/datalistener/rpcserver.py +3 -4
  72. tomwer/core/process/control/datawatcher/datawatcher.py +18 -18
  73. tomwer/core/process/control/datawatcher/datawatcherobserver.py +5 -8
  74. tomwer/core/process/control/datawatcher/datawatcherprocess.py +2 -3
  75. tomwer/core/process/control/datawatcher/edfdwprocess.py +2 -2
  76. tomwer/core/process/control/nxtomomill.py +33 -58
  77. tomwer/core/process/control/scanlist.py +2 -1
  78. tomwer/core/process/control/scanselector.py +7 -0
  79. tomwer/core/process/control/scantransfer.py +2 -2
  80. tomwer/core/process/control/scanvalidator.py +6 -5
  81. tomwer/core/process/control/singletomoobj.py +2 -1
  82. tomwer/core/process/control/timer.py +2 -1
  83. tomwer/core/process/control/tomoobjserie.py +8 -2
  84. tomwer/core/process/control/volumeselector.py +2 -1
  85. tomwer/core/process/control/volumesymlink.py +2 -1
  86. tomwer/core/process/edit/darkflatpatch.py +2 -1
  87. tomwer/core/process/edit/imagekeyeditor.py +4 -3
  88. tomwer/core/process/reconstruction/axis/axis.py +29 -32
  89. tomwer/core/process/reconstruction/axis/mode.py +3 -2
  90. tomwer/core/process/reconstruction/axis/params.py +35 -16
  91. tomwer/core/process/reconstruction/darkref/darkrefs.py +90 -707
  92. tomwer/core/process/reconstruction/darkref/darkrefscopy.py +44 -16
  93. tomwer/core/process/reconstruction/darkref/params.py +62 -67
  94. tomwer/core/process/reconstruction/lamino/tofu.py +1 -2
  95. tomwer/core/process/reconstruction/nabu/castvolume.py +21 -26
  96. tomwer/core/process/reconstruction/nabu/nabucommon.py +36 -38
  97. tomwer/core/process/reconstruction/nabu/nabuscores.py +28 -13
  98. tomwer/core/process/reconstruction/nabu/nabuslices.py +41 -14
  99. tomwer/core/process/reconstruction/nabu/nabuvolume.py +21 -12
  100. tomwer/core/process/reconstruction/nabu/utils.py +32 -3
  101. tomwer/core/process/reconstruction/normalization/normalization.py +9 -8
  102. tomwer/core/process/reconstruction/saaxis/saaxis.py +46 -20
  103. tomwer/core/process/reconstruction/sadeltabeta/sadeltabeta.py +38 -12
  104. tomwer/core/process/reconstruction/test/__init__.py +0 -39
  105. tomwer/core/process/reconstruction/test/test_axis_params.py +25 -3
  106. tomwer/core/process/reconstruction/test/test_darkref_copy.py +117 -1
  107. tomwer/core/process/script/python.py +16 -12
  108. tomwer/core/process/task.py +3 -7
  109. tomwer/core/process/test/test_axis.py +1 -1
  110. tomwer/core/process/test/test_dark_and_flat.py +41 -111
  111. tomwer/core/process/test/test_data_listener.py +0 -29
  112. tomwer/core/process/test/test_data_transfer.py +10 -14
  113. tomwer/core/process/test/test_nabu.py +1 -1
  114. tomwer/core/process/test/test_normalization.py +1 -1
  115. tomwer/core/process/visualization/liveslice.py +6 -0
  116. tomwer/core/scan/blissscan.py +37 -2
  117. tomwer/core/scan/edfscan.py +19 -8
  118. tomwer/core/scan/hdf5scan.py +10 -4
  119. tomwer/core/scan/scanbase.py +35 -29
  120. tomwer/core/scan/scanfactory.py +3 -17
  121. tomwer/core/scan/test/test_h5.py +1 -1
  122. tomwer/core/scan/test/test_process_registration.py +0 -11
  123. tomwer/core/scan/test/test_scan.py +32 -30
  124. tomwer/core/settings.py +2 -2
  125. tomwer/core/test/test_utils.py +1 -1
  126. tomwer/core/tomwer_object.py +19 -0
  127. tomwer/core/utils/__init__.py +0 -45
  128. tomwer/core/utils/char.py +2 -0
  129. tomwer/core/utils/gpu.py +5 -5
  130. tomwer/core/utils/nxtomoutils.py +2 -2
  131. tomwer/core/utils/scanutils.py +50 -0
  132. tomwer/core/utils/volumeutils.py +13 -0
  133. tomwer/core/volume/edfvolume.py +4 -0
  134. tomwer/core/volume/hdf5volume.py +4 -0
  135. tomwer/core/volume/jp2kvolume.py +4 -0
  136. tomwer/core/volume/rawvolume.py +22 -5
  137. tomwer/core/volume/tiffvolume.py +4 -0
  138. tomwer/core/volume/volumebase.py +19 -12
  139. tomwer/core/volume/volumefactory.py +20 -1
  140. tomwer/gui/cluster/slurm.py +1 -1
  141. tomwer/gui/cluster/supervisor.py +0 -2
  142. tomwer/gui/cluster/test/test_cluster.py +2 -2
  143. tomwer/gui/control/datalist.py +109 -36
  144. tomwer/gui/control/datatransfert.py +1 -1
  145. tomwer/gui/control/datawatcher/configuration.py +0 -2
  146. tomwer/gui/control/datawatcher/datawatcher.py +23 -13
  147. tomwer/gui/control/datawatcher/datawatcherobserver.py +1 -1
  148. tomwer/gui/control/observations.py +0 -3
  149. tomwer/gui/control/selectorwidgetbase.py +42 -12
  150. tomwer/gui/control/serie/seriecreator.py +967 -0
  151. tomwer/{web/__init__.py → gui/control/serie/seriewaiter.py} +5 -7
  152. tomwer/gui/control/singletomoobj.py +15 -4
  153. tomwer/gui/control/test/test_datalist.py +1 -1
  154. tomwer/gui/control/test/test_datalistener.py +1 -1
  155. tomwer/gui/control/test/test_inputwidget.py +1 -1
  156. tomwer/gui/control/test/test_process_manager.py +1 -13
  157. tomwer/gui/control/test/test_scanselector.py +1 -1
  158. tomwer/gui/control/test/test_scanvalidator.py +1 -1
  159. tomwer/gui/control/test/test_single_tomo_obj.py +1 -1
  160. tomwer/gui/control/test/test_volume_dialog.py +19 -7
  161. tomwer/gui/control/test/test_volumeselector.py +4 -4
  162. tomwer/gui/debugtools/datasetgenerator.py +1 -9
  163. tomwer/gui/edit/dkrfpatch.py +2 -3
  164. tomwer/gui/edit/imagekeyeditor.py +12 -11
  165. tomwer/gui/edit/nxtomoeditor.py +475 -0
  166. tomwer/gui/edit/test/test_dkrf_patch.py +2 -14
  167. tomwer/gui/edit/test/test_image_key_editor.py +2 -2
  168. tomwer/gui/edit/test/test_nx_editor.py +155 -0
  169. tomwer/gui/icons.py +0 -1
  170. tomwer/gui/qfolderdialog.py +11 -0
  171. tomwer/gui/reconstruction/axis/CompareImages.py +27 -29
  172. tomwer/gui/reconstruction/axis/axis.py +2 -0
  173. tomwer/gui/reconstruction/axis/radioaxis.py +70 -14
  174. tomwer/gui/reconstruction/darkref/darkrefcopywidget.py +7 -9
  175. tomwer/gui/reconstruction/darkref/darkrefwidget.py +22 -24
  176. tomwer/gui/reconstruction/lamino/tofu/projections.py +1 -1
  177. tomwer/gui/reconstruction/lamino/tofu/tofu.py +3 -3
  178. tomwer/gui/reconstruction/lamino/tofu/tofuexpert.py +4 -4
  179. tomwer/gui/reconstruction/lamino/tofu/tofuoutput.py +10 -5
  180. tomwer/gui/reconstruction/nabu/castvolume.py +103 -24
  181. tomwer/gui/reconstruction/nabu/check.py +1 -1
  182. tomwer/gui/reconstruction/nabu/nabuconfig/ctf.py +352 -0
  183. tomwer/gui/reconstruction/nabu/nabuconfig/nabuconfig.py +0 -9
  184. tomwer/gui/reconstruction/nabu/nabuconfig/output.py +1 -1
  185. tomwer/gui/reconstruction/nabu/nabuconfig/phase.py +18 -19
  186. tomwer/gui/reconstruction/nabu/nabuconfig/preprocessing.py +30 -7
  187. tomwer/gui/reconstruction/nabu/nabuconfig/reconstruction.py +26 -15
  188. tomwer/gui/reconstruction/nabu/slices.py +10 -4
  189. tomwer/gui/reconstruction/nabu/slurm.py +1 -1
  190. tomwer/gui/reconstruction/nabu/volume.py +13 -7
  191. tomwer/gui/reconstruction/normalization/intensity.py +1 -5
  192. tomwer/gui/reconstruction/saaxis/corrangeselector.py +10 -37
  193. tomwer/gui/reconstruction/saaxis/saaxis.py +11 -7
  194. tomwer/gui/reconstruction/saaxis/sliceselector.py +11 -26
  195. tomwer/gui/reconstruction/sadeltabeta/saadeltabeta.py +13 -8
  196. tomwer/gui/reconstruction/scores/scoreplot.py +67 -62
  197. tomwer/gui/reconstruction/test/test_axis.py +2 -2
  198. tomwer/gui/reconstruction/test/test_lamino.py +2 -2
  199. tomwer/gui/reconstruction/test/test_nabu.py +14 -1
  200. tomwer/gui/reconstruction/test/test_saaxis.py +8 -17
  201. tomwer/gui/reconstruction/test/test_sadeltabeta.py +7 -13
  202. tomwer/gui/stackplot.py +11 -28
  203. tomwer/gui/test/test_axis_gui.py +4 -4
  204. tomwer/gui/test/test_qfolder_dialog.py +12 -0
  205. tomwer/gui/utils/inputwidget.py +42 -22
  206. tomwer/gui/utils/lineselector/lineselector.py +13 -21
  207. tomwer/gui/utils/scandescription.py +2 -4
  208. tomwer/gui/utils/slider.py +1 -102
  209. tomwer/gui/utils/unitsystem.py +48 -11
  210. tomwer/gui/visualization/dataviewer.py +24 -17
  211. tomwer/gui/visualization/diffviewer/diffviewer.py +2 -11
  212. tomwer/gui/visualization/nxtomometadata.py +21 -0
  213. tomwer/gui/visualization/scanoverview.py +0 -1
  214. tomwer/gui/visualization/test/test_nx_tomo_metadata_viewer.py +72 -0
  215. tomwer/gui/visualization/test/test_stacks.py +1 -1
  216. tomwer/gui/visualization/tomoobjoverview.py +49 -0
  217. tomwer/gui/visualization/volumeoverview.py +64 -0
  218. tomwer/gui/visualization/volumeviewer.py +1 -1
  219. tomwer/io/utils/utils.py +2 -2
  220. tomwer/resources/gui/icons/multi-document-save.png +0 -0
  221. tomwer/resources/gui/icons/multi-document-save.svg +101 -0
  222. tomwer/resources/gui/illustrations/ctf_z1.png +0 -0
  223. tomwer/resources/gui/illustrations/ctf_z1.svg +471 -0
  224. tomwer/synctools/axis.py +0 -1
  225. tomwer/synctools/darkref.py +0 -1
  226. tomwer/synctools/datalistener.py +5 -1
  227. tomwer/synctools/imageloaderthread.py +2 -2
  228. tomwer/synctools/saaxis.py +0 -1
  229. tomwer/synctools/sadeltabeta.py +0 -1
  230. tomwer/synctools/stacks/edit/imagekeyeditor.py +1 -1
  231. tomwer/synctools/stacks/processingstack.py +2 -2
  232. tomwer/synctools/stacks/reconstruction/castvolume.py +1 -0
  233. tomwer/synctools/stacks/reconstruction/dkrefcopy.py +1 -1
  234. tomwer/synctools/stacks/reconstruction/lamino.py +1 -3
  235. tomwer/synctools/stacks/reconstruction/sadeltabeta.py +0 -2
  236. tomwer/synctools/test/test_darkRefs.py +32 -149
  237. tomwer/synctools/test/test_foldertransfer.py +1 -1
  238. tomwer/synctools/test/test_scanstages.py +2 -2
  239. tomwer/tests/conftest.py +51 -0
  240. tomwer/{test → tests}/test_scripts.py +1 -1
  241. tomwer/tests/test_utils.py +10 -0
  242. tomwer/{test → tests}/utils/utilstest.py +0 -11
  243. tomwer/version.py +3 -3
  244. {tomwer-1.0.3.dist-info → tomwer-1.1.0.dist-info}/METADATA +14 -16
  245. {tomwer-1.0.3.dist-info → tomwer-1.1.0.dist-info}/RECORD +255 -235
  246. {tomwer-1.0.3.dist-info → tomwer-1.1.0.dist-info}/WHEEL +1 -1
  247. {tomwer-1.0.3.dist-info → tomwer-1.1.0.dist-info}/entry_points.txt +6 -0
  248. orangecontrib/tomwer/setup.py +0 -45
  249. orangecontrib/tomwer/widgets/setup.py +0 -49
  250. tomwer/app/process.py +0 -153
  251. tomwer/core/process/reconstruction/nabu/slurm.py +0 -36
  252. tomwer/core/process/reconstruction/utils/nabu_slice_exec.py +0 -10
  253. tomwer/core/utils/laminoutils.py +0 -80
  254. tomwer/gui/utils/lineselector/lineselection.py +0 -76
  255. tomwer/setup.py +0 -52
  256. tomwer/slurm/executor.py +0 -36
  257. tomwer/slurm/job.py +0 -349
  258. tomwer/slurm/utils.py +0 -44
  259. tomwer/web/client.py +0 -43
  260. tomwer/web/config.py +0 -36
  261. tomwer/web/test/test_graylog_connection.py +0 -59
  262. {tomwer/slurm → orangecontrib/tomwer/tutorials}/__init__.py +0 -0
  263. /tomwer/{test → gui/control/serie}/__init__.py +0 -0
  264. /tomwer/{web/test → tests}/__init__.py +0 -0
  265. /tomwer/{test → tests}/utils/__init__.py +0 -0
  266. /tomwer-1.0.3-py3.8-nspkg.pth → /tomwer-1.1.0-py3.9-nspkg.pth +0 -0
  267. {tomwer-1.0.3.dist-info → tomwer-1.1.0.dist-info}/LICENSE +0 -0
  268. {tomwer-1.0.3.dist-info → tomwer-1.1.0.dist-info}/namespace_packages.txt +0 -0
  269. {tomwer-1.0.3.dist-info → tomwer-1.1.0.dist-info}/top_level.txt +0 -0
@@ -17,8 +17,8 @@
17
17
  inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
18
18
  sodipodi:docname="notification.svg"
19
19
  inkscape:export-filename="/media/payno/830add5c-f5d7-4db2-875e-03be4f0a67f0/dev/tomography/tomwer/orangecontrib/tomwer/widgets/control/icons/notification.png"
20
- inkscape:export-xdpi="256"
21
- inkscape:export-ydpi="256">
20
+ inkscape:export-xdpi="24.190001"
21
+ inkscape:export-ydpi="24.190001">
22
22
  <defs
23
23
  id="defs3791" />
24
24
  <sodipodi:namedview
@@ -29,7 +29,7 @@
29
29
  inkscape:pageopacity="0.0"
30
30
  inkscape:pageshadow="2"
31
31
  inkscape:zoom="2.8"
32
- inkscape:cx="103.95999"
32
+ inkscape:cx="168.78142"
33
33
  inkscape:cy="91.069569"
34
34
  inkscape:document-units="mm"
35
35
  inkscape:current-layer="layer1"
@@ -48,7 +48,7 @@
48
48
  <dc:format>image/svg+xml</dc:format>
49
49
  <dc:type
50
50
  rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
51
- <dc:title />
51
+ <dc:title></dc:title>
52
52
  </cc:Work>
53
53
  </rdf:RDF>
54
54
  </metadata>
@@ -15,7 +15,10 @@
15
15
  version="1.1"
16
16
  id="SVGRoot"
17
17
  sodipodi:docname="nxtomomill.svg"
18
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
18
+ inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
19
+ inkscape:export-filename="/media/payno/830add5c-f5d7-4db2-875e-03be4f0a67f0/dev/tomography/tomwer/orangecontrib/tomwer/widgets/control/icons/nxtomomill.png"
20
+ inkscape:export-xdpi="59.900002"
21
+ inkscape:export-ydpi="59.900002">
19
22
  <defs
20
23
  id="defs815">
21
24
  <filter
@@ -41,14 +44,14 @@
41
44
  inkscape:pageopacity="0.0"
42
45
  inkscape:pageshadow="2"
43
46
  inkscape:zoom="7.7781746"
44
- inkscape:cx="26.605247"
45
- inkscape:cy="25.624015"
47
+ inkscape:cx="3.527853"
48
+ inkscape:cy="25.109756"
46
49
  inkscape:document-units="px"
47
50
  inkscape:current-layer="layer1"
48
51
  showgrid="false"
49
- inkscape:window-width="1920"
52
+ inkscape:window-width="1848"
50
53
  inkscape:window-height="1136"
51
- inkscape:window-x="0"
54
+ inkscape:window-x="72"
52
55
  inkscape:window-y="27"
53
56
  inkscape:window-maximized="1"
54
57
  inkscape:grid-bbox="true" />
@@ -14,13 +14,20 @@
14
14
  viewBox="0 0 12.7 12.7"
15
15
  version="1.1"
16
16
  id="svg8"
17
- inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
17
+ inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
18
18
  sodipodi:docname="tomoobjserie.svg"
19
- inkscape:export-filename="/media/payno/830add5c-f5d7-4db2-875e-03be4f0a67f0/dev/tomography/tomwer/orangecontrib/tomwer/widgets/control/icons/tomoobjserie.png"
19
+ inkscape:export-filename="/home/payno/dev/tomo/tomwer/orangecontrib/tomwer/widgets/control/icons/tomoobjserie.png"
20
20
  inkscape:export-xdpi="134.50999"
21
21
  inkscape:export-ydpi="134.50999">
22
22
  <defs
23
- id="defs2" />
23
+ id="defs2">
24
+ <filter
25
+ id="filter3784">
26
+ <feGaussianBlur
27
+ id="feGaussianBlur3786"
28
+ stdDeviation="0.10012024" />
29
+ </filter>
30
+ </defs>
24
31
  <sodipodi:namedview
25
32
  id="base"
26
33
  pagecolor="#ffffff"
@@ -29,14 +36,14 @@
29
36
  inkscape:pageopacity="0.0"
30
37
  inkscape:pageshadow="2"
31
38
  inkscape:zoom="5.6"
32
- inkscape:cx="19.351596"
33
- inkscape:cy="-3.5570435"
39
+ inkscape:cx="39.552424"
40
+ inkscape:cy="25.30515"
34
41
  inkscape:document-units="mm"
35
42
  inkscape:current-layer="g824"
36
43
  showgrid="false"
37
44
  units="px"
38
45
  inkscape:window-width="1920"
39
- inkscape:window-height="1163"
46
+ inkscape:window-height="1043"
40
47
  inkscape:window-x="1920"
41
48
  inkscape:window-y="0"
42
49
  inkscape:window-maximized="1" />
@@ -48,7 +55,7 @@
48
55
  <dc:format>image/svg+xml</dc:format>
49
56
  <dc:type
50
57
  rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
51
- <dc:title></dc:title>
58
+ <dc:title />
52
59
  </cc:Work>
53
60
  </rdf:RDF>
54
61
  </metadata>
@@ -61,80 +68,68 @@
61
68
  id="g824"
62
69
  transform="translate(0,-1.5875)">
63
70
  <g
64
- id="g880">
65
- <rect
66
- style="opacity:0.85500004;fill:none;fill-opacity:0.69411765;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.05999995,1.05999995;stroke-dashoffset:0.34449998;stroke-opacity:1;paint-order:normal"
67
- id="rect815"
68
- width="5.2916665"
69
- height="2.4568453"
70
- x="3.3072915"
71
- y="288.54279" />
72
- <text
73
- xml:space="preserve"
74
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.31678438px;line-height:1.25;font-family:'Noto Sans Coptic';-inkscape-font-specification:'Noto Sans Coptic';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.05791961"
75
- x="4.0149317"
76
- y="273.52625"
77
- id="text819"
78
- transform="scale(0.94126597,1.062399)"><tspan
79
- sodipodi:role="line"
80
- id="tspan817"
81
- x="4.0149317"
82
- y="273.52625"
83
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Latin Modern Roman';-inkscape-font-specification:'Latin Modern Roman, ';stroke-width:0.05791961">OBJ</tspan></text>
84
- </g>
85
- <g
86
- transform="translate(0,2.4568481)"
87
- id="g880-9">
88
- <rect
89
- style="opacity:0.85500004;fill:none;fill-opacity:0.69411765;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.05999995, 1.05999995;stroke-dashoffset:0.34449998;stroke-opacity:1;paint-order:normal"
90
- id="rect815-9"
91
- width="5.2916665"
92
- height="2.4568453"
93
- x="3.3072915"
94
- y="288.54279" />
95
- <text
96
- xml:space="preserve"
97
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.31678438px;line-height:1.25;font-family:'Noto Sans Coptic';-inkscape-font-specification:'Noto Sans Coptic';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.05791961"
98
- x="4.0149317"
99
- y="273.52625"
100
- id="text819-7"
101
- transform="scale(0.94126597,1.062399)"><tspan
102
- sodipodi:role="line"
103
- id="tspan817-8"
104
- x="4.0149317"
105
- y="273.52625"
106
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Latin Modern Roman';-inkscape-font-specification:'Latin Modern Roman, ';stroke-width:0.05791961">OBJ</tspan></text>
107
- </g>
108
- <g
109
- transform="translate(0,4.9136962)"
110
- id="g880-5">
111
- <rect
112
- style="opacity:0.85500004;fill:none;fill-opacity:0.69411765;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:1.05999995, 1.05999995;stroke-dashoffset:0.34449998;stroke-opacity:1;paint-order:normal"
113
- id="rect815-3"
114
- width="5.2916665"
115
- height="2.4568453"
116
- x="3.3072915"
117
- y="288.54279" />
118
- <text
119
- xml:space="preserve"
120
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.31678438px;line-height:1.25;font-family:'Noto Sans Coptic';-inkscape-font-specification:'Noto Sans Coptic';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.05791961"
121
- x="4.0149317"
122
- y="273.52625"
123
- id="text819-4"
124
- transform="scale(0.94126597,1.062399)"><tspan
125
- sodipodi:role="line"
126
- id="tspan817-9"
127
- x="4.0149317"
128
- y="273.52625"
129
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Latin Modern Roman';-inkscape-font-specification:'Latin Modern Roman, ';stroke-width:0.05791961">OBJ</tspan></text>
71
+ id="g831"
72
+ transform="translate(25.607887,-5.7168899)">
73
+ <g
74
+ style="stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none"
75
+ id="g880-5"
76
+ transform="translate(0.14174109,5.8586367)">
77
+ <rect
78
+ y="287.99817"
79
+ x="-23.412199"
80
+ height="3.2153935"
81
+ width="6.0502148"
82
+ id="rect815-3"
83
+ style="opacity:0.85500004;fill:none;fill-opacity:0.69411765;fill-rule:evenodd;stroke:#000000;stroke-width:0.24465118;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.34449998;stroke-opacity:1;paint-order:normal" />
84
+ <text
85
+ transform="scale(0.94126596,1.062399)"
86
+ id="text819-4"
87
+ y="273.65967"
88
+ x="-24.445742"
89
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.31678438px;line-height:1.25;font-family:'Noto Sans Coptic';-inkscape-font-specification:'Noto Sans Coptic';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none"
90
+ xml:space="preserve"><tspan
91
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:'Latin Modern Roman';-inkscape-font-specification:'Latin Modern Roman, ';stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none"
92
+ y="273.65967"
93
+ x="-24.445742"
94
+ id="tspan817-9"
95
+ sodipodi:role="line">OBJ</tspan></text>
96
+ </g>
130
97
  </g>
131
98
  <ellipse
132
- style="opacity:0.85500004;fill:none;fill-opacity:0.69411765;fill-rule:evenodd;stroke:#cb3a3a;stroke-width:0.25;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:0.5, 0.50000000000000000;stroke-dashoffset:1.04596531;stroke-opacity:1;paint-order:normal"
99
+ style="opacity:0.85500004;fill:none;fill-opacity:0.69411765;fill-rule:evenodd;stroke:#cb3a3a;stroke-width:0.489;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:0.978,0.978;stroke-dashoffset:1.77276001;stroke-opacity:1;paint-order:normal"
133
100
  id="path918"
134
- cx="6.077332"
135
- cy="292.30362"
136
- rx="5.2014737"
137
- ry="5.1288891" />
101
+ cx="6.3891625"
102
+ cy="292.16663"
103
+ rx="5.9381661"
104
+ ry="5.9836993" />
105
+ <g
106
+ id="g831-3"
107
+ transform="translate(28.135604,-1.3182226)">
108
+ <g
109
+ style="stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none"
110
+ id="g880-5-6"
111
+ transform="translate(-0.70870534,6.3311069)">
112
+ <rect
113
+ y="287.99817"
114
+ x="-23.412199"
115
+ height="3.2153935"
116
+ width="6.0502148"
117
+ id="rect815-3-7"
118
+ style="opacity:0.85500004;fill:none;fill-opacity:0.69411765;fill-rule:evenodd;stroke:#000000;stroke-width:0.24465118;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0.34449998;stroke-opacity:1;paint-order:normal" />
119
+ <text
120
+ transform="scale(0.94126596,1.062399)"
121
+ id="text819-4-5"
122
+ y="273.65967"
123
+ x="-24.445742"
124
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.31678438px;line-height:1.25;font-family:'Noto Sans Coptic';-inkscape-font-specification:'Noto Sans Coptic';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none"
125
+ xml:space="preserve"><tspan
126
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:'Latin Modern Roman';-inkscape-font-specification:'Latin Modern Roman, ';stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none"
127
+ y="273.65967"
128
+ x="-24.445742"
129
+ id="tspan817-9-3"
130
+ sodipodi:role="line">OBJ</tspan></text>
131
+ </g>
132
+ </g>
138
133
  </g>
139
134
  <g
140
135
  transform="translate(0,0.86934803)"
@@ -29,6 +29,8 @@ __license__ = "MIT"
29
29
  __date__ = "02/11/2020"
30
30
 
31
31
 
32
+ from typing import Optional
33
+ from silx.io.url import DataUrl
32
34
  from orangewidget.widget import Input, Output
33
35
  from orangewidget import gui
34
36
  from tomwer.gui.edit.dkrfpatch import DarkRefPatchWidget
@@ -116,11 +118,21 @@ class DarkFlatPatchOW(WidgetLongProcessing, SuperviseOW):
116
118
  self.process(dataset)
117
119
 
118
120
  def getConfiguration(self):
121
+ def cast_url_to_str(url: Optional[DataUrl]):
122
+ if url is None:
123
+ return None
124
+ elif not isinstance(url, DataUrl):
125
+ raise TypeError(
126
+ f"url is expected to be an optional DataUrl. {type(url)} provided instead"
127
+ )
128
+ else:
129
+ return url.path()
130
+
119
131
  return {
120
- "darks_start": self.widget.getStartDarkUrl(),
121
- "flats_start": self.widget.getStartFlatUrl(),
122
- "darks_end": self.widget.getEndDarkUrl(),
123
- "flats_end": self.widget.getEndFlatUrl(),
132
+ "darks_start": cast_url_to_str(self.widget.getStartDarkUrl()),
133
+ "flats_start": cast_url_to_str(self.widget.getStartFlatUrl()),
134
+ "darks_end": cast_url_to_str(self.widget.getEndDarkUrl()),
135
+ "flats_end": cast_url_to_str(self.widget.getEndFlatUrl()),
124
136
  }
125
137
 
126
138
  @Inputs.config_in
@@ -0,0 +1,100 @@
1
+ from orangewidget import gui
2
+ from tomwer.gui.edit.nxtomoeditor import NXtomoEditorDialog as _NXtomoEditorDialog
3
+ from orangewidget.widget import Input, Output
4
+ from tomwer.core.scan.hdf5scan import HDF5TomoScan
5
+ from tomwer.core.scan.scanbase import TomwerScanBase
6
+ from silx.gui import qt
7
+ from ...orange.managedprocess import SuperviseOW
8
+ import logging
9
+
10
+ _logger = logging.getLogger(__name__)
11
+
12
+
13
+ class NXtomoEditorDialog(_NXtomoEditorDialog):
14
+ def __init__(self, parent) -> None:
15
+ assert isinstance(parent, SuperviseOW)
16
+ self._ow = parent
17
+ # we need to save it become looks like orange is doing some stuff with parenting
18
+ super().__init__(parent)
19
+
20
+ # connect signal / slot
21
+ self._buttons.button(qt.QDialogButtonBox.Ok).released.connect(
22
+ self._overwriteNXtomo
23
+ )
24
+
25
+ def _overwriteNXtomo(self, *args, **kwargs):
26
+ scan = self.mainWidget.getScan()
27
+ if scan is not None:
28
+ assert isinstance(self._ow, SuperviseOW)
29
+ try:
30
+ self.overwriteNXtomo()
31
+ except Exception as e:
32
+ _logger.error(
33
+ f"Fail to overwrite NXtomo ({scan.get_identifier().to_str()}). Error is {e}"
34
+ )
35
+ self._ow.notify_failed(scan=scan)
36
+ else:
37
+ self._ow.notify_succeed(scan=scan)
38
+ # self.validate()
39
+ self._ow._validateScan(scan)
40
+
41
+
42
+ class NXtomoEditorOW(SuperviseOW):
43
+ """
44
+ Widget to edit manually an NXtomo
45
+ """
46
+
47
+ name = "nxtomo-editor"
48
+ id = "orange.widgets.tomwer.edit.NXtomoEditorOW.NXtomoEditorOW"
49
+ description = "Interface to edit manually a NXtomo"
50
+ icon = "icons/nx_tomo_editor.svg"
51
+ priority = 10
52
+ keywords = [
53
+ "hdf5",
54
+ "nexus",
55
+ "tomwer",
56
+ "file",
57
+ "edition",
58
+ "NXTomo",
59
+ "editor",
60
+ "energy",
61
+ "distance",
62
+ "pixel size",
63
+ ]
64
+
65
+ class Inputs:
66
+ data = Input(name="data", type=TomwerScanBase)
67
+
68
+ class Outputs:
69
+ data = Output(name="data", type=TomwerScanBase)
70
+
71
+ want_main_area = True
72
+ resizing_enabled = True
73
+ compress_signal = False
74
+
75
+ def __init__(self, parent=None, *args, **kwargs):
76
+ super().__init__(parent=parent, *args, **kwargs)
77
+
78
+ _layout = gui.vBox(self.mainArea, self.name).layout()
79
+ self.widget = NXtomoEditorDialog(parent=self)
80
+ _layout.addWidget(self.widget)
81
+
82
+ def _validateScan(self, scan):
83
+ self.Outputs.data.send(scan)
84
+ super().hide()
85
+
86
+ @Inputs.data
87
+ def setScan(self, scan):
88
+ if scan is None:
89
+ pass
90
+ elif not isinstance(scan, HDF5TomoScan):
91
+ raise TypeError(
92
+ f"expect to have an instance of {HDF5TomoScan}. {type(scan)} provided."
93
+ )
94
+ else:
95
+ self.widget.setScan(scan)
96
+ self.show()
97
+ self.raise_()
98
+
99
+ def sizeHint(self):
100
+ return qt.QSize(400, 500)
@@ -0,0 +1,123 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+ xmlns:cc="http://creativecommons.org/ns#"
7
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+ xmlns:svg="http://www.w3.org/2000/svg"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
+ width="48"
13
+ height="48"
14
+ viewBox="0 0 12.7 12.7"
15
+ version="1.1"
16
+ id="svg901"
17
+ inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
18
+ sodipodi:docname="nx_editor_editor.svg">
19
+ <defs
20
+ id="defs895" />
21
+ <sodipodi:namedview
22
+ id="base"
23
+ pagecolor="#ffffff"
24
+ bordercolor="#666666"
25
+ borderopacity="1.0"
26
+ inkscape:pageopacity="0.0"
27
+ inkscape:pageshadow="2"
28
+ inkscape:zoom="3.959798"
29
+ inkscape:cx="-6.0869344"
30
+ inkscape:cy="34.284658"
31
+ inkscape:document-units="mm"
32
+ inkscape:current-layer="layer1"
33
+ showgrid="false"
34
+ units="px"
35
+ inkscape:window-width="1848"
36
+ inkscape:window-height="1136"
37
+ inkscape:window-x="72"
38
+ inkscape:window-y="27"
39
+ inkscape:window-maximized="1" />
40
+ <metadata
41
+ id="metadata898">
42
+ <rdf:RDF>
43
+ <cc:Work
44
+ rdf:about="">
45
+ <dc:format>image/svg+xml</dc:format>
46
+ <dc:type
47
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
48
+ <dc:title></dc:title>
49
+ </cc:Work>
50
+ </rdf:RDF>
51
+ </metadata>
52
+ <g
53
+ inkscape:label="Layer 1"
54
+ inkscape:groupmode="layer"
55
+ id="layer1"
56
+ transform="translate(0,-284.3)">
57
+ <g
58
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.9011445px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.19752862"
59
+ id="g872"
60
+ transform="matrix(1.7008748,0,0,1.3956141,5.3524284,-101.16555)">
61
+ <g
62
+ id="g877"
63
+ transform="matrix(0.69394884,-0.91617956,0.56586616,0.69394884,-154.75708,81.317197)"
64
+ inkscape:transform-center-x="6.3041843"
65
+ inkscape:transform-center-y="-5.6562159"
66
+ style="">
67
+ <rect
68
+ style="fill:#d1b2b2;fill-opacity:1;stroke:#000000;stroke-width:0.23376343;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
69
+ id="rect825"
70
+ width="3.7308216"
71
+ height="0.62381279"
72
+ x="-4.3877668"
73
+ y="281.05283" />
74
+ <path
75
+ style="fill:none;stroke:#000000;stroke-width:0.16898561;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
76
+ d="m -4.3877668,281.67664 c -0.2793163,0.009 -0.5577288,-0.0435 -0.8324456,-0.35142 0.2750181,-0.18258 0.5523208,-0.28005 0.8324456,-0.27239"
77
+ id="path827"
78
+ inkscape:connector-curvature="0"
79
+ sodipodi:nodetypes="ccc" />
80
+ <path
81
+ style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
82
+ d="m -1.110839,281.0557 0.00835,0.60971"
83
+ id="path848"
84
+ inkscape:connector-curvature="0" />
85
+ </g>
86
+ </g>
87
+ <g
88
+ transform="matrix(0.67999756,0,0,1.4705936,-0.07800087,-0.17577001)"
89
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15.24015903px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.07525919"
90
+ id="text2005">
91
+ <path
92
+ inkscape:connector-curvature="0"
93
+ d="M 0.19471413,195.6209 H 1.1392864 l 2.2989224,4.3374 v -4.3374 h 0.6806477 v 5.18473 H 3.1742841 l -2.29892227,-4.33739 v 4.33739 h -0.6806477 z"
94
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.1120739px;font-family:'Noto Serif Gurmukhi';-inkscape-font-specification:'Noto Serif Gurmukhi';stroke-width:0.07525919"
95
+ id="path869" />
96
+ <path
97
+ inkscape:connector-curvature="0"
98
+ d="m 5.264845,195.6209 h 0.7535742 l 1.2883689,1.92735 1.2953142,-1.92735 h 0.7535742 l -1.6668923,2.48992 1.7780185,2.69481 H 8.7132284 l -1.4585307,-2.20516 -1.4689489,2.20516 H 5.0287019 l 1.850945,-2.76773 z"
99
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.1120739px;font-family:'Noto Serif Gurmukhi';-inkscape-font-specification:'Noto Serif Gurmukhi';stroke-width:0.07525919"
100
+ id="path871" />
101
+ <path
102
+ inkscape:connector-curvature="0"
103
+ d="m 10.340185,198.30877 v 0.55216 h 0.658075 v 0.24829 h -0.658075 v 1.0557 q 0,0.23788 0.06424,0.3056 0.06598,0.0677 0.265661,0.0677 h 0.328169 v 0.26739 h -0.328169 q -0.369842,0 -0.510486,-0.13717 -0.140644,-0.13891 -0.140644,-0.50354 v -1.0557 H 9.7845543 v -0.24829 h 0.2344067 v -0.55216 z"
104
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.55603695px;font-family:'Noto Serif Gurmukhi';-inkscape-font-specification:'Noto Serif Gurmukhi';stroke-width:0.07525919"
105
+ id="path873" />
106
+ <path
107
+ inkscape:connector-curvature="0"
108
+ d="m 12.17203,199.08491 q -0.25698,0 -0.406305,0.20142 -0.149326,0.19968 -0.149326,0.54869 0,0.349 0.147589,0.55042 0.149326,0.19968 0.408042,0.19968 0.255242,0 0.404568,-0.20142 0.149326,-0.20141 0.149326,-0.54868 0,-0.34554 -0.149326,-0.54695 -0.149326,-0.20316 -0.404568,-0.20316 z m 0,-0.27087 q 0.416723,0 0.654602,0.27087 0.237879,0.27087 0.237879,0.75011 0,0.47749 -0.237879,0.7501 -0.237879,0.27087 -0.654602,0.27087 -0.41846,0 -0.656339,-0.27087 -0.236143,-0.27261 -0.236143,-0.7501 0,-0.47924 0.236143,-0.75011 0.237879,-0.27087 0.656339,-0.27087 z"
109
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.55603695px;font-family:'Noto Serif Gurmukhi';-inkscape-font-specification:'Noto Serif Gurmukhi';stroke-width:0.07525919"
110
+ id="path875" />
111
+ <path
112
+ inkscape:connector-curvature="0"
113
+ d="m 15.108191,199.23424 q 0.119808,-0.21531 0.286497,-0.31775 0.166689,-0.10245 0.392414,-0.10245 0.303861,0 0.468814,0.21358 0.164953,0.21183 0.164953,0.60424 v 1.17377 h -0.321224 v -1.16335 q 0,-0.27955 -0.09897,-0.41499 -0.09897,-0.13543 -0.302124,-0.13543 -0.248298,0 -0.392414,0.16495 -0.144117,0.16496 -0.144117,0.44972 v 1.0991 h -0.321224 v -1.16335 q 0,-0.28129 -0.09897,-0.41499 -0.09897,-0.13543 -0.305597,-0.13543 -0.244825,0 -0.388941,0.16669 -0.144117,0.16495 -0.144117,0.44798 v 1.0991 h -0.321224 v -1.9447 h 0.321224 v 0.30212 q 0.10939,-0.17884 0.262188,-0.26392 0.152799,-0.0851 0.362897,-0.0851 0.211834,0 0.359423,0.10766 0.149326,0.10765 0.220516,0.31254 z"
114
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.55603695px;font-family:'Noto Serif Gurmukhi';-inkscape-font-specification:'Noto Serif Gurmukhi';stroke-width:0.07525919"
115
+ id="path877" />
116
+ <path
117
+ inkscape:connector-curvature="0"
118
+ d="m 17.811682,199.08491 q -0.256979,0 -0.406305,0.20142 -0.149326,0.19968 -0.149326,0.54869 0,0.349 0.147589,0.55042 0.149326,0.19968 0.408042,0.19968 0.255243,0 0.404568,-0.20142 0.149326,-0.20141 0.149326,-0.54868 0,-0.34554 -0.149326,-0.54695 -0.149325,-0.20316 -0.404568,-0.20316 z m 0,-0.27087 q 0.416723,0 0.654602,0.27087 0.23788,0.27087 0.23788,0.75011 0,0.47749 -0.23788,0.7501 -0.237879,0.27087 -0.654602,0.27087 -0.41846,0 -0.656339,-0.27087 -0.236143,-0.27261 -0.236143,-0.7501 0,-0.47924 0.236143,-0.75011 0.237879,-0.27087 0.656339,-0.27087 z"
119
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.55603695px;font-family:'Noto Serif Gurmukhi';-inkscape-font-specification:'Noto Serif Gurmukhi';stroke-width:0.07525919"
120
+ id="path879" />
121
+ </g>
122
+ </g>
123
+ </svg>
@@ -27,11 +27,18 @@ __license__ = "MIT"
27
27
  __date__ = "10/12/2021"
28
28
 
29
29
 
30
+ import os
30
31
  import gc
32
+ import h5py
31
33
  import pytest
34
+ import pickle
35
+ import tempfile
36
+ import numpy
32
37
  from silx.gui import qt
33
- from tomwer.test.utils import skip_gui_test
38
+ from silx.io.url import DataUrl
39
+ from tomwer.tests.utils import skip_gui_test
34
40
  from silx.gui.utils.testutils import TestCaseQt
41
+ from orangecanvas.scheme.readwrite import literal_dumps
35
42
  from orangecontrib.tomwer.widgets.edit.DarkFlatPatchOW import DarkFlatPatchOW
36
43
 
37
44
 
@@ -52,3 +59,16 @@ class TestDarkFlatPatch(TestCaseQt):
52
59
  def test(self):
53
60
  self._window.show()
54
61
  self.qWaitForWindowExposed(self._window)
62
+
63
+ def test_serialiazation(self):
64
+ with tempfile.TemporaryDirectory() as tmp_path:
65
+ file_path = os.path.join(tmp_path, "darks.hdf5")
66
+ with h5py.File(file_path, mode="w") as h5f:
67
+ h5f.require_group("darks")["0"] = numpy.ones((10, 10))
68
+ dark_url = DataUrl(file_path=file_path, data_path="darks/0")
69
+ self._window.widget.setStartDarkUrl(url=dark_url)
70
+ config = self._window.getConfiguration()
71
+ pickle.dumps(config)
72
+ literal_dumps(config)
73
+
74
+ self._window.setConfiguration(config)
@@ -30,7 +30,7 @@ __date__ = "10/12/2021"
30
30
  import gc
31
31
  import pytest
32
32
  from silx.gui import qt
33
- from tomwer.test.utils import skip_gui_test
33
+ from tomwer.tests.utils import skip_gui_test
34
34
  from silx.gui.utils.testutils import TestCaseQt
35
35
  from orangecontrib.tomwer.widgets.edit.ImageKeyEditorOW import ImageKeyEditorOW
36
36
 
@@ -30,7 +30,7 @@ __date__ = "10/12/2021"
30
30
  import gc
31
31
  import pytest
32
32
  from silx.gui import qt
33
- from tomwer.test.utils import skip_gui_test
33
+ from tomwer.tests.utils import skip_gui_test
34
34
  from silx.gui.utils.testutils import TestCaseQt
35
35
  from orangecontrib.tomwer.widgets.edit.ImageKeyUpgraderOW import ImageKeyUpgraderOW
36
36
 
@@ -0,0 +1,25 @@
1
+ import gc
2
+ import pytest
3
+ from silx.gui import qt
4
+ from tomwer.tests.utils import skip_gui_test
5
+ from silx.gui.utils.testutils import TestCaseQt
6
+ from orangecontrib.tomwer.widgets.edit.NXtomoEditorOW import NXtomoEditorOW
7
+
8
+
9
+ @pytest.mark.skipif(skip_gui_test(), reason="skip gui test")
10
+ class TestNXtomoEditorOW(TestCaseQt):
11
+ """Test that the NXtomoEditorOW widget work correctly. Processing test are done in the core module. gui test are done in the tomwer.gui.edit module"""
12
+
13
+ def setUp(self):
14
+ super().setUp()
15
+ self._window = NXtomoEditorOW()
16
+
17
+ def tearDown(self):
18
+ self._window.setAttribute(qt.Qt.WA_DeleteOnClose)
19
+ self._window.close()
20
+ self._window = None
21
+ gc.collect()
22
+
23
+ def test(self):
24
+ self._window.show()
25
+ self.qWaitForWindowExposed(self._window)