Commit b5240197 authored by payno's avatar payno

Merge branch 'fix_312' into 'master'

[doc] update qt_snapshot directive from silx.

Closes #312

See merge request tomotools/tomwer!181
parents 65802948 9f73a033
......@@ -9,10 +9,15 @@ The *tomwer darkref* command is provided to define generate dark and flat field
It can generate the median or the mean of those files.
.. snapshotqt:: orangecontrib/tomwer/screenshotexamples/darkrefwidget.py
.. snapshotqt:: img/darkrefwidget.png
:width: 400 px
:align: center
from tomwer.gui.darkref.darkrefcopywidget import DarkRefAndCopyWidget
from tomwer.synctools.ftseries import QReconsParam
widget = DarkRefAndCopyWidget(rpid=None, reconsparams=QReconsParam())
widget.show()
Usage
-----
......
......@@ -8,10 +8,14 @@ Purpose
The *tomwer ftserie* command is provided to define reconstruction parameters and launch a fastomo3 reconstruction.
.. snapshotqt:: orangecontrib/tomwer/screenshotexamples/ftserieswidget.py
.. snapshotqt:: img/ftserieswidget.png
:width: 600 px
:align: center
from tomwer.gui.ftserie import FtserieWidget
widget = FtserieWidget()
widget.show()
Usage
-----
......
......@@ -6,10 +6,22 @@ Purpose
-------
.. snapshotqt:: orangecontrib/tomwer/screenshotexamples/tofuwidget.py
.. snapshotqt:: img/tofuwidget.png
:width: 600 px
:align: center
import tempfile
from tomwer.gui.lamino.tofu import TofuWindow
from tomwer.core import utils
folder = tempfile.mkdtemp()
utils.fastMockAcquisition(folder)
utils.mockReconstruction(folder, nRecons=2, nPagRecons=3)
widget = TofuWindow(parent=None)
widget.show()
GUI to call `tofu <https://github.com/ufo-kit/tofu>`_ and run tomographic reconstruction
This widget will call the tofu application. So this mean that tofu has to be installed before launching any laminography reconstruction.
......
......@@ -9,10 +9,17 @@ The *tomwer radiostack* command is provided to view all existing slices under a
It will parse all sub folder for existing reconstruction and store them into a browsable stack.
Slices will be sorted first by folder then by slice index.
.. snapshotqt:: orangecontrib/tomwer/screenshotexamples/radiostackwidget.py
.. snapshotqt:: img/radiostackwidget.png
:width: 600 px
:align: center
from tomwer.test.utils import UtilsTest
from tomwer.gui.stacks import RadioStack
from tomwer.core import utils
folder = UtilsTest.getInternalTestDir("001_0.28_19keV_Al63")
widget = RadioStack()
widget.addLeafScan(folder)
widget.show()
Usage
......
......@@ -9,10 +9,21 @@ The *tomwer slicestack* command is provided to view all existing slices under a
It will parse all sub folder for existing reconstruction and store them into a browseable stack.
Slices will be sorted first by folder then by slice index.
.. snapshotqt:: orangecontrib/tomwer/screenshotexamples/slicestackwidget.py
.. snapshotqt:: img/slicestackwidget.png
:width: 600 px
:align: center
import tempfile
from tomwer.gui.stacks import SliceStack
from tomwer.core import utils
folder = tempfile.mkdtemp()
utils.fastMockAcquisition(folder)
utils.mockReconstruction(folder, nRecons=2, nPagRecons=3)
widget = SliceStack()
widget.addLeafScan(folder)
widget.show()
Usage
......
......@@ -16,6 +16,22 @@
import sys
import os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
# sys.path.insert(0, os.path.abspath('.'))
project = u'tomwer'
try:
import tomwer
project_dir = os.path.abspath(os.path.join(__file__, "..", "..", ".."))
build_dir = os.path.abspath(tomwer.__file__)
if not build_dir.startswith(project_dir):
raise RuntimeError("%s looks to come from the system. Fix your PYTHONPATH and restart sphinx." % project)
except ImportError:
raise RuntimeError("%s is not on the path. Fix your PYTHONPATH and restart sphinx." % project)
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'ext'))
......
This diff is collapsed.
BaseProcess
```````````
.. currentmodule:: tomwer.core.baseprocess
.. currentmodule:: tomwer.core.process.baseprocess
.. autoclass:: tomwer.core.baseprocess.BaseProcess
.. autoclass:: tomwer.core.process.baseprocess.BaseProcess
datatransfert
`````````````
.. currentmodule:: tomwer.core.datatransfert
.. currentmodule:: tomwer.core.process.datatransfert
.. autoclass:: tomwer.core.datatransfert.FolderTransfert
.. autoclass:: tomwer.core.process.datatransfert.FolderTransfert
:members:
.. autoclass:: tomwer.core.datatransfert.FolderTransfertP
......@@ -2,8 +2,6 @@
tomwer\.core\.ftseries package
==============================
.. automodule:: tomwer.core.ftseries.ftseries
.. automodule:: tomwer.core.process.ftseries.ftseries
:members:
.. automodule:: tomwer.core.ftseries.ftseriereconstruction
:members:
PyHSTCaller
```````````
.. currentmodule:: tomwer.core.pyhstcaller
.. currentmodule:: tomwer.core.process.pyhstcaller
.. autoclass:: tomwer.core.pyhstcaller.PyHSTCaller
.. autoclass:: tomwer.core.process.pyhstcaller.PyHSTCaller
:members:
ScanList
````````
.. currentmodule:: tomwer.core.scanlist
.. currentmodule:: tomwer.core.process.scanlist
.. autoclass:: tomwer.core.scanlist.ScanList
.. autoclass:: tomwer.core.process.scanlist.ScanList
:members:
ScanValidator
`````````````
.. currentmodule:: tomwer.core.scanvalidator
.. currentmodule:: tomwer.core.process.scanvalidator
.. autoclass:: tomwer.core.scanvalidator.ScanValidator
.. autoclass:: tomwer.core.process.scanvalidator.ScanValidator
:members:
......@@ -2,9 +2,5 @@
tomwer\.core\.tomodir package
=============================
.. automodule:: tomwer.core.tomodir
:members:
.. automodule:: tomwer.core.tomodir.tomodirobserver
.. automodule:: tomwer.core.process.datawatcher
:members:
dark and flat field construction
````````````````````````````````
.. snapshotqt:: orangecontrib/tomwer/screenshotexamples/darkrefwidget.py
.. snapshotqt:: img/darkrefwidget.png
from tomwer.gui.darkref.darkrefcopywidget import DarkRefAndCopyWidget
from tomwer.synctools.ftseries import QReconsParam
widget = DarkRefAndCopyWidget(rpid=None, reconsparams=QReconsParam())
widget.show()
Behavior
''''''''
......
scan filter
```````````
.. snapshotqt:: orangecontrib/tomwer/screenshotexamples/filterwidget.py
.. snapshotqt:: img/filterwidget.png
from tomwer.gui.conditions.filter import FileNameFilterWidget
widget = FileNameFilterWidget()
widget.show()
This widget allow to filter some widgets according to the name of the scan folder
ftseries reconstruction ``````````````````````` .. snapshotqt:: orangecontrib/tomwer/screenshotexamples/ftserieswidget.py Behavior '''''''' When the widget/box is receiving a scan then it will run a reconstruction using octave script. The reconstruction will be tuned according to the parameters registred in the interface. You can save the current parameters or load new one using the 'Load' and 'Save as' buttons. This configuration is stored into a .h5 file. The interface is waiting for a set of minimal parameters. If they are not furnished then default parameters will be set. If the file is containing some extra-parameters then they will be stored into the 'Other' tab. But all parameters loaded will be given to the octave scripts. The goal is that those scripts might evolve with the time. The 'Explore dataset for h5' option will force loading reconstruction parameters from the first h5 file found if one present in the directory. .. note:: you can access this process without orange by running .. code-block:: bash tomwer ftserie [acquisition folder]
\ No newline at end of file
ftseries reconstruction ``````````````````````` .. snapshotqt:: img/ftserieswidget.png from tomwer.gui.ftserie import FtserieWidget widget = FtserieWidget() widget.show() Behavior '''''''' When the widget/box is receiving a scan then it will run a reconstruction using octave script. The reconstruction will be tuned according to the parameters registred in the interface. You can save the current parameters or load new one using the 'Load' and 'Save as' buttons. This configuration is stored into a .h5 file. The interface is waiting for a set of minimal parameters. If they are not furnished then default parameters will be set. If the file is containing some extra-parameters then they will be stored into the 'Other' tab. But all parameters loaded will be given to the octave scripts. The goal is that those scripts might evolve with the time. The 'Explore dataset for h5' option will force loading reconstruction parameters from the first h5 file found if one present in the directory. .. note:: you can access this process without orange by running .. code-block:: bash tomwer ftserie [acquisition folder]
\ No newline at end of file
......
radio stack
```````````
.. snapshotqt:: orangecontrib/tomwer/screenshotexamples/radiostackwidget.py
.. snapshotqt:: img/radiostackwidget.png
:width: 600 px
:align: center
from tomwer.test.utils import UtilsTest
from tomwer.gui.stacks import RadioStack
from tomwer.core import utils
folder = UtilsTest.getInternalTestDir("001_0.28_19keV_Al63")
widget = RadioStack()
widget.addLeafScan(folder)
widget.show()
This widget memorized all radio received and allow to browse through them.
slice stack
```````````
.. snapshotqt:: orangecontrib/tomwer/screenshotexamples/slicestackwidget.py
.. snapshotqt:: img/slicestackwidget.png
import tempfile
from tomwer.gui.stacks import SliceStack
from tomwer.core import utils
folder = tempfile.mkdtemp()
utils.fastMockAcquisition(folder)
utils.mockReconstruction(folder, nRecons=2, nPagRecons=3)
widget = SliceStack()
widget.addLeafScan(folder)
widget.show()
This widget memorized all slice received and allow to browse through them.
data viewer
```````````
.. snapshotqt:: orangecontrib/tomwer/screenshotexamples/imagestackviewerwidget.py
.. snapshotqt:: img/imagestackviewerwidget.png
import tempfile
from tomwer.gui.stacks import SliceStack
from tomwer.core import utils
folder = tempfile.mkdtemp()
utils.fastMockAcquisition(folder)
utils.mockReconstruction(folder, nRecons=2, nPagRecons=3)
widget = SliceStack()
widget.addLeafScan(folder)
widget.show()
Show a small recap of the reconstruction runned
......
doc/widgets/img/ftserieswidget.png

38.8 KB | W: | H:

doc/widgets/img/ftserieswidget.png

27.2 KB | W: | H:

doc/widgets/img/ftserieswidget.png
doc/widgets/img/ftserieswidget.png
doc/widgets/img/ftserieswidget.png
doc/widgets/img/ftserieswidget.png
  • 2-up
  • Swipe
  • Onion skin
doc/widgets/img/scanlistwidget.png

14 KB | W: | H:

doc/widgets/img/scanlistwidget.png

6.73 KB | W: | H:

doc/widgets/img/scanlistwidget.png
doc/widgets/img/scanlistwidget.png
doc/widgets/img/scanlistwidget.png
doc/widgets/img/scanlistwidget.png
  • 2-up
  • Swipe
  • Onion skin
live slice
``````````
.. snapshotqt:: orangecontrib/tomwer/screenshotexamples/liveslicewidget.py
.. snapshotqt:: img/liveslicewidget.png
import tempfile
from tomwer.core import utils
from tomwer.test.utils import UtilsTest
from liveslice.gui.liveslice_gui import ReconstructionApp
from tomwer.core.utils import getFirstProjFile
widget = ReconstructionApp()
folder = UtilsTest.getInternalTestDir("001_0.28_19keV_Al63")
first_proj_file = getFirstProjFile(folder)
widget.setSinoPath(first_proj_file)
widget.initiate()
widget.show()
Behavior
''''''''
......
sample moved
````````````
.. snapshotqt:: orangecontrib/tomwer/screenshotexamples/samplemoved.py
.. snapshotqt:: img/samplemoved.png
from tomwer.core.scan.edfscan import EDFTomoScan
from tomwer.gui.samplemoved import SampleMovedWidget
from tomwer.test.utils import UtilsTest
from silx.io.url import DataUrl
import os
app = qt.QApplication.instance() or qt.QApplication([])
widget = SampleMovedWidget()
widget.setMinimumSize(800, 800)
folder = UtilsTest.getInternalTestDir("001_0.28_19keV_Al63")
scan = EDFTomoScan(scan=folder)
rawSlices = scan.getSampleEvolScan()
widget.clearOnLoadActions()
widget.setImages(rawSlices)
widget.setOnLoadAction(scan.flatFieldCorrection)
_file1 = os.path.join(folder, '001_0.28_19keV_Al630000.edf')
_file2 = os.path.join(folder, '001_0.28_19keV_Al630001.edf')
widget.setSelection(url_img_a=DataUrl(file_path=_file1, scheme='fabio').path(),
url_img_b=DataUrl(file_path=_file2, scheme='fabio').path())
widget.show()
Visualization widget to display some specific radio to be able to determine if the scan moved during an acquisition.
......
data list
`````````
.. snapshotqt:: orangecontrib/tomwer/screenshotexamples/scanlistwidget.py
.. snapshotqt:: img/scanlistwidget.png
import tempfile
from tomwer.gui.datalist import DataListWidget
widget = DataListWidget(parent=None)
widget.add(tempfile.mkdtemp())
widget.add(tempfile.mkdtemp())
widget.show()
List reconsturction path to be send to the next box once validated
......
data selector
`````````````
.. snapshotqt:: orangecontrib/tomwer/screenshotexamples/scanselectorwidget.py
.. snapshotqt:: img/scanselectorwidget.png
import tempfile
from tomwer.gui.scanselectorwidget import ScanSelectorWidget
widget = ScanSelectorWidget()
widget.add(tempfile.mkdtemp())
widget.add(tempfile.mkdtemp())
widget.show()
List all received scan and allow user to select a specific one to be moved to the next boxes.
data validator
``````````````
.. snapshotqt:: orangecontrib/tomwer/screenshotexamples/scanvalidatorwidget.py
.. snapshotqt:: img/scanvalidatorwidget.png
import tempfile
from tomwer.test.utils import UtilsTest
from orangecontrib.tomwer.widgets.control.DataValidatorOW import DataValidatorOW
from tomwer.gui.viewerqwidget import ImageStackViewerValidator
from tomwer.core import utils
folder = UtilsTest.getInternalTestDir("001_0.28_19keV_Al63")
widget = DataValidatorOW()
widget.addScan(folder)
widget.widget.stackImageViewerTab.setCurrentIndex(1)
widget.show()
Widget displaying results of a reconstruction and asking to the user if he want to validate or not the reconstruction.
......
timer
`````
.. snapshotqt:: orangecontrib/tomwer/screenshotexamples/timerwidget.py
.. snapshotqt:: img/timerwidget.png
from orangecontrib.tomwer.widgets.control.TimerOW import _TimerWidget
widget = _TimerWidget(parent=None)
widget.show()
This widget allow to postpone the treatment of the scan to the next treatment by specifying some time,
tofu reconstruction
```````````````````
.. snapshotqt:: orangecontrib/tomwer/screenshotexamples/tofuwidget.py
.. snapshotqt:: img/tofuwidget.png
import tempfile
from tomwer.gui.lamino.tofu import TofuWindow
from tomwer.core import utils
folder = tempfile.mkdtemp()
utils.fastMockAcquisition(folder)
utils.mockReconstruction(folder, nRecons=2, nPagRecons=3)
widget = TofuWindow(parent=None)
widget.show()
Behavior
''''''''
......
......@@ -2,7 +2,11 @@ data watcher
============
.. snapshotqt:: orangecontrib/tomwer/screenshotexamples/datawatcher.py
.. snapshotqt:: img/datawatcher.png
from tomwer.gui.datawatcher import DataWatcherWidget
widget = DataWatcherWidget()
widget.show()
The widget will observe folder and sub folders of a given path and waiting for acquisition to be ended.
......
from silx.gui import qt
def screenshot():
from tomwer.gui.darkref.darkrefcopywidget import DarkRefAndCopyWidget
app = qt.QApplication.instance() or qt.QApplication([])
widget = DarkRefAndCopyWidget(rpid=None)
widget.show()
app.exec_()
if __name__ == '__main__':
screenshot()
from silx.gui import qt
def screenshot():
from tomwer.gui.datawatcher import DataWatcherWidget
app = qt.QApplication.instance() or qt.QApplication([])
widget = DataWatcherWidget()
widget.show()
app.exec_()
if __name__ == '__main__':
screenshot()
from silx.gui import qt
def screenshot():
from tomwer.gui.conditions.filter import FileNameFilterWidget
app = qt.QApplication.instance() or qt.QApplication([])
widget = FileNameFilterWidget()
widget.show()
app.exec_()
if __name__ == '__main__':
screenshot()
from silx.gui import qt
def screenshot():
from tomwer.gui.ftserie import FtserieWidget
app = qt.QApplication.instance() or qt.QApplication([])
widget = FtserieWidget()
widget.show()
app.exec_()
if __name__ == '__main__':
screenshot()
from silx.gui import qt
def screenshot():
import tempfile
from tomwer.gui.stacks import SliceStack
from tomwer.core import utils
app = qt.QApplication.instance() or qt.QApplication([])
folder = tempfile.mkdtemp()
utils.fastMockAcquisition(folder)
utils.mockReconstruction(folder, nRecons=2, nPagRecons=3)
widget = SliceStack()
widget.addLeafScan(folder)
widget.show()
app.exec_()
if __name__ == '__main__':
screenshot()
from silx.gui import qt
def screenshot():
import tempfile
from tomwer.core import utils
from tomwer.test.utils import UtilsTest
from liveslice.gui.liveslice_gui import ReconstructionApp
from tomwer.core.utils import getFirstProjFile
app = qt.QApplication.instance() or qt.QApplication([])
widget = ReconstructionApp()
try:
folder = UtilsTest.getInternalTestDir("001_0.28_19keV_Al63")
except:
folder = tempfile.mkdtemp()
utils.fastMockAcquisition(folder)
utils.mockReconstruction(folder, nRecons=2, nPagRecons=3)
first_proj_file = getFirstProjFile(folder)
if first_proj_file is not None:
widget.setSinoPath(first_proj_file)
widget.initiate()
widget.show()
app.exec_()
if __name__ == '__main__':
screenshot()
from silx.gui import qt
def screenshot():
import tempfile
from tomwer.test.utils import UtilsTest
from tomwer.gui.stacks import RadioStack
from tomwer.core import utils
app = qt.QApplication.instance() or qt.QApplication([])
try:
folder = UtilsTest.getInternalTestDir("001_0.28_19keV_Al63")
except:
folder = tempfile.mkdtemp()
utils.fastMockAcquisition(folder)
utils.mockReconstruction(folder, nRecons=2, nPagRecons=3)
widget = RadioStack()
widget.addLeafScan(folder)
widget.show()
app.exec_()
if __name__ == '__main__':
screenshot()
from silx.gui import qt
def screenshot():
from tomwer.core.scan.edfscan import EDFTomoScan
from tomwer.gui.samplemoved import SampleMovedWidget
from tomwer.test.utils import UtilsTest
from silx.io.url import DataUrl
import os
app = qt.QApplication.instance() or qt.QApplication([])
widget = SampleMovedWidget()
widget.setMinimumSize(800, 800)
try:
folder = UtilsTest.getInternalTestDir("001_0.28_19keV_Al63")
scan = EDFTomoScan(scan=folder)
rawSlices = scan.getSampleEvolScan()
widget.clearOnLoadActions()
widget.setImages(rawSlices)
widget.setOnLoadAction(scan.flatFieldCorrection)
_file1 = os.path.join(folder, '001_0.28_19keV_Al630000.edf')
_file2 = os.path.join(folder, '001_0.28_19keV_Al630001.edf')
widget.setSelection(url_img_a=DataUrl(file_path=_file1, scheme='fabio').path(),
url_img_b=DataUrl(file_path=_file2, scheme='fabio').path())
except Exception as e:
print(e)
widget.show()
app.exec_()
if __name__ == '__main__':
screenshot()
from silx.gui import qt
def screenshot():
import tempfile
from tomwer.gui.datalist import DataListWidget
app = qt.QApplication.instance() or qt.QApplication([])
widget = DataListWidget(parent=None)
widget.add(tempfile.mkdtemp())
widget.add(tempfile.mkdtemp())
widget.show()
app.exec_()
if __name__ == '__main__':
screenshot()
from silx.gui import qt
def screenshot():
import tempfile
from tomwer.gui.scanselectorwidget import ScanSelectorWidget
app = qt.QApplication.instance() or qt.QApplication([])
widget = ScanSelectorWidget()
widget.add(tempfile.mkdtemp())
widget.add(tempfile.mkdtemp())
widget.show()
app.exec_()
if __name__ == '__main__':
screenshot()