Giter Site home page Giter Site logo

crash with mattes and translation about ants HOT 5 CLOSED

antsx avatar antsx commented on May 28, 2024
crash with mattes and translation

from ants.

Comments (5)

stnava avatar stnava commented on May 28, 2024

Probably not an easy fix by parameters only .. You are reaching limits of
performance. Ants affine initializer might help.
On Jan 15, 2014 7:41 PM, "Satrajit Ghosh" [email protected] wrote:

i'm running a about 400 registrations and don't want to tune for specific
pairs. any suggestion of a global fix?

the error message says translate - which is precisely what i'm doing.
would you recommend a different metric for that stage?

the parameters i'm using are taken from:
https://github.com/stnava/ANTs/blob/master/Scripts/newAntsExample.sh
and nipype-ified here:
https://gist.github.com/satra/8439778

details:

images: showing displacement and crop differences

https://www.dropbox.com/s/6apux9fy1ae24pz/Screenshot%202014-01-15%2019.32.54.png

and then i get a crash.

*** Running translation registration ***

Current level = 1 of 3

...

Current level = 2 of 3

number of iterations = 111110

shrink factors = [4, 4, 4]

smoothing sigmas = 2.0000e+00 vox

required fixed parameters = []

DIAGNOSTIC,Iteration,metricValue,convergenceValue,ITERATION_TIME_INDEX,SINCE_LAST

2DIAGNOSTIC, 1, -4.250583052635e-02, inf, 1.1020e+01, 3.1377e+00,

2DIAGNOSTIC, 2, -4.263344034553e-02, inf, 1.1163e+01, 1.4356e-01,

2DIAGNOSTIC, 3, -4.278108850121e-02, inf, 1.1315e+01, 1.5223e-01,

2DIAGNOSTIC, 4, -4.303957521915e-02, inf, 1.1453e+01, 1.3716e-01,

2DIAGNOSTIC, 5, -4.338129237294e-02, inf, 1.1582e+01, 1.2937e-01,

2DIAGNOSTIC, 6, -4.504288360476e-02, inf, 1.1711e+01, 1.2884e-01,

2DIAGNOSTIC, 7, -4.969913512468e-02, inf, 1.1836e+01, 1.2556e-01,

2DIAGNOSTIC, 8, -6.139770522714e-02, inf, 1.1979e+01, 1.4273e-01,

Exception caught:

itk::ExceptionObject (0xc6a0220)

Location: "unknown"

File: /data/software/build/ITKv4-install/include/ITK-4.6/itkMattesMutualInformationImageToImageMetricv4.hxx

Line: 225

Description: itk::ERROR: MattesMutualInformationImageToImageMetricv4(0x3006780):
Too many samples map outside moving image buffer. There are only 1158 valid points
out of 37486 total points. The images do not sufficiently overlap. They need to be
initialized to have more overlap before this metric will work. For instance, you can
align the image centers by translation.


Reply to this email directly or view it on GitHubhttps://github.com//issues/66
.

from ants.

cookpa avatar cookpa commented on May 28, 2024

I've had similar problems. Translation can overshoot and make the images diverge, until there is insufficient overlap to compute the metric.

One way I found to improve robustness is to boost the sampling percentage in the Mattes metric to 0.25.

I have eliminated the translation step from most of my registrations. I initialize with -r then start with Rigid.

The -r initialization can be thrown off by extreme intensity outliers but it generally works well.

Sent from my iPhone

On Jan 15, 2014, at 7:42 PM, Satrajit Ghosh [email protected] wrote:

i'm running a about 400 registrations and don't want to tune for specific pairs. any suggestion of a global fix?

the error message says translate - which is precisely what i'm doing. would you recommend a different metric for that stage?

the parameters i'm using are taken from:
https://github.com/stnava/ANTs/blob/master/Scripts/newAntsExample.sh
and nipype-ified here:
https://gist.github.com/satra/8439778

details:

images: showing displacement and crop differences

https://www.dropbox.com/s/6apux9fy1ae24pz/Screenshot%202014-01-15%2019.32.54.png

and then i get a crash.

*** Running translation registration ***

Current level = 1 of 3

...

Current level = 2 of 3

number of iterations = 111110

shrink factors = [4, 4, 4]

smoothing sigmas = 2.0000e+00 vox

required fixed parameters = []

DIAGNOSTIC,Iteration,metricValue,convergenceValue,ITERATION_TIME_INDEX,SINCE_LAST

2DIAGNOSTIC, 1, -4.250583052635e-02, inf, 1.1020e+01, 3.1377e+00,

2DIAGNOSTIC, 2, -4.263344034553e-02, inf, 1.1163e+01, 1.4356e-01,

2DIAGNOSTIC, 3, -4.278108850121e-02, inf, 1.1315e+01, 1.5223e-01,

2DIAGNOSTIC, 4, -4.303957521915e-02, inf, 1.1453e+01, 1.3716e-01,

2DIAGNOSTIC, 5, -4.338129237294e-02, inf, 1.1582e+01, 1.2937e-01,

2DIAGNOSTIC, 6, -4.504288360476e-02, inf, 1.1711e+01, 1.2884e-01,

2DIAGNOSTIC, 7, -4.969913512468e-02, inf, 1.1836e+01, 1.2556e-01,

2DIAGNOSTIC, 8, -6.139770522714e-02, inf, 1.1979e+01, 1.4273e-01,

Exception caught:

itk::ExceptionObject (0xc6a0220)

Location: "unknown"

File: /data/software/build/ITKv4-install/include/ITK-4.6/itkMattesMutualInformationImageToImageMetricv4.hxx

Line: 225

Description: itk::ERROR: MattesMutualInformationImageToImageMetricv4(0x3006780):
Too many samples map outside moving image buffer. There are only 1158 valid points
out of 37486 total points. The images do not sufficiently overlap. They need to be
initialized to have more overlap before this metric will work. For instance, you can
align the image centers by translation.

Reply to this email directly or view it on GitHub.

from ants.

satra avatar satra commented on May 28, 2024

thanks. i'll try phil's suggestion first and see if it helps. the sampling percentage is already at 0.3.

from ants.

hjmjohnson avatar hjmjohnson commented on May 28, 2024

Satra,

I’vae had good luck with BRAINSFit for such cases. To get the initialization done. We also have an automatic landmark detection tool that works really well.

This project builds EVERYTHING that is needed (an much more, including ANTS, DTIPrep, DTIReg, BRAINSTools, ……)
https://github.com/BRAINSia/NAMICExternalProjects

https://github.com/BRAINSia/BRAINSTools/blob/master/AutoWorkup/WorkupT1T2LandmarkInitialization.py

I ran this pipeline on 7000+ data sets from 1.5T and 3T scanner from 36 sites with nearly no failures.

Here is a prezi demonstration of it: http://prezi.com/l_0pomtwf81c/?utm_campaign=share&utm_medium=copy&rc=ex0share

Hans

From: Satrajit Ghosh <[email protected]mailto:[email protected]>
Reply-To: stnava/ANTs <[email protected]mailto:[email protected]>
Date: Wednesday, January 15, 2014 at 6:41 PM
To: stnava/ANTs <[email protected]mailto:[email protected]>
Subject: [ANTs] crash with mattes and translation (#66)

i'm running a about 400 registrations and don't want to tune for specific pairs. any suggestion of a global fix?

the error message says translate - which is precisely what i'm doing. would you recommend a different metric for that stage?

the parameters i'm using are taken from:
https://github.com/stnava/ANTs/blob/master/Scripts/newAntsExample.sh
and nipype-ified here:
https://gist.github.com/satra/8439778

details:

images: showing displacement and crop differences

https://www.dropbox.com/s/6apux9fy1ae24pz/Screenshot%202014-01-15%2019.32.54.png

and then i get a crash.

*** Running translation registration ***

Current level = 1 of 3

...

Current level = 2 of 3

number of iterations = 111110

shrink factors = [4, 4, 4]

smoothing sigmas = 2.0000e+00 vox

required fixed parameters = []

DIAGNOSTIC,Iteration,metricValue,convergenceValue,ITERATION_TIME_INDEX,SINCE_LAST

2DIAGNOSTIC, 1, -4.250583052635e-02, inf, 1.1020e+01, 3.1377e+00,

2DIAGNOSTIC, 2, -4.263344034553e-02, inf, 1.1163e+01, 1.4356e-01,

2DIAGNOSTIC, 3, -4.278108850121e-02, inf, 1.1315e+01, 1.5223e-01,

2DIAGNOSTIC, 4, -4.303957521915e-02, inf, 1.1453e+01, 1.3716e-01,

2DIAGNOSTIC, 5, -4.338129237294e-02, inf, 1.1582e+01, 1.2937e-01,

2DIAGNOSTIC, 6, -4.504288360476e-02, inf, 1.1711e+01, 1.2884e-01,

2DIAGNOSTIC, 7, -4.969913512468e-02, inf, 1.1836e+01, 1.2556e-01,

2DIAGNOSTIC, 8, -6.139770522714e-02, inf, 1.1979e+01, 1.4273e-01,

Exception caught:

itk::ExceptionObject (0xc6a0220)

Location: "unknown"

File: /data/software/build/ITKv4-install/include/ITK-4.6/itkMattesMutualInformationImageToImageMetricv4.hxx

Line: 225

Description: itk::ERROR: MattesMutualInformationImageToImageMetricv4(0x3006780):
Too many samples map outside moving image buffer. There are only 1158 valid points
out of 37486 total points. The images do not sufficiently overlap. They need to be
initialized to have more overlap before this metric will work. For instance, you can
align the image centers by translation.


Reply to this email directly or view it on GitHubhttps://github.com//issues/66.


Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you.


from ants.

satra avatar satra commented on May 28, 2024

thanks hans - in this case i was looking for a quick fix and also my target is the cerebellum. we should talk about "box"ing up BRAINS via email offline.

phil's suggestion worked well. i've updated the gist with the correct parameters.

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.