Re: TrakEM2 registration of new images
Posted by
Albert Cardona-2 on
Dec 05, 2013; 4:35am
URL: http://imagej.273.s1.nabble.com/TrakEM2-registration-of-new-images-tp5005767p5005822.html
2013/12/4 Ashwin <
[hidden email]>
> Hi Albert,
>
> I had another question regarding the same;
>
> The old project with the treelines was created from another project with
> much larger images. This was done to make scrolling faster. I fear when I
> add new images to this project and re-register the images the new
> transformations will leave many gaping spaces between the images as the
> sibling project does not have any overlaps between the images.
>
> I also realizes that I cant transfer treelines between a sibling project
> (with smaller images for easy scrolling) and its parent project with larger
> images as the image ids do not match.
>
> How do we tackle this problem? Any ideas would be great.
>
If only a scaling factor separates the large vs the small version of the
projects, then write a script to copy the Treeline objects from one to the
other, with a multiplication in the x,y by the scale. Using jython and the
TrakEM2 API, the script will be rather short. Notice that the clone method
of the Treeline has a Project argument, i.e. when cloning you can assign
the object to a different Project. If the IDs of the layers are the same,
that will help lots. Otherwise you'll have to write a few more lines in
your script to transfer the layer IDs.
Get the open Project instances with the static call Project.getProjects(),
and then call getRootLayerSet on them to get the LayerSet that contains the
e.g. Treelines.
http://fiji.sc/wiki/index.php/TrakEM2_Scriptinghttp://www.ini.uzh.ch/~acardona/api/ini/trakem2/display/LayerSet.htmlhttp://www.ini.uzh.ch/~acardona/api/ini/trakem2/display/Treeline.htmlAlbert
--
http://albert.rierol.nethttp://www.ini.uzh.ch/~acardona/--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html