3D (2D + time) elastic registration

Dear all,

I am looking for a plugin on ImageJ that could elastically register my 600 2D pictures of a brain slice, which I took over the time, in one go. So a plugin like http://bigwww.epfl.ch/thevenaz/stackreg/ StackReg, but with a BSpline mode.

I already tried https://imagej.net/BUnwarpJ BunwarpJ and with the help of @Christian_Tischer (thank you) Elastix - both give very satisfying results, however, they could just compare 2 pictures at once.

Thank you all for your ideas,


1 Like


Have you looked at the Linear Stack Alignment with SIFT tool by @axtimwalde? You can also look into TrakEM2 and registration features of that tool… also by @axtimwalde.

eta :slight_smile:


I tried TrakEM2, which also works for the registration, however after registration I am unable to multi measure different ROIs through the stack, which I need for my analysis.

I have not tried the SIFT method yet, I will definetely try that.

Thank you very much @etadobson


Could you turn on the macro recorder [ Plugins > Macros > Record ] while you register using BunwarpJ or Elastix? I would be curious what it records. Maybe one can write a time-loop around it (I could help).

1 Like

How different are they from one another ? Can’t you register each image to the average of your stack ?

Sorry for the late reply. @Christian_Tischer the macro recordings look like this:

run(“Compute Transformation (elastix)”);

for Elastix,

open(“C:/Users/Laura/Desktop/tiff/tiff/forsk 3-2_002.tif”);
open(“C:/Users/Laura/Desktop/tiff/tiff/forsk 3-2_200.tif”);
run(“bUnwarpJ”, “source_image=[forsk 3-2_200.tif] target_image=[forsk 3-2_002.tif] registration=Accurate image_subsample_factor=0 initial_deformation=Fine final_deformation=[Very Fine] divergence_weight=0 curl_weight=0 landmark_weight=0 image_weight=1 consistency_weight=10 stop_threshold=0.01”);
selectWindow(“forsk 3-2_002.tif”);

for BunwarpJ.

@NicoKiaru they are not very different from each other and registering each image to the average of my stack would be great, however I am not able to fin a program that does this with BSpline.