Error attempting alignment of multichannel TIFF (and workaround)

Issue: Attempting to open the interactive image alignment dialog throws an error when a particular type of TIFF is used.

Goal: Align a multichannel TIFF with brightfield NDPI image sets.

TIFF: The file was generated in R from a 3D matrix using the writeTIFF function, I think. The file started out being read by FIJI as a Z stack, but in FIJI the properties were set so that it had the correct pixel size and channel count (C=14, Z=1). Original image shared privately.

Popup error: This method is not supported by this color model.
Image Tab:
image

Some attempts to get around this include:
Trying to open the TIFF with BioFormats-> There is no response, no error, no message in the log, it just ignores the file.
Save TIFF as ome.tiff in FIJI->Success, as the file is opened with BioFormats, and image alignment is now allowed.

Full text of error in log:

INFO: Opening file:/G:/Elem_map_tiff_multiband.tif fully, estimated 1 MB (max memory 16348 MB)
INFO: Image data set to ImageData: Not set, Elem_map_tiff_multiband.tif
ERROR: QuPath exception: This method is not supported by this color model
    at java.desktop/java.awt.image.ColorModel.getAlpha(Unknown Source)
    at java.desktop/java.awt.image.ColorModel.getRGB(Unknown Source)
    at java.desktop/sun.java2d.loops.OpaqueCopyAnyToArgb.Blit(Unknown Source)
    at java.desktop/sun.java2d.loops.GraphicsPrimitive.convertFrom(Unknown Source)
    at java.desktop/sun.java2d.loops.GraphicsPrimitive.convertFrom(Unknown Source)
    at java.desktop/sun.java2d.loops.MaskBlit$General.MaskBlit(Unknown Source)
    at java.desktop/sun.java2d.loops.Blit$GeneralMaskBlit.Blit(Unknown Source)
    at java.desktop/sun.java2d.pipe.DrawImage.blitSurfaceData(Unknown Source)
    at java.desktop/sun.java2d.pipe.DrawImage.renderImageCopy(Unknown Source)
    at java.desktop/sun.java2d.pipe.DrawImage.copyImage(Unknown Source)
    at java.desktop/sun.java2d.pipe.DrawImage.copyImage(Unknown Source)
    at java.desktop/sun.java2d.pipe.ValidatePipe.copyImage(Unknown Source)
    at java.desktop/sun.java2d.SunGraphics2D.drawImage(Unknown Source)
    at java.desktop/sun.java2d.SunGraphics2D.drawImage(Unknown Source)
    at javafx.embed.swing.SwingFXUtils.toFXImage(SwingFXUtils.java:84)
    at qupath.lib.gui.align.ImageAlignmentPane$ImageEntryCell.updateItem(ImageAlignmentPane.java:968)
    at qupath.lib.gui.align.ImageAlignmentPane$ImageEntryCell.updateItem(ImageAlignmentPane.java:925)
    at javafx.scene.control.ListCell.updateItem(ListCell.java:478)
    at javafx.scene.control.ListCell.indexChanged(ListCell.java:337)
    at javafx.scene.control.IndexedCell.updateIndex(IndexedCell.java:120)
    at javafx.scene.control.skin.VirtualFlow.setCellIndex(VirtualFlow.java:1742)
    at javafx.scene.control.skin.VirtualFlow.getCell(VirtualFlow.java:1726)
    at javafx.scene.control.skin.VirtualFlow.getCellLength(VirtualFlow.java:1852)
    at javafx.scene.control.skin.VirtualFlow.computeViewportOffset(VirtualFlow.java:2755)
    at javafx.scene.control.skin.VirtualFlow.layoutChildren(VirtualFlow.java:1245)
    at javafx.scene.Parent.layout(Parent.java:1206)
    at javafx.scene.Parent.layout(Parent.java:1213)
    at javafx.scene.Parent.layout(Parent.java:1213)
    at javafx.scene.Parent.layout(Parent.java:1213)
    at javafx.scene.Parent.layout(Parent.java:1213)
    at javafx.scene.Parent.layout(Parent.java:1213)
    at javafx.scene.Parent.layout(Parent.java:1213)
    at javafx.scene.Scene.doLayoutPass(Scene.java:576)
    at javafx.scene.Scene.preferredSize(Scene.java:1748)
    at javafx.scene.Scene$2.preferredSize(Scene.java:393)
    at com.sun.javafx.scene.SceneHelper.preferredSize(SceneHelper.java:66)
    at javafx.stage.Window$12.invalidated(Window.java:1086)
    at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:110)
    at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:145)
    at javafx.stage.Window.setShowing(Window.java:1174)
    at javafx.stage.Window.show(Window.java:1189)
    at javafx.stage.Stage.show(Stage.java:273)
    at qupath.lib.gui.align.ImageAlignmentPane.<init>(ImageAlignmentPane.java:432)
    at qupath.lib.gui.align.InteractiveImageAlignmentCommand.run(InteractiveImageAlignmentCommand.java:31)
    at qupath.lib.gui.QuPathGUI.lambda$createCommandAction$60(QuPathGUI.java:3619)
    at org.controlsfx.control.action.Action.handle(Action.java:419)
    at org.controlsfx.control.action.Action.handle(Action.java:64)
    at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
    at javafx.event.Event.fireEvent(Event.java:198)
    at javafx.scene.control.MenuItem.fire(MenuItem.java:459)
    at com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.doSelect(ContextMenuContent.java:1380)
    at com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.lambda$createChildren$12(ContextMenuContent.java:1333)
    at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
    at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
    at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
    at javafx.event.Event.fireEvent(Event.java:198)
    at javafx.scene.Scene$MouseHandler.process(Scene.java:3862)
    at javafx.scene.Scene.processMouseEvent(Scene.java:1849)
    at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2590)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:409)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:299)
    at java.base/java.security.AccessController.doPrivileged(Unknown Source)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:447)
    at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:412)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:446)
    at com.sun.glass.ui.View.handleMouseEvent(View.java:556)
    at com.sun.glass.ui.View.notifyMouse(View.java:942)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
    at java.base/java.lang.Thread.run(Unknown Source)

Which now leads to the next error! Now that the image alignment dialog can be opened with the OME-TIFF, attempting to align the images (using the annotations outlining them) results in an “Dimensions too large” error, shown below.

Note that the pixel size difference between the two images is VERY large, due to the method by which the multichannel image was taken (0.22um vs 50um).

Increasing the pixel size to 100 results in the “results did not converge” error.

WARN: Region request is too large for 270x433 image: 491cbbc2-6c36-44b6-b28f-2f0621da6e3f: x=0, y=0, w=270, h=433, z=0, t=0, downsample=0.4
ERROR: QuPath exception: Dimensions (width=170240 height=241920) are too large
    at java.desktop/java.awt.image.SampleModel.<init>(Unknown Source)
    at java.desktop/java.awt.image.ComponentSampleModel.<init>(Unknown Source)
    at java.desktop/java.awt.image.PixelInterleavedSampleModel.<init>(Unknown Source)
    at java.desktop/java.awt.image.PixelInterleavedSampleModel.createCompatibleSampleModel(Unknown Source)
    at java.desktop/sun.awt.image.ByteInterleavedRaster.createCompatibleWritableRaster(Unknown Source)
    at qupath.lib.awt.common.BufferedImageTools.resize(BufferedImageTools.java:301)
    at qupath.lib.images.servers.AbstractTileableImageServer.readBufferedImage(AbstractTileableImageServer.java:359)
    at qupath.lib.images.servers.AbstractTileableImageServer.readBufferedImage(AbstractTileableImageServer.java:35)
    at qupath.lib.gui.align.ImageAlignmentPane.autoAlign(ImageAlignmentPane.java:761)
    at qupath.lib.gui.align.ImageAlignmentPane.autoAlign(ImageAlignmentPane.java:730)
    at qupath.lib.gui.align.ImageAlignmentPane.lambda$new$6(ImageAlignmentPane.java:300)
    at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
    at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
    at javafx.event.Event.fireEvent(Event.java:198)
    at javafx.scene.Node.fireEvent(Node.java:8890)
    at javafx.scene.control.Button.fire(Button.java:203)
    at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:206)
    at com.sun.javafx.scene.control.inputmap.InputMap.handle(InputMap.java:274)
    at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
    at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
    at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
    at javafx.event.Event.fireEvent(Event.java:198)
    at javafx.scene.Scene$MouseHandler.process(Scene.java:3862)
    at javafx.scene.Scene.processMouseEvent(Scene.java:1849)
    at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2590)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:409)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:299)
    at java.base/java.security.AccessController.doPrivileged(Unknown Source)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:447)
    at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:412)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:446)
    at com.sun.glass.ui.View.handleMouseEvent(View.java:556)
    at com.sun.glass.ui.View.notifyMouse(View.java:942)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
    at java.base/java.lang.Thread.run(Unknown Source)

Results did not converge when increasing pixel size

ERROR: Estimate transform: Unable to estimated transform - result did not converge
ERROR: Unable to estimate transform
    at org.bytedeco.opencv.global.opencv_video.findTransformECC(Native Method)
    at qupath.lib.gui.align.ImageAlignmentPane.autoAlign(ImageAlignmentPane.java:809)
    at qupath.lib.gui.align.ImageAlignmentPane.autoAlign(ImageAlignmentPane.java:730)
    at qupath.lib.gui.align.ImageAlignmentPane.lambda$new$6(ImageAlignmentPane.java:300)
    at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
    at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
    at javafx.event.Event.fireEvent(Event.java:198)
    at javafx.scene.Node.fireEvent(Node.java:8890)
    at javafx.scene.control.Button.fire(Button.java:203)
    at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:206)
    at com.sun.javafx.scene.control.inputmap.InputMap.handle(InputMap.java:274)
    at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
    at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
    at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
    at javafx.event.Event.fireEvent(Event.java:198)
    at javafx.scene.Scene$MouseHandler.process(Scene.java:3862)
    at javafx.scene.Scene.processMouseEvent(Scene.java:1849)
    at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2590)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:409)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:299)
    at java.base/java.security.AccessController.doPrivileged(Unknown Source)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:447)
    at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:412)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:446)
    at com.sun.glass.ui.View.handleMouseEvent(View.java:556)
    at com.sun.glass.ui.View.notifyMouse(View.java:942)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
    at java.base/java.lang.Thread.run(Unknown Source)

It may be that the pixel size prevents the alignment function from being used at this time, but any advice on how to proceed would be appreciated. The images line up reasonably well as is (see picture above), but that won’t be the case for every image.

If a project file would be helpful, I can zip one of those up!

Can you expand upon this?

The Interactive image alignment is very rough & unfinished (experimental), and not something I have any time to work in the near future. But, in itself, it won’t let you do much beyond look at the images anyway.

So is the goal to make screenshots, determine an affine transform, or something else? There might be another tool that is a better fit for whatever you want to do.

We would like to find where the multichannel intensities overlap with objects created from the set of brightfield images, acknowledging that the resolution on the “IF” images is very poor in comparison.
Options include

  1. Create simple threshold objects in the IF image and move them over to the brightfield images to see where they overlap with brightfield objects.
  2. Take brightfield objects, move them into the “IF” images, run Add Intensity Features, and then move them back.

I suppose the affine transform is the main goal, as long as that can be used to move objects back and forth.
@smcardle may have other ideas.

If it’s the Affine transform you need, wouldn’t it be possible to create an RGB version of the fluorescence image (e.g. flatten it in Fiji) first? That should be a lot more manageable.

It is possible, and I can invert it as well to make the background white, but the same two errors result. Dimensions are too large, or it fails to converge if I make the Pixel size huge in order to avoid the Dimension error.

One more thing I noticed. If I play with the slider, it doesn’t seem that the overlay is using the pixel size information to match up the images.
image
When I used “Match viewer resolutions” in multiview, the images line up nicely as shown before. When I used the slider to view the two pre-aligned images within the same viewer the size is drastically wrong. What is shown in the last image is the edge of the slide.

I’m wondering if it’s trying to use the Magnification setting which is missing, currently.
That does not seem to be it. It looks like the images are initially aligned by the top left pixel, and pixel matched regardless of the pixel size metadata.
I can adjust the zoom values of the affine transform manually to get the size fairly close, but there is still the Dimension error as it tries to load the whole slide image into a single region request.

The auto-align method doesn’t currently handle differing pixel sizes. It probably should, but it’s not immediately clear to me how to code it properly and it will take some time to investigate.

In the meantime, you can use the interactive tools (perhaps after initializing the transform manually to get the scale right) or script an alignment using OpenCV, as mentioned briefly here.

1 Like