Imaris Open - Discussion Forum

This is a community discussion space where Imaris is the key topic. This forum will offer guidance to new users, technical as well as application support. Users from sites with a valid Imaris Infinity subscription will receive priority – however, the fastest way to get to the Bitplane Technical and Application Support team will continue to be via Asia, EU or US support mailboxes. Every registered user can add items to the forum. Non-registered users can read the forum but cannot add/comment, etc. All ideas, questions, suggestions and comments are welcome.

Advanced Search
Thread Author
Max. Age of Thread
Number of Posts
Thread Rating
HomeHomeXTensionsXTensionsPythonPythonCreating 2D SurfacesCreating 2D Surfaces
New Post
Creating 2D Surfaces
 
Greetings all,

This is my initial foray into ImarisXT xtension development, but I've read through the 8.4.1 python interface documentation, reviewed sample MATLAB code, successfully binded to a running ImarisXT instance and been able to query surfaces, spots and various other surpass scene objects. The data set I'm working with is a z-stack of about 7 slices output from a confocal scanner and converted to .tif for processing. A task I'm working on is to automate, outside of ImarisXT, within OpenCV, nuclear segmentation. What I've done is perform the segmentation for each 2D image in the z-stack, noting the contour boundaries and centroids for each nucleus. I'm looking to compare the segmentation results from OpenCV vs the segmentation done in Imaris.

What I'd like my xtension to achieve, in part, is to import a set of nuclear boundaries and centroids from a JSON file written out by OpenCV and create the corresponding surfaces in ImarisXT. Looking through the classes in ImarisXT I see that there is an AddSurface method with the following signature:

void Imaris::ISurfaces::AddSurfaces(tFloats 2D aVertices, tInts2D aTriangles, tFloats2D aNormals, int aTimeIndex)

My question is how to create a surface with only a set of (x,y) boundaries and a centroid for each nucleus I've segmented.

Here's example data that I have for each nucleus for a given slice of the z-stack from the confocal scan:

slice: 1
    nucleus: 1
        boundaries: [(x1, y1), (x2, y2), ..., (xn, yn)]
        centroid: (x,y)

I'm able to create the tFloats2D containing all the boundary verticies, but I'm not sure what values I'd use for aTriangles or aNormals.  The way I'm tracking a single nuclei between the 7 slices is by their centroid value. Later on I'd need to merge the surfaces created at each slice that have the same centroid into one surface, but for now I'm just concerned with how best to create the 2D surface, nucleus, given only the x,y boundaries and centroid listed above. Thank you for your help!

Paul
 
Copy Post URL
Hi Paul,

It is not possible to create 2D surfaces in Imaris. You can try to create 3D surfaces that all have the same z value, but probably there will be problems later, e.g. when Imaris is calculating the statistics for them.

Your boundary lines would nicely map to surface contour lines, but unfortunately, there is no XT interface for that.

I assume that the segmentation you do in Imaris produces surfaces. To compare them with the OpenCV segmentation you could write an XTension that creates from the boundaries a new channel which has intensities 1 inside, 0 outside of the boundaries. Then you can run the normal surface detection on that to generate surfaces.

To create the channel, use Imaris::IDataSet
void SetDataBytes (tBytes5D aData)
or
void SetDataSliceBytes (tBytes2D aData, int aIndexZ, int aIndexC, int aIndexT)

For more information how to use IDataSet, you can also have a look at the InvertMiddleSlice section of the XT Quickstart Tutorial.

Sacha
 
Copy Post URL


Post URL:
casque beats pas cher casque beats by dre pas cher beats by dre pas cher beats by dre pas cher maillot foot pas cher maillot de foot pas cher maillot foot pas cher 2014 maillot de foot pas cher maillot foot pas cher maillot de foot pas cher maillot foot pas cher 2014 maillot de foot pas cher maillot foot pas cher 2014 maillot de foot pas chere maillot foot pas cher maillot de foot pas cher Ralph Lauren Homme Polo Manche Longue Ralph Lauren Polo Ralph Lauren Pas Cher Homme Polo Ralph Lauren Homme Pas Cher Ralph Lauren Soldes Ralph Lauren Big Pony Ralph Lauren Soldes Ralph Lauren Big Pony Ralph Lauren Soldes Ralph Lauren Big Pony Ralph Lauren Soldes Ralph Lauren Big Pony