VolViewer access from Matlab: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[VolViewer Scripting in more detail|Return to VolViewer Scripting]]<br> | |||
[[VolViewer|Return to VolViewer]]<br> | |||
===VolViewer class libary=== | ===VolViewer class libary=== | ||
Within Matlab, detailed help on each function can be obtained by right-clicking the name or typing | |||
help functionname | |||
*'''VolViewer'''.m | *'''VolViewer'''.m | ||
**''VOL=VolViewer;'' % creates a VolViewer object | **''VOL=VolViewer;'' % creates a VolViewer object | ||
*'''set'''.m | **Usage | ||
**''VOL=set(VOL,'attribute',value);'' % sets an attribute (field) in the VolViewer object. More than one attribute:value pair can be set in one call. | *** data.VO=VolViewer(1,'D:\VolViewer_x64','D:\VolViewer_x64');<br>where 'D:\VolViewer_x64' is the location of VolViewer on the current computer. | ||
*'''get'''.m | **Access functions | ||
**''attribs=get(VOL,'attribute1','attribute2');'' % gets a attributes (field) from the VolViewer object. More than one can be retrieved in one call. ''attribs'' is a cell array. | **'''set'''.m | ||
*'''display'''.m | ***''VOL=set(VOL,'attribute',value);'' % sets an attribute (field) in the VolViewer object. More than one attribute:value pair can be set in one call. | ||
**''VOL'' %This overloads the normal display routine. Thus, leaving off the semicolon causes the object to be displayed | **'''get'''.m | ||
***''attribs=get(VOL,'attribute1','attribute2');'' % gets a attributes (field) from the VolViewer object. More than one can be retrieved in one call. ''attribs'' is a cell array. | |||
**'''display'''.m | |||
***''VOL'' %This overloads the normal display routine. Thus, leaving off the semicolon causes the object to be displayed | |||
*'''commandsVOL'''.m | |||
**[VOL,SoftError]=commandsVOL(VOL,varargin)<br> | |||
**Where VOL is a VolViewer object, and varargin is a series of VolViewer arguments, e.g. 'set_channels(0, 0, 0)','open_msr('somepath\file.msr')' | |||
*'''imshowVOL'''.m | |||
**''VOL=imshowVOL(VOL,'PathToImages','E:\MATLAB\3D Arabidopsis Leaf Shape Models\SN20#1L1_x0p98y0p98z0p80conf');'' %Where 'SN20#1L1_x0p98y0p98z0p80conf' is the name of a directory containing a stack of png images to be displayed in VolViewer. The command will '''automatically create a VolViewer object''' - which should be used in any further calls to VolViewer. Unfortunately, there is (at present) no way for Matlab to verify that VolViewer is actually running, so don't close it causually. | |||
**Usage | |||
***VO=imshowVOL(VO, 'PathTo', PathName); % where Pathname is the path to the '''directory''' containing the image stack. | |||
===VolViewer auxilary library - uses the class library=== | ===VolViewer auxilary library - uses the class library=== | ||
*''' | *'''VolVTemplateEditor'''.m | ||
** | **AAMToolbox helper. VolVTemplateEditor read an image stack and, optionally an MSR (shape result file) file, into VolViewer and Matlab. It outputs the data in two data structures, an MSR data structure and a data structure compatible with the AAMToolbox. | ||
===VolViewer demonstrations=== | ===VolViewer demonstrations=== |
Latest revision as of 17:21, 16 March 2012
Return to VolViewer Scripting
Return to VolViewer
VolViewer class libary
Within Matlab, detailed help on each function can be obtained by right-clicking the name or typing
help functionname
- VolViewer.m
- VOL=VolViewer; % creates a VolViewer object
- Usage
- data.VO=VolViewer(1,'D:\VolViewer_x64','D:\VolViewer_x64');
where 'D:\VolViewer_x64' is the location of VolViewer on the current computer.
- data.VO=VolViewer(1,'D:\VolViewer_x64','D:\VolViewer_x64');
- Access functions
- set.m
- VOL=set(VOL,'attribute',value); % sets an attribute (field) in the VolViewer object. More than one attribute:value pair can be set in one call.
- get.m
- attribs=get(VOL,'attribute1','attribute2'); % gets a attributes (field) from the VolViewer object. More than one can be retrieved in one call. attribs is a cell array.
- display.m
- VOL %This overloads the normal display routine. Thus, leaving off the semicolon causes the object to be displayed
- commandsVOL.m
- [VOL,SoftError]=commandsVOL(VOL,varargin)
- Where VOL is a VolViewer object, and varargin is a series of VolViewer arguments, e.g. 'set_channels(0, 0, 0)','open_msr('somepath\file.msr')'
- [VOL,SoftError]=commandsVOL(VOL,varargin)
- imshowVOL.m
- VOL=imshowVOL(VOL,'PathToImages','E:\MATLAB\3D Arabidopsis Leaf Shape Models\SN20#1L1_x0p98y0p98z0p80conf'); %Where 'SN20#1L1_x0p98y0p98z0p80conf' is the name of a directory containing a stack of png images to be displayed in VolViewer. The command will automatically create a VolViewer object - which should be used in any further calls to VolViewer. Unfortunately, there is (at present) no way for Matlab to verify that VolViewer is actually running, so don't close it causually.
- Usage
- VO=imshowVOL(VO, 'PathTo', PathName); % where Pathname is the path to the directory containing the image stack.
VolViewer auxilary library - uses the class library
- VolVTemplateEditor.m
- AAMToolbox helper. VolVTemplateEditor read an image stack and, optionally an MSR (shape result file) file, into VolViewer and Matlab. It outputs the data in two data structures, an MSR data structure and a data structure compatible with the AAMToolbox.