imod.viewers.views_tkinter_tree module

class imod.viewers.views_tkinter_tree.CTFEstimationTree(master, provider, **opts)[source]

Bases: pyworkflow.gui.tree.BoundTree

check_item(item)[source]

check the box of item and change the state of the boxes of item’s ancestors accordingly

getSelectedItem()[source]
getSelectedObj()[source]
class imod.viewers.views_tkinter_tree.CTFSerieStates[source]

Bases: object

CHECKED = 'checked'
EVEN = 'even'
FAILED = 'Failed'
ODD = 'odd'
OK = 'Ok'
UNCHECKED = 'unchecked'
class imod.viewers.views_tkinter_tree.CtfEstimationListDialog(parent, title, provider, protocol, inputTS, **kwargs)[source]

Bases: pyworkflow.gui.dialog.ListDialog

body(bodyFrame)[source]

create dialog body. return widget that should have initial focus. This method should be overridden, and is called by the __init__ method.

class imod.viewers.views_tkinter_tree.CtfEstimationTreeProvider(master, protocol, outputSetOfCTFTomoSeries, **kw)[source]

Bases: pyworkflow.gui.tree.TreeProvider, tkinter.ttk.Treeview

Model class that will retrieve the information from TiltSeries and prepare the columns/rows models required by the TreeDialog GUI.

COL_CTF_EST_AST = 'ast'
COL_CTF_EST_DEFOCUS_ANGLE = 'defocusAngle'
COL_CTF_EST_DEFOCUS_RATIO = 'defocusRatio'
COL_CTF_EST_DEFOCUS_U = 'defocusU'
COL_CTF_EST_DEFOCUS_V = 'defocusV'
COL_CTF_EST_FIT = 'fitQuality'
COL_CTF_EST_IX = 'index'
COL_CTF_EST_RES = 'resolution'
COL_CTF_SERIE = 'CTF Series'
CRITERIA_1 = 'defocusUDeviation'
CRITERIA_2 = 'defocusVDeviation'
ORDER_DICT = {'defocusAngle': '_defocusAngle', 'defocusRatio': '_defocusRatio', 'defocusU': '_defocusU', 'defocusV': '_defocusV', 'fitQuality': '_fitQuality', 'resolution': '_resolution'}
getCTFSeries()[source]
getColumns()[source]

Return a list of tuples (c, w) where: c: is the column name and index w: is the column width

getObjectInfo(obj)[source]

This function will be called by the Tree with each object that will be inserted. A dictionary should be returned with the possible following entries: ‘key’: the key value to insert in the Tree ‘text’: text of the object to be displayed

(if not passed the ‘key’ will be used)

‘image’: image path to be displayed as icon (optional) ‘parent’: the object’s parent in which insert this object (optional) ‘tags’: list of tags names (optional)

getObjects()[source]

Return the objects that will be inserted in the Tree

isSelected(obj)[source]

Check if an object is selected or not.

objectKey(pobj)[source]
class imod.viewers.views_tkinter_tree.ImodGenericTreeProvider(protocol, objs, isInteractive=False)[source]

Bases: pyworkflow.gui.tree.TreeProvider

Model class that will retrieve the information from TiltSeries, Tomogram, SetOfTomograms, SetOfTiltSeries and prepare the columns/rows models required by the TreeDialog GUI.

COL_ALIGNED = 'Aligned'
COL_COOR3D = 'Coordinates 3D'
COL_INFO = 'Info'
COL_LANDMODEL_NO_GAPS = 'Landmark models no gaps'
COL_PREALIGNED = 'Prealigned'
COL_PREPROCESS_RECONST_TOMOGRAM = 'Postprocess tomograms'
COL_RECONST_TOMOGRAM = 'Full tomograms'
COL_STATUS = 'Status'
COL_TS = 'Tilt series'
ORDER_DICT = {'Tilt series': 'id'}
configureTags(tree)[source]

Configure the available tags in the tree that will be setup later for each item in the tree. :returns: * Nothing

  • Adds tags to the tree for customizing
getColumns()[source]

Return a list of tuples (c, w) where: c: is the column name and index w: is the column width

getObjStatus(obj, values)[source]
getObjectActions(obj)[source]

Return a list of tuples (key, action) were keys are the string options that will be display in the context menu and the actions are the functions to call when the specific action is selected. The first action in the list will be taken as the default one when the element is double-clicked.

getObjectInfo(obj)[source]

This function will be called by the Tree with each object that will be inserted. A dictionary should be returned with the possible following entries: ‘key’: the key value to insert in the Tree ‘text’: text of the object to be displayed

(if not passed the ‘key’ will be used)

‘image’: image path to be displayed as icon (optional) ‘parent’: the object’s parent in which insert this object (optional) ‘tags’: list of tags names (optional)

getObjects()[source]

Return the objects that will be inserted in the Tree

isSelected(obj)[source]

Check if an object is selected or not.

objectKey(pobj)[source]
class imod.viewers.views_tkinter_tree.ImodGenericViewer(parent, protocol, objs, displayAllButton=True, isInteractive=False, itemDoubleClick=False, **kwargs)[source]

Bases: pyworkflow.viewer.View

This class implements a view using Tkinter ListDialog and the ImodTreeProvider.

show()[source]

This method should be overwritten to implement how this particular view will be displayed in desktop.

class imod.viewers.views_tkinter_tree.ImodListDialog(parent, title, provider, displayAllButton=True, itemDoubleClick=False, **kwargs)[source]

Bases: pyworkflow.gui.dialog.ListDialog

body(bodyFrame)[source]

create dialog body. return widget that should have initial focus. This method should be overridden, and is called by the __init__ method.

doubleClickOnItem(e=None)[source]
refresh_gui()[source]
class imod.viewers.views_tkinter_tree.ImodSetOfLandmarkModelsView(set, **kwargs)[source]

Bases: pyworkflow.viewer.CommandView

Wrapper to visualize landmark models with 3dmod

class imod.viewers.views_tkinter_tree.ImodSetOfTomogramsView(set, **kwargs)[source]

Bases: pyworkflow.viewer.CommandView

Wrapper to visualize set of tomograms with 3dmod

class imod.viewers.views_tkinter_tree.ImodSetView(set, **kwargs)[source]

Bases: pyworkflow.viewer.CommandView

Wrapper to visualize different type of objects with the 3dmod