Giter Site home page Giter Site logo

Comments (6)

cookpa avatar cookpa commented on July 22, 2024 1

The only pre-processing that should happen in the template script is N4BiasFieldCorrection, which is done if the -n argument is 0 or unspecified. If N4 is run, it should appear in your job*.sh files.

It's hard to gauge from screen caps how different the results are. There will be some run-to-run variability because of random sampling in the affine stage. Also, your output from the template script is registered to the previous template - after each set of pairwise registrations, the template is updated. After the last run, the final template is generated, so the registrations are out of date. However, you can find template (n - 1) under the intermediateTemplates/ directory. Registering the template input images (using the command precisely as written in job.sh) will be the closest you can get to doing the same thing.

Sharpening is done on the template, not the individual images, so that's not it. Dividing the images by their mean is done during averaging after registration.

from ants.

gdevenyi avatar gdevenyi commented on July 22, 2024 1

Also, your output from the template script is registered to the previous template - after each set of pairwise registrations, the template is updated. After the last run, the final template is generated, so the registrations are out of date. However, you can find template (n - 1) under the intermediateTemplates/ directory.

I think this is where the unexpected difference arises.

from ants.

gdevenyi avatar gdevenyi commented on July 22, 2024

Can you provide a complete collection of commands you have used, and examples of the inputs, outputs and clearly indicate what you thing is insufficient about the results.

from ants.

cookpa avatar cookpa commented on July 22, 2024

antsMultivariateTemplateConstruction2.sh will write scripts called job_X_X.sh that contain the exact call to antsRegistration.

from ants.

szan0808 avatar szan0808 commented on July 22, 2024

Can you provide a complete collection of commands you have used, and examples of the inputs, outputs and clearly indicate what you thing is insufficient about the results.

Sure. I'll just show T1w images, but the template was construced using T1w, T2w, FA and MD.

  1. This is the T1w template:
    screenshot0001

  2. This is the sharpened T1w I produced using this filter hoping to improve the performance (I did the same for T2w, FA and MD):
    screenshot0002

  3. This is the subject's T1w warped to template as retured by antsMultivariateTemplateConstruction2.sh:
    screenshot0003

  4. This is the subject's T1w warped to template using the unmodified template images and this command:
    antsRegistrationSyN.sh -d 3 -o $pjdir/$line/T1w/${line}_T1w_brain_reg \ -f ${template_directory}/T1w.nii.gz -m $sbjdir/T1w_brain.nii.gz \ -f ${template_directory}/T2w.nii.gz -m $sjdir/T2w_brain.nii.gz \ -f ${template_directory}/FA.nii.gz -m $sjdir/fa.nii.gz \ -f ${template_directory}/MD.nii.gz -m $sjdir/adc.nii.gz \
    screenshot0004

  5. This is the subject's T1w warped to template using the unmodified template images and the command saved in the job_X_X.sh script, as suggested by @cookpa in his comment:
    screenshot0005
    Here I would have expected to get the same as 3), and that is pretty much the point I am trying to discuss here. Is there something else going on in antsMultivariateTemplateConstruction2.sh before the command stored in job_X_X.sh is executed (here is why I later attempted the sharpening)?

  6. This is the subject's T1w warped to template using the sharpened template images and using a command like the one used in 4):
    screenshot0006

The other attempts using normalised subject's images didn't help with matching 3) either.

To answer you, @gdevenyi , there is a noticeable difference in the cortical areas and that's where my attention will go for the next steps of my processing. The warped images retured by antsMultivariateTemplateConstruction2.sh seem the most accurate and I would like to replicate that before extending the processing to subjects outside the population used to construct the template.

Thanks again,
Simone

from ants.

szan0808 avatar szan0808 commented on July 22, 2024

The only pre-processing that should happen in the template script is N4BiasFieldCorrection, which is done if the -n argument is 0 or unspecified. If N4 is run, it should appear in your job*.sh files.

I noticed that, as the images were labelled as "Repaired", but the dataset I'm using is already preprocessed, so I left it out for now. I might include it, just in case.

Also, your output from the template script is registered to the previous template - after each set of pairwise registrations, the template is updated. After the last run, the final template is generated, so the registrations are out of date. However, you can find template (n - 1) under the intermediateTemplates/ directory. Registering the template input images (using the command precisely as written in job.sh) will be the closest you can get to doing the same thing.

As @gdevenyi pointed out, sounds like this could be the clarification I was after. I'll just run a quick test using the (n-1) template. That would not be relevant when working with subjects outside the template population, but it will be hopefully a good way to confirm that this is what causes these differences.

Sharpening is done on the template, not the individual images, so that's not it. Dividing the images by their mean is done during averaging after registration.

I confirm I only sharpened the template's images (T1w, T2w, FA, MD). That step makes sense to me, although it didn't have much effect on the final result, as the template images would generally be smoother that the subjects'.

Thanks you both for clarifying. I'll run some more tests and I'll report here the results.

from ants.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.