Difference between revisions of "VolViewer Scripting in more detail"

From BanghamLab
Jump to navigation Jump to search
Line 17: Line 17:
 
where ''file.txt'' contains the commands. For example, if VolViewer is to be a viewing tool for an external program, e.g. a Matlab program, then the file.txt could contain<br>
 
where ''file.txt'' contains the commands. For example, if VolViewer is to be a viewing tool for an external program, e.g. a Matlab program, then the file.txt could contain<br>
 
  open_image_stack(0, 'E:\VOLUME DATA\ScanID1934_Leaf1\')
 
  open_image_stack(0, 'E:\VOLUME DATA\ScanID1934_Leaf1\')
where ''ScanID1934_Leaf1'' is a directory containing a stack of images.<br><br>
+
where ''ScanID1934_Leaf1'' is a directory containing a stack of images. VolViewer will automatically load and display these images as soon as it finds that the watchfile has been updated.<br><br>
  
 
[http://dmbi.nbi.bbsrc.ac.uk/index.php/VolViewerScriptsAPI#Examples Other examples]
 
[http://dmbi.nbi.bbsrc.ac.uk/index.php/VolViewerScriptsAPI#Examples Other examples]
 
==Matlab to Volviewer==
 
==Matlab to Volviewer==

Revision as of 11:54, 28 February 2012

Back to VolViewer overview

See also

MSR file specification MSR file specification (MSR stands for Measure.) MSR files describe 3D objects and are used to pass data between the 3D BanghamLab toolboxes: VolViewer, GFtbox and AAMToolbox.
VolViewerScriptsAPI The VolViewerScriptsAPI enables external applications, such as the AAMToolbox, to exploit VolViewer.

VolViewer scripting and accessing VolViewer from Matlab

VolViewer scripting

A script is a limited form of program - a list of commands. In this case the commands (http://dmbi.nbi.bbsrc.ac.uk/index.php/VolViewerScriptsAPI see VolViewerScriptsAPI]) cover most of the operations that you would usually do interactively. On Windows, VolViewer is an exe file that can either be
interactive, i.e. launched by clicking its icon or from the command prompt using the command

VolViewer.exe

or scripted. In which case the operations (commands) are stored in a script file. In which case VolViewer is launched with

VolViewer set_watchfile('file.txt')

where file.txt contains the commands. For example, if VolViewer is to be a viewing tool for an external program, e.g. a Matlab program, then the file.txt could contain

open_image_stack(0, 'E:\VOLUME DATA\ScanID1934_Leaf1\')

where ScanID1934_Leaf1 is a directory containing a stack of images. VolViewer will automatically load and display these images as soon as it finds that the watchfile has been updated.

Other examples

Matlab to Volviewer