-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Atlas based segmentation with AMU7T template #4
Comments
Given that the goal of this issue is to create a "pure SCT" way to do step (b), and that this will involve updating |
In our July 6th meeting, we asked "Should AMU7T be integrated into the PAM50 repo, or should it be kept separate?" I don't think we quite came to a definitive answer during the meeting, so here are my thoughts: Looking at the associated AMU7T PR (spinalcordtoolbox/PAM50#14), I notice that the AMU7T template has a similar structure to the PAM50 template as a whole: In other words, AMU7t is more like an alternate version of PAM50 (with alternate Given this, I am kind of leaning towards keeping AMU7t separate from PAM50:
|
Excellent arguments @joshuacwnewton. Thank you for bringing that up. In light of these arguments, I agree that it makes more sense to have AMU7t as a separate template (despite it being within the same space as the PAM50 template). |
Great! In that case, I would say the next steps are:
As well, there is also the separate observation you noticed during our last SCT meeting:
cc: @Nilser3 |
Thanks for your comments @joshuacwnewton @jcohenadad I closed the PR, and created a repo for template_AMU7T I should point out that AMU7T is a template cropped in XY plane of 19.3 x 15.8 mm and along the Z axis from C1 to C7 approximately. Here a visualization with the levels of PAM50 Some Experiences of registration:Here 7T T1q image + SC mask with which we are going to experiment ( r = 0.3x0.3x5.0): Exp_1. Registration using PAM50:
Time: 98 sec Exp_2. Registration using original AMU7T:
Comment: Edge problems and loss of information at different levels. Time: 37 sec Exp_3. Registration using AMU7T with a zero padding on the XY axis (to get the same size as PAM50 from C1 to C7 )
Comment: a partial loss of information in C8 (comparing with Exp_1) Time: 306 sec Exp_4. Registration using AMU7T with a zero padding in the XY and Z axis (C1 to T1):
Comment: Results similar to exp_3 Time: 357 sec Exp_5. Registration using AMU7T with a zero padding on the XYZ axis (C1 to T1) + using SC mask of PAM50 (at the same resolution and dimension):
Comment: less deformation is observed in C1 and C8, with more resemblance to Exp_1 Time: 356 sec Use of warpsa)
|
We should redirect as many information/context regarding the AMU7T template (eg this very informative comment #4 (comment) which will be forgotten if not placed in the appropriate repos) as possible in the dedicated repos (https://github.com/spinalcordtoolbox/template_AMU7T) instead of here. @joshuacwnewton can you please help @Nilser3 do some cleaning / transfer of issues, etc. thanks! |
you should not be using -c t1 because this is a t2w like contrast |
you should never do straightening with 5mm thick images |
Thank you @jcohenadad Registration using AMU7T in subject space:
Time = 788 sec. Atlas AMU7T to subject space using 2 warps
Register AMU7T atlas using
|
To help the team review your code, I would add a comment that
Why are you using '-x nn'? And for what purpose are you bringing
Why not running these registration parameters while doing Sub-sections "Atlas AMU7T to subject space using 2 warps" and "Register AMU7T atlas using sct_warp_template (in 2 times)": what are these? Are they different steps for doing the template to image registration, or are they different strategies that you are comparing? Please describe what is the purpose of each sub-section. Section "Metric extraction using sct_extract_metric": very cool result! |
Thank you ++ @Nilser3 @jcohenadad and the team for all the efforts for integrating the AMU7T into the SCT! A few comments and questions : 1) - the native image resolution you are working on is 0.30.34 mm3 (ie. anisotropic, with thickness of 4mm, not 5mm)(but that's no big deal ..) 2) -
I agree anisotropic images are not adequate for the straightening. In the ISMRM abstract, Arnaud indeed registered the template to the subject image. But then, the warping to the AMU7T template was not adequate (-> could you double check that everything is going well when you go back in the template space if you adopt this "template->subject" strategy?) Also, how many landmarks do you use when running sct_register_to_template -l landmarks? On the native anisotropic T1q images, the vertebrae can not be seen (not as clearly as with other modalities). Consequently, 2 labels may not be sufficient/adequate. 3) - when you use the option "-c t1", registration is made from (or to) the AMU26_qt1.nii.gz, right? 4) -
could you please provide more details? Did you start from scratch with a new crop for the native image? Or something else ? 5) -
Thanks for this preliminary try! |
Always good to be precise, thank you. For more transparency and make sure the dev team and @Nilser3 are on the same page with debugging, @Nilser3 can you please upload a 'test' data that will be used as functional tests for the registration commands we are discussing here?
If using more than 2 labels, the algorithm also performs a through-plane non-linear registration, which is to be avoided with thick slices (to minimize interpolation errors). So I would stick with 2 labels and
It's a bit convoluted, but "-c t1" uses label_id=0, as per this code, which indeed refers to
I agree more details would be important for the dev team to be able to reproduce the results. This is why a 'test' image is useful, as well as a full script to run the registration. @joshuacwnewton @mguaypaq any suggestions where to upload the data/script? |
While working with the Phillips level files in spinalcordtoolbox/PAM50#3, we used a e.g. @Nilser3 creates a separate branch on the AMU7T repo, opens a PR for that branch, then makes sure to commit each update to the registration workflow as a change to the processing script. That way, all someone has to do is clone the repo and check out the branch to get access to the script and test data. (And, any further discussion can be direct PR reviews highlighting specific lines of the script itself.) |
Thank you @jcohenadad I have shared a subject HC for test and AMU7T v2 (zero padding in XY plane, dim =256x256) in this PR #6
I consider that the first registration is not enough to have the Template and Subject correctly aligned,
Certainly, I made an experience with 5 steps in -param:
the first 2 (the default steps from
There are two steps I use to register the AMU7T atlas into the subject space, the first step register the AMU7T atlas into the "unadjusted subject space" and the second step takes this unadjusted atlas and register it into the Subject space. |
Hi @vcallot
I made a zero paddingaround the XY plane without changing neither the PAM50 reference, nor the resolution, nor any interpolation, here is this version, This problem is not seen in the qT1 template (fortunately).
of course 👍 |
From #4 (comment):
This step is irrelevant bc at step1 you already do a centermass rot
It is unusual to precede seg-based with image-based |
Here is an improved registration based on the following command lines :
previously I had to make a manual correction to the WM mask (red outline in the video), and if we compare it with the registered AMU7T probabilistic WM mask via Videoamu7t.webmThe registered atlas presents some aberrant deformations (43 - 50 sec in the video), which were excluded for the quantification presented in Fig. 01 (notebook here) Fig. 01 |
That looks pretty good @Nilser3, good job! 👏 |
Cool! Great job @Nilser3 ! Looks nice and hope it behave the same with different subjects! |
Description
AMU7T is a 3D template created in 2 contrasts acquired at 7T:
an atlas of 50 labels is associated (WM parcels from Levi et al., NeuroImage (2015)., and GM parcels derivated from Hausman, L. Atlases of the Spinal Cord and Brainstem and the Forebrain. (Thomas, 1962).
AMU7T was created in the space of PAM50 (related in Integration of 7T template (T2s and qT1) + atlas PAM50#14 ), and in a resolution of 0.17x0.17x0.5mm.
@jcohenadad this issue is to discuss how to automatically segment based on this new high resolution template/atlas through SCT:
here is a t1q 7T image that was automatically segmented using Sct registration (a) and a method with Optimized parameters (b).
From ISMRM2023
Sct registration (a)
Optimized parameters (b)
The text was updated successfully, but these errors were encountered: