StackReg: complex eigenvalue error

imagej
plugin
macro

#1

Hi,

I’m using a macro to align sets of images using the StackReg plugin, however, I keep getting the error “Warning: complex eigenvalue found; ignoring imaginary part.” The images do get aligned, but the error message exits the plugin and prevents the macro from running further. I was wondering if there was some way to get rid of the error so the macro keeps running. Here is the code I am running:

run("Make Montage...", "columns=1 rows=3 scale=1");
run("Montage to Stack...", "images_per_row=2 images_per_column=3 border=0");
run("StackReg ", "transformation=[Rigid Body]");
run("Stack to Images");

selectWindow("Stack-0002");
saveAs("Tiff", "/Users/firstname.lastname/Documents/Rizzo Lab/Experiments/FRET Efficiency/11_16_17/mTurqmVen/Dish 1/R/cc/" + title);
selectWindow("Stack-0001");
saveAs("Tiff", "/Users/firstname.lastname/Documents/Rizzo Lab/Experiments/FRET Efficiency/11_16_17/mTurqmVen/Dish 1/L/cc/" + title);

selectWindow("Stack-0004");
saveAs("Tiff", "/Users/firstname.lastname/Documents/Rizzo Lab/Experiments/FRET Efficiency/11_16_17/mTurqmVen/Dish 1/R/yy/" + title);
selectWindow("Stack-0003");
saveAs("Tiff", "/Users/firstname.lastname/Documents/Rizzo Lab/Experiments/FRET Efficiency/11_16_17/mTurqmVen/Dish 1/L/yy/" + title);

selectWindow("Stack-0006");
saveAs("Tiff", "/Users/firstname.lastname/Documents/Rizzo Lab/Experiments/FRET Efficiency/11_16_17/mTurqmVen/Dish 1/R/cy/" + title);
selectWindow("Stack-0005");
saveAs("Tiff", "/Users/firstname.lastname/Documents/Rizzo Lab/Experiments/FRET Efficiency/11_16_17/mTurqmVen/Dish 1/L/cy/" + title);

#2

Hi @vishnu_rao,

I have little experience with this plugin but I have invited the author of StackReg to join this thread, perhaps he can offer some assistance.

You can also have a look at the source code which is available from the StackReg site (see line 471 for error message).

Have you looked at other registration plugins for ImageJ, such as register virtual stack slices?


#3

Thanks, yeah I have looked at the register virtual stack slices plugin. It doesn’t work either and since I have multiple stacks of six images (I am imaging cells in different fluorescent channels), it probably isn’t the easiest to use.

I’m not too great at programming, but I will try to look over the source code and figure it out. The StackReg plugin does align the images it’s just that the error message exits the macro. I don’t know if it’s somehow possible to delete that line with the error message