I have a large number of calcium imaging recordings monitoring cell activity over time (large TIF files, around 4GB each). I've downloaded Elastix and the wrapper to allow for access through ImageJ/FIJI in order to begin developing a macro so that I may automate the registration process.
My first question has to do with generating a fixed image from a calcium imaging recording, which Elastix considers a 3D float image. When attempting to use other registration tools, I've seen that best practice involves generating an Average Intensity Z-Projection of the entire recording through ImageJ/FIJI to have a reference image for registration purposes. When I tried this, Elastix didn't like that I was trying to register a 2D fixed image to a 3D moving image. With this in mind, what would you recommend with regards to an appropriate fixed image type for Elastix?
Secondly, when I attempt to run Elastix (input attached below), I can see that ImageJ/FIJI display shows the reading and writing steps through the 600 or so frames in the TIF stack, but then displays this error (also attached below). For whatever reason, when generating the average intensity z projection and using it as the fixed image, it did not generate the error described above, but a different one:
Reading the elastix parameters from file ...
Installing all components.
InstallingComponents was successful.
WARNING: The parameter "Resampler", requested at entry number 0, does not exist at all.
The default value "DefaultResampler" is used instead.
ELASTIX version: 5.0.1
Command line options from ElastixBase:
-f C:\Users\Hildebrand Lab\Desktop\Stephanie Temp Files Elastix\\fixed.mhd
-m C:\Users\Hildebrand Lab\Desktop\Stephanie Temp Files Elastix\\moving.mhd
-fMask unspecified, so no fixed mask used
-mMask unspecified, so no moving mask used
-out C:\Users\Hildebrand Lab\Desktop\Stephanie Temp Files Elastix\
-p C:\Users\Hildebrand Lab\Desktop\Stephanie Temp Files Elastix\\elastix_parameters.txt
-priority unspecified, so NORMAL process priority
-threads 4
Command line options from TransformBase:
-t0 unspecified, so no initial transform used
Reading images...
std: bad allocation
Errors occurred!
[Tue Mar 23 15:00:55 EDT 2021] [INFO] [] ...done!
[Tue Mar 23 15:00:55 EDT 2021] [INFO] [] Handling elastix output....
[Tue Mar 23 15:02:18 EDT 2021] [INFO] [] Command launched: C:\Program Files\elastix-5.0.1-win64\\transformix.exe -out C:\Users\Hildebrand Lab\Desktop\Stephanie Temp Files Elastix\ -in C:\Users\Hildebrand Lab\Desktop\Stephanie Temp Files Elastix\\moving.mhd -tp C:\Users\Hildebrand Lab\Desktop\Stephanie Temp Files Elastix\\TransformParameters.0.txt -threads 4
[Tue Mar 23 15:02:37 EDT 2021] [INFO] []
transformix is started at Tue Mar 23 15:02:35 2021.
which transformix: C:\Program Files\elastix-5.0.1-win64\transformix.exe
transformix runs at: DESKTOP-3JIJ8DM
Windows Personal (x64), (Build 9200)
with 12208 MB memory, and 4 cores @ 3003 MHz.
Running transformix with parameter file "C:\Users\Hildebrand Lab\Desktop\Stephanie Temp Files Elastix\\TransformParameters.0.txt".
Reading the elastix parameters from file ...
ERROR: when reading the parameter file:
itk::ExceptionObject (00000014EF5CF058)
Location: "unknown"
File: D:\X\src\elx\5.0.1\Common\ParameterFileParser\itkParameterFileParser.cxx
Line: 130
Description: itk::ERROR: itk::ERROR: ParameterFileParser(0000019A3FFEAA70): ERROR: the file C:\Users\Hildebrand Lab\Desktop\Stephanie Temp Files Elastix\\TransformParameters.0.txt does not exist.
ERROR: Something went wrong during initialization of the configuration object.
ERROR:
The configuration object has not been initialized.
Errors occurred
[Tue Mar 23 15:02:43 EDT 2021] [ERROR] [] The transformed image could not be loaded: C:\Users\Hildebrand Lab\Desktop\Stephanie Temp Files Elastix\\result.mhd
Please check the log: C:\Users\Hildebrand Lab\Desktop\Stephanie Temp Files Elastix\\elastix.log
[Tue Mar 23 15:02:43 EDT 2021] [ERROR] [] Module threw exception
java.lang.NullPointerException
at de.embl.cba.elastixwrapper.elastix.ElastixWrapper.transformImageAndHandleOutput(ElastixWrapper.java:316)
at de.embl.cba.elastixwrapper.elastix.ElastixWrapper.reviewResultsInImageJ(ElastixWrapper.java:284)
at de.embl.cba.elastixwrapper.commands.ElastixCommand.runElastix(ElastixCommand.java:139)
at de.embl.cba.elastixwrapper.commands.ElastixCommand.run(ElastixCommand.java:116)
at org.scijava.command.CommandModule.run(CommandModule.java:196)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
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:748)
It looks like it says that there are missing parameters - would I need to insert even a default one to make it work? Evidently, I'm rather new at image processing, so any help is much appreciated :)