Skip to content
Olivier Burri edited this page Jun 10, 2015 · 9 revisions

h1. How to use EasyXT

EasyXT is intended to 'feel' more like classical Matlab when communicating with Imaris. A problem when we use the provided ImarisLib.jar file as-is is that it looks more like Java Syntax than Matlab Syntax. For example:

    object = parent.GetChild(i-1);
    objName = char(object.GetName);

See the char() cast? We should not have to care that GetName returns a String and not a Char, like Matlab expects. This is why we want to hide such things to get a result closer to this

    objName = XT.GetName(object);

Note the XT here is a variable that was initialized by calling

    XT = EasyXT;

Which handled the connection to a currently opened Imaris Session directly.

The idea was to have some complete help pages directly in Matlab so that you could easily consult the options available in each function as 'Property' value pairs, as they are known.

This means that instead of having explicit inputs that need to be put in a particular order like

    my_spots = XT.GetObject('Spots', 1, folder); %(Which won't work, btw)

you can enter something like:

    my_spots = XT.GetObject('Type', 'Spots', 'Parent', folder, 'Number', 1);

This selects the first 'Spots' type object from within the group represented by the variable 'folder'. As such. 'Type' is a Property and 'Spots' is the value of that property. The fact that it is first and before the 'Number' property is a choice, but you could just as easily write

    my_spots = XT.GetObject('Parent', folder, 'Type', 'Spots', 'Number', 1);

Clone this wiki locally