Commit 4d18f6bd authored by Payno's avatar Payno
Browse files

Do not load silx fbp algorithm is pyopencl of the fbp not here

parent 5ecf63c9
Pipeline #2818 passed with stage
in 21 seconds
......@@ -42,6 +42,12 @@ try:
except ImportError:
from tomogui.third_party.configuration import config as freeartconfig
found_freeart = False
try:
import pyopencl
from silx.opencl.backprojection import Backprojection
found_fbp = True
except ImportError:
found_fbp = False
_logger = logging.getLogger(__file__)
......@@ -150,25 +156,32 @@ class QDataSourceWidget(qt.QWidget, ConfigurationActor):
cb = qt.QComboBox(parent)
# Warning : should always be stored in this order, otherwise may fail
# Would be better to link it from the FreeARTReconsParam...
cb.addItem(QDataSourceWidget.SILX_FBP_DEF)
cb.setItemData(0,
QDataSourceWidget._getSilxFBPReconsInfo(),
qt.Qt.ToolTipRole)
iItem = 0
if found_fbp is True:
cb.addItem(QDataSourceWidget.SILX_FBP_DEF)
cb.setItemData(iItem,
QDataSourceWidget._getSilxFBPReconsInfo(),
qt.Qt.ToolTipRole)
iItem += 1
if found_freeart is True:
cb.addItem(QDataSourceWidget.FREEART_TX_DEF)
cb.setItemData(1,
cb.setItemData(iItem,
QDataSourceWidget._getTransmissionReconsInfo(),
qt.Qt.ToolTipRole)
iItem += 1
cb.addItem(QDataSourceWidget.FREEART_COMPTON_DEF)
cb.setItemData(2,
cb.setItemData(iItem,
QDataSourceWidget._getComptonReconsInfo(),
qt.Qt.ToolTipRole)
iItem += 1
cb.addItem(QDataSourceWidget.FREEART_FLUO_DEF)
cb.setItemData(3,
cb.setItemData(iItem,
QDataSourceWidget._getFluoReconsInfo(),
qt.Qt.ToolTipRole)
iItem += 1
return cb
def getShortToolTip(self):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment