Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

40 lines (31 sloc) 1.012 kb
#
# This script should be sourced after slicerqt.py
#
def tcl(cmd):
global _tpycl
try:
_tpycl
except NameError:
# no tcl yet, so first bring in the adapters, then the actual code
import tpycl
_tpycl = tpycl.tpycl()
packages = ['freesurfer', 'mrml', 'mrmlLogic', 'remoteio', 'teem', 'vtk', 'vtkITK']
for p in packages:
_tpycl.py_package(p)
_tpycl.tcl_eval("""
set dir $::env(SLICER_HOME)/$::env(SLICER_SHARE_DIR)/Tcl
source $dir/Slicer3Adapters.tcl
::Slicer3Adapters::Initialize
""")
return _tpycl.tcl_eval(cmd)
class _sliceWidget(object):
""" an empty class that can be instanced as a place to store
references to sliceWidget components
"""
def __init__(self):
pass
if __name__ == "__main__":
# Initialize global slicer.sliceWidgets dict
# -- it gets populated in qSlicerLayoutManagerPrivate::createSliceView
# and then used by the scripted code that needs to access the slice views
slicer.sliceWidgets = {}
Jump to Line
Something went wrong with that request. Please try again.