|
|
(43 intermediate revisions by 3 users not shown) |
Line 1: |
Line 1: |
− | = Goals and Functionality =
| + | <big>'''Note:''' We are migrating this content to the slicer.org domain - <font color="orange">The newer page is [https://www.slicer.org/wiki/Slicer3:Slicer_Daemon here]</font></big> |
− | | |
− | The Slicer Daemon refers to a network protocol that can be used to connect to a running instance of slicer to read and write data in the MRML scene and execute other commands. The name is based on the unix system convention of naming network services 'daemons'.
| |
− | | |
− | = Server Implementation =
| |
− | | |
− | The file
| |
− | [http://www.na-mic.org/ViewVC/index.cgi/trunk/Modules/SlicerDaemon/Tcl/slicerd.tcl?view=log slicerd.tcl] implements the server side functionality.
| |
− | | |
− | By default it listens for connections on port 18943.
| |
− | | |
− | = Clients =
| |
− | | |
− | == Tcl ==
| |
− | | |
− | Two utilities are provided:
| |
− | | |
− | * [http://www.na-mic.org/ViewVC/index.cgi/trunk/Modules/SlicerDaemon/Tcl/slicerget.tcl?view=log slicerget.tcl] is used to read volumes out of slicer. The volume is written to the stdout of the slicerget command in nrrd format.
| |
− | | |
− | * [http://www.na-mic.org/ViewVC/index.cgi/trunk/Modules/SlicerDaemon/Tcl/slicerput.tcl?view=log slicerput.tcl] is used to write volumes into slicer. The volume is read in nrrd format from stdin of slicerput and loaded into the mrml scene.
| |
− | | |
− | Some sample commands (assumes your PATH is correctly set to include unu, slicerget and slicerput):
| |
− | | |
− | # a noop -- just copy image onto itself | |
− | slicerget.tcl 1 | slicerput.tcl noop
| |
− | | |
− | # put external data into slicer
| |
− | unu 1op abs -i d:/data/bunny-small.nrrd | slicerput.tcl
| |
− | | |
− | # run an external command and put the data back into slicer
| |
− | slicerget.tcl 1 | unu 1op abs -i - slicerput.tcl abs
| |
− | | |
− | == Python ==
| |
− | | |
− | == Matlab ==
| |
Latest revision as of 17:35, 10 July 2017
Home < Slicer3:Slicer DaemonNote: We are migrating this content to the slicer.org domain - The newer page is here