bunwarpJ: Registration fails using macro call but succeeds if performed manually


I want to register Tissue Micro Array cores. While it works for many cores, I have some image pairs where image registration fails when performed using the macro call but is perfect if the registration is performed using the plug-in manually with the same settings. Due to the source of the images, their dimensions are not identical. Maybe this causes issues in the macro call? Attached are the results of the macro call and the manual registration as well as the example image pair bunwarpJ_bug.zip (3.6 MB).

Registered using bunwarpJ in manual mode:

Registered using bunwarpJ in macro mode:

------MACRO CALL------

// ImageJ version: 1.52r
// tested bunwarpJ versions: 2.6.8 ,2.6.9 ,2.6.10 ,2.6.11

// set variables
source ="D:/TMALynch_01_A01__round2_C3.tif";
target ="D:/TMALynch_01_A01__round1_C3.tif";
target_txt=target+ ".txt";

// open images
run("Bio-Formats Windowless Importer", "open=" + target);
run("Bio-Formats Windowless Importer", "open=" + source);

// call bunwarpJ 
run("bUnwarpJ", "source_image="+source+" target_image="+target+" registration=Mono image_subsample_factor=2 initial_deformation=[Very Coarse] final_deformation=[Super Fine] divergence_weight=0.1 curl_weight=0.1 landmark_weight=0 image_weight=1 consistency_weight=10 stop_threshold=0.01 save_transformations save_direct_transformation="+target_txt+" ");

Another observation:
When aligning 3 images the following way in a macro call using sub-sampling factor 4:
1 (target) <- 2 (source)
1 (target) <- 3 (source)

Image 2 and 3 overlap perfectly, but the target image 1 is shifted 6px up and 6px to the left. This shift is always the same in hundreds of images I have registered that way.

Any idea what could cause these issues ?
Thank you and best regards,



the bug has been fixed in version 2.6.12!
Thank you bunwarpJ team for your great work!!


1 Like