VolViewer commands by function: Difference between revisions

From BanghamLab
Jump to navigation Jump to search
No edit summary
No edit summary
Line 8: Line 8:
where 'D:\VolViewer_x64' is the path to both VolViewer itself and the location of a 'WatchFile.txt' into which commands are written.
where 'D:\VolViewer_x64' is the path to both VolViewer itself and the location of a 'WatchFile.txt' into which commands are written.
{| border="0" cellpadding="1" cellspacing="1"
{| border="0" cellpadding="1" cellspacing="1"
|width="100pt"| '''Image'''||open_image_stack(int channel, 'somepath\slice000.png') 0 all, 1 red, 2 green, 3 blue, directory of image slices
|width="100pt"|'''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')
|  ||save_image_stack('somepath')
Line 21: Line 21:
|-
|-
| ||--------
| ||--------
|-valign="top"
| width="100pt"| '''Objects'''||open_msr('somepath\file.msr') ||points, lines and facets placed around images
|-
|-
| width="100pt"| '''Objects'''||open_msr('somepath\file.msr') points, lines and facets placed around images
|   ||save_msr('somepath\file.msr')
|-
|-
|  ||save_msr('somepath\file.msr')
|  ||set_clear_all_MSR()|| clears the points, lines and facets
|-
|-
|  ||open_slc('somepath\file.slc') clipping planes
|  ||open_slc('somepath\file.slc') clipping planes
Line 33: Line 35:
|-
|-
|  ||save_tfn('somepath\file.tfn')
|  ||save_tfn('somepath\file.tfn')
|-
| ||--------
|-valign="top"
| width="100pt"| '''Viewing'''||set_orientation(float angleX, float angleY, float angleZ) ||set the current view based on the three Euler floating point angles specified in degrees.
|-valign="top"
|  ||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
|-valign="top"
|  || 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,
|-
| ||--------
|- valign="top"
| width="100pt"| '''Interface'''||set_watchfile('file.txt') ||sets the VolViewer to watch a specific ascii file: automatically installed by Matlab functions
|-valign="top"
|  ||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
|-
|  ||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
}
}

Revision as of 18:32, 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
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

}