tomo.viewers.views_tkinter_tree module

class tomo.viewers.views_tkinter_tree.MeshesTreeProvider(meshList)[source]

Bases: pyworkflow.gui.tree.TreeProvider

Populate tree from SetOfMeshes

getColumns()[source]

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

getObjectActions(mesh)[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

class tomo.viewers.views_tkinter_tree.TiltSeriesDialogView(parent, protocol, tiltSeries, **kwargs)[source]

Bases: pyworkflow.viewer.View

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

show()[source]

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

class tomo.viewers.views_tkinter_tree.TiltSeriesTreeProvider(protocol, tiltSeries)[source]

Bases: pyworkflow.gui.tree.TreeProvider

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

COL_TI = 'Path'
COL_TI_ANGLE = 'Angle'
COL_TI_DEFOCUS_U = 'Defocus'
COL_TI_ID = 'Order'
COL_TI_IX = 'Index'
COL_TS = 'Tilt Series'
ORDER_DICT = {'Angle': '_tiltAngle', 'Defocus': '_ctfModel._defocusU'}
getColumns()[source]

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

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 tomo.viewers.views_tkinter_tree.TomogramsDialog(parent, viewer, **kwargs)[source]

Bases: pyworkflow.gui.dialog.ToolbarListDialog

This class extend from ListDialog to allow calling an ImageJ subprocess from a list of Tomograms.

doubleClickOnTomogram(e=None)[source]
doubleClickViewer(e=None)[source]
lanchIJForTomogram(path, tomogram)[source]
lanchIJForViewing(path, tomogram)[source]
refresh_gui()[source]
refresh_gui_viewer()[source]
class tomo.viewers.views_tkinter_tree.TomogramsTreeProvider(tomoList, path, mode)[source]

Bases: pyworkflow.gui.tree.TreeProvider

Populate Tree from SetOfTomograms.

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

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(tomo)[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)

getObjectPreview(obj)[source]

Should return a tuple (img, desc), where img is the preview image and desc the description string.

getObjects()[source]

Return the objects that will be inserted in the Tree