tomo.viewers.views_tkinter_tree module

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

Bases: 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 tomo.viewers.views_tkinter_tree.CTFSerieStates[source]

Bases: object

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

Bases: 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.

plotterChildItem(itemSelected)[source]
plotterParentItem(itemSelected)[source]
class tomo.viewers.views_tkinter_tree.CtfEstimationTreeProvider(master, protocol, outputSetOfCTFTomoSeries, **kw)[source]

Bases: TreeProvider, Treeview

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

COL_CTF_EST_AST = 'Astigmatism (A)'
COL_CTF_EST_DEFOCUS_U = 'DefocusU (A)'
COL_CTF_EST_DEFOCUS_V = 'DefocusV (A)'
COL_CTF_EST_FIT = 'CC value'
COL_CTF_EST_PHASE = 'Phase shift (deg)'
COL_CTF_EST_RES = 'Resolution (A)'
COL_CTF_SERIE = 'Tilt Series'
COL_TILT_ANG = 'Tilt Angle'
CRITERIA_1 = 'Status'
ORDER_DICT = {'Astigmatism (A)': '_defocusRatio', 'CC value': '_fitQuality', 'DefocusU (A)': '_defocusU', 'DefocusV (A)': '_defocusV', 'Phase shift (deg)': '_phaseShift', 'Resolution (A)': '_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 tomo.viewers.views_tkinter_tree.MeshesTreeProvider(meshList)[source]

Bases: 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: 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: 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_ACQ_ORDER = 'Order'
COL_TI_ANGLE = 'Tilt angle'
COL_TI_DEFOCUS_U = 'Defocus U (A)'
COL_TI_DOSE = 'Accum. dose'
COL_TS = 'Tilt series'
ORDER_DICT = {'Accum. dose': '_acquisition._accumDose', 'Defocus U (A)': '_ctfModel._defocusU', 'Tilt angle': '_tiltAngle'}
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: 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: 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