VolViewer Scripting in more detail: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
[[VolViewer#User Documentation|Back to VolViewer overview]]<br> | [[VolViewer#User Documentation|Back to VolViewer overview]]<br> | ||
===See also=== | |||
[http://rico-coen.jic.ac.uk/LabGuide/index.php?title=MSR3_File_Specification 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.<br> | |||
[http://dmbi.nbi.bbsrc.ac.uk/index.php/VolViewerScriptsAPI VolViewerScriptsAPI] The VolViewerScriptsAPI enables external applications, such as the AAMToolbox, to exploit VolViewer. | |||
=VolViewer scripting and accessing VolViewer from Matlab= | =VolViewer scripting and accessing VolViewer from Matlab= | ||
==VolViewer scripting== | ==VolViewer scripting== |
Revision as of 11:03, 27 February 2012
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. It can either be launched by clicking its icon or from the command prompt using the command
VolViewer.exe
Normally VolViewer runs interactively this is how you would discover how best to filter and view an image stack. That done it is tedious to then repeat the operations on all stacks in a sequence. The alternative is to list the operations (commands) in a script file and tell VolViewer to follow the commands. To do this one launches VolViewer giving the name of a text file that contains the script. For example, if the script is contained in a file called 'myscript.txt' in the same path (directory) as VolViewer itself then VolViewer should be launched using the command
VolViewer.exe open_script('myscript.txt')
VolViewer will open, execute the operations in 'myscript.txt' and close again with no further actions by the user (you).
The following is an example of 'myscript.txt' . It opens an image called 'Anti_Flower 294 (gfp1+txr+vis)' in a directory called 'E:\VOLUME DATA', filters it, save a projection and saves the processed stack.
'myscript.txt' contains open_image_stack(0, 'E:\VOLUME DATA\Anti_Flower 294 (gfp1+txr+vis)\') compute_GPUfilter_AnisotropicDiffusion(0, 5.0, 0.1, 10) save_projection('E:\VOLUME DATA\Projections\Anti_Flower 294 (gfp1+txr+vis).png') save_image_stack('E:\VOLUME DATA\Anti_Flower 294 (gfp1+txr+vis)\Filtered\')