Registration help

Hi all,

I’m trying to register images together but am having issues for something that looks quite simple visually but somehow StackReg is failing.

Images were not the same size due to the automatic stitching of the microscope so I resized the canvas to have the same size. I’ve tried Rigid Body, Scaled Rotation and Affine and got weird results.

Making landmarks works but I was looking for an automatic way. If you have any advice, they would be welcome. Images are available here.

Thanks all !

Interesting: when I try opening your ics/ids dataset with #bio-formats, I get the following error:

Stack trace
(Fiji Is Just) ImageJ 2.0.0-rc-69/1.52n; Java 1.8.0_172 [64-bit]; Windows 7 6.1; 1164MB of 98139MB (1%)
 
java.lang.IllegalArgumentException: Illegal group reference
	at java.util.regex.Matcher.appendReplacement(Matcher.java:857)
	at java.util.regex.Matcher.replaceAll(Matcher.java:955)
	at java.lang.String.replaceAll(String.java:2223)
	at loci.plugins.in.ImagePlusReader.constructSliceLabel(ImagePlusReader.java:601)
	at loci.plugins.in.ImagePlusReader.readPlanes(ImagePlusReader.java:392)
	at loci.plugins.in.ImagePlusReader.readImage(ImagePlusReader.java:282)
	at loci.plugins.in.ImagePlusReader.readImages(ImagePlusReader.java:243)
	at loci.plugins.in.ImagePlusReader.readImages(ImagePlusReader.java:221)
	at loci.plugins.in.ImagePlusReader.openImagePlus(ImagePlusReader.java:116)
	at loci.plugins.in.Importer.readPixels(Importer.java:149)
	at loci.plugins.in.Importer.run(Importer.java:86)
	at loci.plugins.LociImporter.run(LociImporter.java:78)
	at ij.IJ.runUserPlugIn(IJ.java:229)
	at ij.IJ.runPlugIn(IJ.java:193)
	at ij.IJ.runPlugIn(IJ.java:182)
	at HandleExtraFileTypes.openImage(HandleExtraFileTypes.java:499)
	at HandleExtraFileTypes.run(HandleExtraFileTypes.java:72)
	at ij.IJ.runUserPlugIn(IJ.java:229)
	at ij.IJ.runPlugIn(IJ.java:193)
	at ij.IJ.runPlugIn(IJ.java:182)
	at ij.io.Opener.openWithHandleExtraFileTypes(Opener.java:516)
	at ij.io.Opener.openImage(Opener.java:370)
	at ij.io.Opener.openImage(Opener.java:242)
	at ij.io.Opener.open(Opener.java:109)
	at ij.io.Opener.openAndAddToRecent(Opener.java:291)
	at ij.plugin.DragAndDrop.openFile(DragAndDrop.java:192)
	at ij.plugin.DragAndDrop.run(DragAndDrop.java:159)
	at java.lang.Thread.run(Thread.java:748)

Did you rename your original dataset?

I assume this is an issue in Bio-Formats, as opening via #scifio with File > Import > Image… succeeds.


StackReg is an intensity-based registration plugin. I would not expect is to work on images from different modalities, such as bright-field and fluorescence, which your data seem to be.

You could give the Descriptor-based registration plugin a try, but I suppose it will also fail, because there are no minima/maxima in your images that exactly correspond to each other.

Another option might be a simple similarity (translation&rotation&scaling) registration using the center of mass and the major axis of the tissue area in both your images (which requires some basic segmentation, of course).

Lastly, you might also try out ec-CLEM, an #icy plugin by @PerrineGilloteaux for multi-modal registration.

Hmmm true, I also get it… I’ll try to save it again and replace the files in the next minutes.

I’ll try that and let you know, thanks for pointing it out ! :slight_smile:

I’ve used this one in the past, but it’s similar to making landmarks aka not automatic, which I’m trying to get here :sweat_smile:

It might be due to the $ sign in the path that’s present in the ics file:

filename	\\biopz-jumbo\BZOB01$\_Members\guerard\Projects\DanielHam\Registration\Test_Forum.ids

(Note that important details about your IT infrastructure can leak inside certain file formats :wink: )

I don’t think so since it works using ome.tiff…

True, I always forget this… Is there a way to remove metadata from a file ? :sweat_smile:

hello, you can use autofinder for automatic registration see protocol http://icy.bioimageanalysis.org/protocol/AutomaticRegistration/
Modify it with selecting "already in the same orientation " in Autofinder. The link to your image is not working anymore so I can not test it. But this should be fully automatic then.

1 Like