[Insight-users] Error using MultiResMIRegistration
Luis Ibanez
luis.ibanez@kitware.com
Sat, 08 Mar 2003 20:45:30 -0500
Hi Vicente,
When a program aborts it is usually an indication
that an exception has been thrown and nobody
is catching it.
In this particular application there are multiple
catch statements, so this seems to be an unusual
error that is not anticipated by any of the
existing catch's.
Usual suspects are:
1) One of the common exceptions being thrown in
registration is due to the fixed image and
moving image not being overlapped at all.
This ocurrs commonly when relatively large
learning rates are provided to the optimizer.
... but... when this common exception is thrown,
there is a catch statment that receives it and
print an specific message in the console.
You don't seems to be receiving this specific
message....
2) Another common source of exception being
thrown is the initialization of the registration
method. In this stage, all the components of
the registration process are plugged together.
(optimizer, metric, interpolator,...)
If any of them is missing, an exeption is thrown.
... have you modified this code in any way ?
or are you running exactly as it exists in
the repository ?
----
Suggestions:
1) Go to the main() method of the application and
put its body inside a try/catch statement like
main()
{
try {
... all the code except 'return 0;'
}
catch( std::exception & excep )
{
std::cerr << "Exception thrown = ";
std::cerr << excep.what() << std::endl;
}
This message could hopefully give us an idea
of what is going wrong in the process.
2) Start with a single level (instead of 5), and
use a smaller learning rate (e.g. 1e-8) for
fewer iterations (e.g. 100).
If this doesn't abort, we will know that the initialization
is ok, and the problem should be appearing during
the optimization process. In that case you can add more
iterations. If you can get to 2500 iterations, then it is
time to attempt a second level in the pyramid, and so on.
-----
Please try this, and let us know what you find.
Thanks
Luis
---------------------
Vicente Grau wrote:
> Hello,
>
> I'm trying to use the MultiResMIRegistration program on two 3D volumes
> that I've created. The parameters file that I'm using now is:
> ------------------------
> Img_1.raw
> 1
> 100 100 20
> 0.293 0.293 1.6
> Img_2.raw
> 1
> 100 100 20
> 0.293 0.293 1.6
> 0 1 2
> 0 0 0
> 5
> 4 4 1
> 4 4 1
> 2500 2500 2500 2500 2500
> 1e-4 1e-5 5e-6 1e-6 5e-7
> 320
> Registered_1
> ---------------------------
>
> I've tried also other combinations of parameters, but the result is
> always the one shown below: the program always aborts immediately after
> starting with the first level. The directory Registered_1 exists, I've
> created it previously. Do you know what's happening in this case?
>
> ---------------------------------
> Parsing input ...
> Fixed image filename: Img_1.raw
> Big Endian: 1
> Image Size: [100, 100, 20]
> Image Spacing: [0.293, 0.293, 1.6]
> Moving image filename: Img_2.raw
> Big Endian: 1
> Image Size: [100, 100, 20]
> Image Spacing: [0.293, 0.293, 1.6]
> Permute order: [0, 1, 2]
> Flip axes: [0, 0, 0]
> Number of levels: 5
> Fixed image shrink factors: [4, 4, 1]
> Moving image shrink factors: [4, 4, 1]
> Number of iterations: [2500, 2500, 2500, 2500, 2500]
> Learning rates: [0.0001, 1e-05, 5e-06, 1e-06, 5e-07]
> Translation scale: 320
> PGM directory: Registered_1
>
> Preprocess the images ...
> Register the images ...
> --- Starting level 0
> No. Iterations: 2500 Learning rate: 0.1
> Abort
>
> ------------------------------
>
> Thanks
>
> Vicente Grau-Colomer
>
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>