VolViewer commands by function: Difference between revisions

From BanghamLab
Jump to navigation Jump to search
No edit summary
No edit summary
Line 57: Line 57:
|-
|-
|  ||set_close() || close VolViewer
|  ||set_close() || close VolViewer
|-valign="top"
|  ||wait_for_quit() || queues subsequent commands which are then executed when the user closes the application.
|-
|-
|  ||set_hide() || hide VolViewer
|  ||set_hide() || hide VolViewer

Revision as of 18:34, 1 March 2012

Return to VolViewer Scripting in more detail
Full list of VolViewerScriptsAPI

Selection of VolViewer commands

The Matlab 'VolViewer' class library provides commandsVOL which will pass commands to VolViewer, e.g. in Matlab

VO=commandsVOL(VO,'set_clear_all_MSR()')

VO is a VolViewer object created by Matlab when it launches VolViewer with

VO=VolViewer(1,'D:\VolViewer_x64','D:\VolViewer_x64')

where 'D:\VolViewer_x64' is the path to both VolViewer itself and the location of a 'WatchFile.txt' into which commands are written.

Image open_image_stack(int channel, 'somepath\slice000.png') 0 all, 1 red, 2 green, 3 blue, directory of image slices
save_image_stack('somepath')
open_image_raw(int channel, 'somepath\myfile.raw')
save_image_raw('somepath\file.dat')
open_omero_image('imageid') (in preparation)
save_omero_image('name', 'description') (in preparation)
--------
Objects open_msr('somepath\file.msr') points, lines and facets placed around images
save_msr('somepath\file.msr')
set_clear_all_MSR() clears the points, lines and facets
open_slc('somepath\file.slc') clipping planes
save_tfn('somepath\file.slc')
open_tfn('somepath\file.tfn')') transfer function, i.e. brightness/contrast/thresholds
save_tfn('somepath\file.tfn')
--------
Viewing set_orientation(float angleX, float angleY, float angleZ) set the current view based on the three Euler floating point angles specified in degrees.
set_projection_mode('mode') projection rendering mode based on the mode text. The function supports, MIP and SUM projection modes
open_slc('somepath\file.slc') clipping planes
set_channels(int red, int green, int blue) 0 sets colour channel off, 1 turns it on. 0,0,0 turns off all channels, i.e. hides the image
set_zoom(float zoomamount) percentage
set_shader(int shader_mode) 0: No Lighting, 1: Photorealistic Lighting, 2: Non-Photorealistic Lighting, 3: Depth Peal (also see, depthpeal, depthcue, gooch_lighting, light_colour,
--------
Interface set_watchfile('file.txt') sets the VolViewer to watch a specific ascii file: automatically installed by Matlab functions
set_logfile('log.txt') set the debug output to a text file. Note under windows this will also hide the application console if it exists
set_close() close VolViewer
wait_for_quit() queues subsequent commands which are then executed when the user closes the application.
set_hide() hide VolViewer
set_show() show VolViewer
set_hide_menubars() hide menubars
set_show_menubars() show menubars
set_hide_orthosections() hide orthosections
set_show_orthosections() show orthosections

}