Hello, I am currently experience a "Registration warp failed"
message when attempting CMTK registration. I am currently using the
Parallel-Fiji-CMTK registration script provided here https://github.com/sandorbx/Parallel-Fij... I
have successfully used some of the test fly brain files provided so
I presume this is an issue specific to the fly braint nrrd files I
am currently using. Here are the log results and dimensions of the
file I am currently using. If anybody can provide advice on how to
remedy this issue that would be greatly appreciated.
File dimensions:
Width: 748.8000 microns (2304)
Height: 748.8000 microns (2304)
Depth: 126 microns (210)
Reference File dimensions:
Width: 627.76 microns (1652)
Height: 291.8400 microns (768)
Depth: 182.02 microns (479)
LOGS:______________________________
Detected operating system: Windows 11 (windows)
WSL/CMTK validated
Started Affine and Warp Registration on 1 samples
Preset: Full Flybrain(Cachero-Ostrovksy_2010)
Affine parameters:
Initial affine method: --centers-of-mass
Affine registration metric: Normalized Mutual Information
Exploration [Initial optimizer step size]: 16
Accuracy [Final optimizer step size]: 0.8
Degrees of freedom first pass: 6
Degrees of freedom second pass: 9
Warp parameters:
Warp registration metric: Normalized Mutual Information
initial exploration step size: 26
Accuracy [Final exploration step size]: 0.4
coarsest resampling: 8
Refine grid: 4
grid size: 80
Please wait
WARNING: image does not have valid orientation meta information;
cannot reorient.
WARNING: image does not have valid orientation meta information;
cannot reorient.
WARNING: image does not have valid orientation meta information;
cannot reorient.
WARNING: image does not have valid orientation meta information;
cannot reorient.
WARNING: image does not have valid orientation meta information;
cannot reorient.
WARNING: image does not have valid orientation meta information;
cannot reorient.
37F06-49F04_ALdown_B007 Registration warp failed
Hi,
By the first look of it, you have to make sure to follow the naming convention specified in the user guide (see the github page readme)
So reference channel should have the _01 suffix and so on up to channel _04. Tell us if that helped.
Also I have a new CMTK GUI integration which may be more helpful
to you. The idea was to integrate CMTK into a 3d rendering and
editing environment while keep it native. Geometry, grid and
transforms are directly tranlated into CMTK conventions, also data
is processed as raw arrays into CMTK input so no
compatibility and naming concerns. The main idea is that you can
see the same physical pose and intensities as CMTK would receive so
you can make better judgment on your data and the parameters, also
you can easily and interactively pre align your data with the
manual transform tool.
get it from here, windows store version is the most convinient
option at the moment, but mac and ubuntu is also supported:
https://madi3d.org
It is still beta but it should be stable enough for your purposes,
also the registration modul is open sourced on github so you can
validate the math.
Thank you for the response Sandor Kovacs. It actually turns out the issue was not my naming conventions but actually my brain orientations. The brain was not rotated to match the reference brain which ended up causing a warp failure. Unfortunately the aligment was not perfect and my aligned brains have several dark gaps in them especially on the early and later layers. I am not sure if you know why that may be but I will try it with the new CMTK GUI integration which might fix the issues I currently have.
Thank you for introducing me to this amazing tool! I do have a
few issues I am experiencing with registration in MADI3D that I was
hoping you could identify.
1. When the brain I want to align needs to be Z-flipped to match
the reference brain, I will Z-flip in Fiji and run CMTK
registration that way. However the output is always heavily skewed
when I do this, is there a reason why?
2. When alignment is successful I do get large voids in the earlier
and later stack layers. Is there any way to remedy this issue. I
have attached an example of what I am talking about below.
3. Finally I would like to mention that after running alignment to
the reference brain the top part of the brain is not being pulled
out to match the reference brain. Our brains have been slightly
squised because of the slides so I was wondering if this is an
issue that CMTK registration can fix or not.
Thank you once again!
It looks like your samples are suffering from severe local distortion or folding. If you run an affine only registration and reformat, you should already see reasonably good alignment. Otherwise, the subsequent nonlinear warp may produce distorted results.
Greg's wiki provides a good assessment of registration parameters and their outcomes:
https://flybrain.mrc-lmb.cam.ac.uk/dokuwiki/doku.php?id=warping_manual:start
Registration also has its limits when dealing with distorted samples. MADI3D can help push these limits a bit through interactive manual prealignment, allowing you to translate, rotate, and independently scale your sample along the X, Y, and Z axes before running registration.
Here's the workflow in a nutshell:
First, make sure your sample is loaded into the scene either as a multichannel volume or as individual channels organized into their own group.
Make sure both the template and the sample are visible in the 3D view. Select the group containing your sample channels, or the multichannel volume itself. This ensures that the same transformation is applied consistently.
Open the Transform panel and manually align your sample while
inspecting the scene. You can also enable the interactive transform
widget. Try to achieve reasonable overall alignment.
Once you're satisfied with the pre-alignment, open the Registration
panel. The easiest way to set up the reference is to right-click
the template in the scene tree and select"Add as Template to
Registration". Then add your sample as well.
Check that the channel roles (especially the Moving registration channel role for the channel you use for registration with the template), registration inputs, and reformat settings are correctly assigned. You can also specify a custom registration output location if desired.
Finally, run the registration.
Thank you for the suggestions.
I have followed your pipeline of pre-alignment and used the Wiki
parameters to try and adjust my output to no avail. Here is a list
of the parameters I have already tried changing.
Initial Alignment changed from Current Pose to Volume Center
Tried both Anisotropic Scale and Affine Transform
Changed Grid Spacing from 80 to 120
Decreased and increased energy weight
Set Jacobian Weight to 0.1
Set Inverse Consistency Weight to 0.1
Turned on final full-resolution warp optimization.
Are there any other parameters or pipeline changes I can make to
achieve alignment that actual expands the top and bottom of my
sample brains to fit the reference one?
Thank You
Hey, Sorry the forum wasn't working for a while, propably I can only help you if i can see the data, just the anatomy channel is enough. Share a Dropbox link or send an email to the madi3d contact address.