API

Submodules

tomogui.gui.MainWidget module

class tomogui.gui.MainWidget.TomoguiMainWindow(showOnlyReconsOpt=False, mockNoFreeart=False)[source]

Bases: PyQt5.QtWidgets.QWidget

Window proposing all the possibility to use tomogui

LAYOUT_INDEX_LIMIT = 100
mainWindow = None

The tomogui project main window

creator = None

The tomogui absorption matrix creator

launchAbsMatCreator()[source]
launchTomoguiproject()[source]

tomogui.gui.ProjectWidget module

class tomogui.gui.ProjectWidget.ProjectWindow(parent=None, cfgFile=None)[source]

Bases: PyQt5.QtWidgets.QMainWindow

This is the main window to deal with a freeART reconsparam

Parameters:parent – the parent of the widget in the Qt hierarchy
clean()[source]
setConfFile(cfgFile)[source]
filterOtherThan(id)[source]

set the widget on for the given reconsparam type.

Parameters:id
Returns:
setReconsFluoMode(opt)[source]

Set the reconsparam from fluo to be made from albsorption files directly or from I0 and It

Parameters:opt – the reconsparam we want. Should be in QDataSourceFluoWidget.RECONS_MODE
Returns:
setSinoToRecons(reconsType, sinograms, names)[source]
setIt(it, name=None)[source]
setI0(i0, name=None)[source]
setLogRecons(isLogRecons)[source]

Set reconstruction mode for transmission reconstruction

class tomogui.gui.ProjectWidget.MainWidget(parent=None, statusBar=None)[source]

Bases: PyQt5.QtWidgets.QWidget

This is the main widget for a freeART reconsparam.

Parameters:parent – the parent of the widget in the Qt hierarchy
clean()[source]
setSinoToRecons(reconsType, sinogramsData, names=None)[source]

Set the GUI to run the reconstruction of the given sinograms in the given mode.

Note

for Tx and FBP reconstruction we can now only deal with one reconstruction. Multiple sinogram reconstruction is only managed for fluorescence and compton.

Parameters:
  • reconsType (str) – the type of reconstruction to run
  • sinogramsData (list) – list of numpy arrays to reconstruct. Numpy nd arrays should be 2D.
  • names – list of the names of the sinograms
setIt(it, name=None)[source]
setI0(i0, name=None)[source]
setLogRecons(isLog)[source]
getReconsParamWidget()[source]
getNormalizationWidget()[source]
getDataSourceWidget()[source]
getMaterialsWidget()[source]
saveConfiguration(filePath, merge)[source]

Save the current configuration to the given file paths

getConfiguration(configFile)[source]

Save the current configuration to the required configFile

setReconstructionType(reconsType)[source]
loadConfigurationFromFile(filePath)[source]

Update the widget fron a configuraton file :param filePath: The path of the configuration file.

Warning: This must be a ‘.cfg’ file
loadConfiguration(config)[source]
getReconstructionType()[source]