How to apply transformations estimated using the Elastic Alignment and Montage plugin to another stack?


I’m trying to perform a 3D reconstruction for serial sections using the Elastic Alignment and Montage plugin ( What I’d like to do, is to apply the estimated transformations to another image stack consisting of masks that define the tissue regions in the actual images.

There appears to be a plugin called Transform Virtual Stack Slices ( which does this for transformations estimated and saved using Register Virtual Stack Slices ( Is it possible to similarly somehow store and reapply the transformations in the case of Elastic Alignment and Montage plugin? If not, is it possible to circumvent the issue by storing the mask as some kind of separate channel (e.g. as an alpha channel), which does not influence the reconstruction process but still gets aligned along with the actual image?


@axtimwalde Any suggestions?

Hi, actually I already contacted Stephan Saalfeld and he suggested the following workaround:

The easiest way is probably to do the alignment in TrakEM2 (algorithm
is the same as in the plugin). Save the project and then make a copy
project in which you change the file-names to point to your mask
images. TrakEM2 projects are XML files, easy to read and modify, make
one and look into it and you will get the story.

I haven’t had the time to try it out yet, though.

1 Like

Hi, I have converged into the same workaround as suggested here but the problem is that TrackEM generates a bunch of additional files which are stored on disk. Updating the xml file didn’t work as when TrackEM tries to load it trows and error as it cannot find the associated files… any further suggestion on this will be deeply appreciated. Maybe one needs to generate a template and then “Load from template”? If this is the case, I am not sure how to do this.