Kevin,
one way to do it is to write a script for TrakEM2, where you set the
specific number (the label) that you want for each AreaList, as a property
of the AreaList. These are then used, when existing, for exporting into the
label stack.
Example script, in jython (
http://fiji.sc/TrakEM2_Scripting):project = Project.getProjects()
arealists = project.getRootLayerSet().getZDisplayables(AreaList)
for i, arealist in enumerate(arealists):
print i, arealist.getId()
arealist.setProperty("label", str(i))
The AmiraImporter does the same thing:
https://github.com/fiji/TrakEM2/blob/master/TrakEM2_/src/main/java/ini/trakem2/io/AmiraImporter.java#L190... and then the label stack exporter reads the "label" property if it
exists:
https://github.com/fiji/TrakEM2/blob/master/TrakEM2_/src/main/java/ini/trakem2/display/AreaList.java#L917Albert
2013/12/5 Kevin Keraudren <
[hidden email]>
> Hi,
> I created a project in TrackEM2, defined the "Project Objects" and drew
> the areaLists. Now I would like to use "AreaLists as labels (tif)" so that
> I can save the segmentation and use it outside of ImageJ, for instance with
> a Python or Matlab script.
> How can I get the correspondence between the labels in the tiff image and
> the hierarchical organisation created in Project objects? How can I know
> that label-1 is cytoplasm-1, label-2 is nuclei-1, label-3 is background,
> label-4 is cytoplasm-2 and so on?
> Thanks for your help,
> Kind regards,
> Kevin
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
http://albert.rierol.nethttp://www.ini.uzh.ch/~acardona/--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html