Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; GeSHi has a deprecated constructor in /srv/disk1/aarpon/www/scs2.net/next/lib/geshi/geshi.php on line 259
Aaron Christian Ponti

Aaron Christian Ponti

Scientific Software Solutions

IceImarisConnector

Description  |  Download  |  API  |  API  |  Manual  |  Example

  Example

This is a trivial example that shows how to use IceImarisConnector in an Imaris XTensions. For the sake of clarity, no checks are performed.


Deprecated: Function create_function() is deprecated in /srv/disk1/aarpon/www/scs2.net/next/lib/geshi/geshi.php on line 4716
function exampleXT(aImarisApplicationID)
%
%    <CustomTools>
%      <Menu>
%        <Item name="Example XT" icon="Matlab" tooltip="Just an example.">
%          <Command>MatlabXT::exampleXT(%i)</Command>
%        </Item>
%      </Menu>
%    </CustomTools>
%
% This is a trivial XTension example using ImarisConnector
% It projects dataset and spots within a given z range and creates a plot
 
% Create an ImarisConnector object
conn = IceImarisConnector(aImarisApplicationID);
 
% Range to consider
z0 = 10; z = 15;
 
% Get the 3D volume from channel 0 and timepoint 0
stack = conn.getDataVolume(0, 0);
 
% Create a maximum intensity projection (MIP)
mip = max(stack(:, :, z0 : z), [], 3);
 
% This assumes that the selected object in the Surpass Scene is a Spots object
vSpots = conn.getSurpassSelection();
 
% Get the spot positions
pos = vSpots.GetPositionsXYZ();
 
% Convert the coordinates to voxel positions
posV = conn.mapPositionsUnitsToVoxels(pos);
 
% We only consider spots that are between planes z0 and z
posV(posV(:, 3) < z0 | posV(:, 3) > z, :) = [];
 
% Project and plot the spots on the MIP
figure; imshow(mip, []); hold on;
plot(posV(:, 2), posV(:, 1), 'ro');

  Example

Will follow soon.