BIOP / ijp-imagetoatlas

ABBA - Aligning Big Brains and Atlases (2D sections to 3D atlas registration)
https://abba-documentation.readthedocs.io/en/latest/
45 stars 8 forks source link

ABBA not compatible with elastix 5.1.0 #171

Closed GuillaumeLeGoc closed 1 month ago

GuillaumeLeGoc commented 1 year ago

Hey there, Not sure if you prefer Image.sc forums for issues but here I am. First, thanks for this promising pipeline !

I am using Windows 10, I installed ABBA for Fiji following the step-by-step manual installation. I installed the latest Elastix (5.1.0). I'm using a sample stack of 5 TIFF images, with 4 channels, calibrated (1 pixel = 2 microns), pyramidal (with Kheops), QuPath sees them well, knows the pixel size and the multi-resolutions. ABBA sees the images as well, are properly calibrated, all channels look good, I can manipulate the slices, reorder, move, manually transform them (with the interactive tool). DeepSlice registration works.

Here's the problem : When I select a slice and perform Align > ABBA - Elastix Registration (Affine), with channels 0 for atlas and slices, the task never gets done (processors remain idle), the label "R" stays yellow, on the top left it is written "[...] (pending)" and on the bottom right there's this circle saying it's doing something on slice n. The console outputs this error :

> java.lang.UnsupportedOperationException  
>   at itc.transforms.elastix.ElastixTransform.load(ElastixTransform.java:266)  
>   at ch.epfl.biop.sourceandconverter.register.Elastix2DAffineRegister.run(Elastix2DAffineRegister.java:160)  
>   at ch.epfl.biop.scijava.command.source.register.Elastix2DAffineRegisterCommand.run(Elastix2DAffineRegisterCommand.java:72)  
>   at org.scijava.command.CommandModule.run(CommandModule.java:196)  
>   at org.scijava.module.ModuleRunner.run(ModuleRunner.java:163)  
>   at org.scijava.module.ModuleRunner.call(ModuleRunner.java:124)  
>   at org.scijava.module.ModuleRunner.call(ModuleRunner.java:63)  
>   at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:225)  
>   at java.util.concurrent.FutureTask.run(FutureTask.java:266)  
>   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)  
>   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)  
>   at java.lang.Thread.run(Thread.java:750)  
> [ERROR] Error during registration
> 

It is definitely an error with Elastix but it doesn't seem to provide any detail on the actual error. I did setup the elastix.exe and transformix.exe in BIOP > Set and Check Wrappers, and they work, given the test provided by this groovy script.

So... I'm at loss here, any suggestions are welcome. If I can provide any further details, let me know ! Is there a way to recover the actual elastix command generated by ABBA to try it directly from the Windows command prompt to see what Elastix says ?

Cheers !

NicoKiaru commented 1 year ago

Hum, weird. Can you try with elastix 5.0.1 instead of 5.1.0 ?

Can you also run:

image

And paste your configuration here ? Mine (which may be not the right one) gives:

OS and Dependencies Info

OS Windows 10
ImageJ 2.9.0
IJ 1.53t
ABBA 0.5.2-SNAPSHOT-55335e55e179843700add464f519039eec4e8aff
BigWarp 7.0.7
Bdv 10.4.3
Bdv Vistools 1.0.0-beta-31
Bdv Biop Tools 0.5.12
Bdv Playground 0.6.6
Biop Image Loader 0.4.4
Biop Wrappers 0.7.11
Registration Server 0.1.4
(Legacy) Bdv BioFormats 0.4.4
Updates sites: ImageJ Fiji Java-8 FLIMJ PTBIOP 
GuillaumeLeGoc commented 1 year ago

Hi, thanks for your quick answer. It does work with Elastix 5.0.1 ! Could have thought about this. Have you tried with Elastix 5.1.0 ? If it doesn't work for you too, maybe the documentation should mention to use Elastix 5.0.1.

For reference : OS and Dependencies Info

OS Windows 10
ImageJ 2.9.0
IJ 1.53t
ABBA 0.5.5
BigWarp 7.0.7
Bdv 10.4.3
Bdv Vistools 1.0.0-beta-31
Bdv Biop Tools 0.5.13
Bdv Playground 0.6.6
Biop Image Loader 0.4.9
Biop Wrappers 0.7.11
Registration Server 0.1.4
(Legacy) Bdv BioFormats 0.4.9
Updates sites: ImageJ Fiji Java-8 Bio-Formats PTBIOP

Cheers !

NicoKiaru commented 1 year ago

Done here: https://github.com/BIOP/ijp-imagetoatlas/commit/507bdcc7aa4b1aa808abfd95d0ffd06bc809303e

I let the issue opened because I'd like to fix what's going wrong with 5.1.0

imagesc-bot commented 1 year ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/help-for-abba-in-fiji-elastix-registration-affine/84269/2

GuillaumeLeGoc commented 2 months ago

Small note : elastix 5.2.0 does not work either.

NicoKiaru commented 1 month ago

Documentation needs to be updated

NicoKiaru commented 1 month ago

Done in documentation - to be released