[Insight-users] Problems with Insight's registration application
Yin
ttang at homeworking.org
Sun Oct 22 22:52:53 EDT 2006
Hello Luis,
I have tried the IntensityBased2D3DRegistration application with the same
commands too, but there was only 1 iteration for each level; the final
parameters were tx=ty=tz=0. The problem is that when regGradDescOptimizer
calculates the transformedGradient, it is zero, so the optimization ended
without further iterations.
Did you get zero's for the final parameters too? Are we referring to
different versions? I noticed that there were some bugs with the
gradientDifferenceMetric, is that true still? (I'm using revision 12.1.05 of
this metric, with the same IntensityBased2D3DRegistration.cxx as provided by
InsightApplications-2.8).
I also tried with a different metric (Mattes MI), but I would have no (0)
samples and the exception is thrown (see 2D3DRegistration.cxx).
My other questions are:
1. The size and resolution of the projectedImage in GenerateProjection.cxx
is fixed to 256 and 1.0 respectively, what is the rationale behind fixing
these parameters?
2. How can we estimate the initial parameters for different transforms?
a) How can we estimate the rotation scales/ translation scales for
VersorRigid3DTransform?
b) I have tried to use VersorRigid3DTransform in place of
EulerCenteredTransform; if I were to use the same set of brain images, would
I need to translate the 3d image to [-100,-100,-100] as well? Particularly,
if the images I need to register have the following res/ sizes: 2D:
[256,256], [2.21,2.21]/ 3D: [128,128,90], [4.8,4.8,4.8], could I assume that
the center of the 3D is an ideal start position? (see attached images)
Thanks so much for your help.
Ying
--- luis.ibanez at kitware.com wrote:
From: Luis Ibanez <luis.ibanez at kitware.com>
To: ttang at homeworking.org
CC: Insight Users <insight-users at itk.org>
Subject: Re: Problems with Insight's registration application
Date: Sun, 22 Oct 2006 19:15:52 -0400
Hi Ying,
I'm assuming that you are talking about the application:
InsightApplications/IntensityBased2D3DRegistration/
Is that right ?
[In the future, you may want to be more specific when you
post your questions to the mailing list]
---
I just retried the commands that are described in the README.txt
file and they work for me. I'm not getting any error related
to number of parameters.
Did you changed the Transform of this code ?
If so, could you please post your code to the list ?
Thanks
Luis
PS: Here are the commands I tried, just as described in
the README.txt file:
==========================================================
A) GenerateProjection
A.1) Translate the image by (-100,-100,-100) then project.
./GenerateProjection -t -100 -100 -100
/data/BrainWeb/brainweb165a10f17.mha projection.mhd
A.2) Translate the image by (-100,-100,-100),
rotate 10 degrees around x, then project.
./GenerateProjection -t -100 -100 -100 -rx 10
/data/BrainWeb/brainweb165a10f17.mha projection.mhd
B) IntensityBased2D3DRegistration
B.1) Register the image that was generated.
./IntensityBased2D3DRegistration -t -100 -100 -100 projection.mhd
/data/BrainWeb/brainweb165a10f17.mha
B.2) Register the image that was generated with rotation.
./IntensityBased2D3DRegistration -t -100 -100 -100 -rx 10
projection.mhd /data/BrainWeb/brainweb165a10f17.mha
===================================================
-----------------------------
ttang at homeworking.org wrote:
> Hello Luis,
>
>
>
> I would like to perform 2d-3d registration using mutual information and
> possibly other metrics. I have tried running the Insight example but
> experience the same problem as Rafi did (see below):
>
>
>
>
> by rafi Feb 15, 2006; 03:26am :: Rate this Message: (use ratings to
> moderate[?])
>
> Reply | Reply to Author | Show Only this Message | Link to this Message
>
>
> Hi Karthik,
>
> Thank you very much; it is what I was looking for.
>
> However, it seems that the code is not working.
>
> I did what it says in the README file and it fails at run time with an
> exception claiming the number of parameters defined was 6 while the
> transformation expected 9...
>
> After fixing this, it still does not work and finish after the first
> iteration claiming the gradient difference is zero (I followed it in the
> debugger) while the 2 images are not the same.
>
>>From the debugger, it seems that the gradient difference is always zero no
mater how you change the parameters
>
> Can you advice what is missing there?
>
> Thanks,
>
> Rafi
>
>
>
>
> I tried to use Mattes' MI instead of graident difference but then I had
> problems with calculating the derivative. What is the status of this
> application? Could you please give us some suggestions/ directions on
> this?
>
>
>
> Thanks for your help,
> Ying
>
>
Luis Ibanez wrote:
>
>
> Hi Ying,
>
> I'm assuming that you are talking about the application:
>
> InsightApplications/IntensityBased2D3DRegistration/
>
> Is that right ?
>
>
> [In the future, you may want to be more specific when you
> post your questions to the mailing list]
>
>
> ---
>
>
> I just retried the commands that are described in the README.txt
> file and they work for me. I'm not getting any error related
> to number of parameters.
>
> Did you changed the Transform of this code ?
>
> If so, could you please post your code to the list ?
>
>
> Thanks
>
>
> Luis
>
>
> PS: Here are the commands I tried, just as described in
> the README.txt file:
>
> ==========================================================
>
> A) GenerateProjection
>
>
> A.1) Translate the image by (-100,-100,-100) then project.
>
> ./GenerateProjection -t -100 -100 -100
> /data/BrainWeb/brainweb165a10f17.mha projection.mhd
>
> A.2) Translate the image by (-100,-100,-100),
> rotate 10 degrees around x, then project.
>
> ./GenerateProjection -t -100 -100 -100 -rx 10
> /data/BrainWeb/brainweb165a10f17.mha projection.mhd
>
>
> B) IntensityBased2D3DRegistration
>
>
> B.1) Register the image that was generated.
>
> ./IntensityBased2D3DRegistration -t -100 -100 -100 projection.mhd
> /data/BrainWeb/brainweb165a10f17.mha
>
>
> B.2) Register the image that was generated with rotation.
>
>
> ./IntensityBased2D3DRegistration -t -100 -100 -100 -rx 10
> projection.mhd /data/BrainWeb/brainweb165a10f17.mha
>
>
>
> ===================================================
> -----------------------------
> ttang at homeworking.org wrote:
>> Hello Luis,
>>
>>
>>
>> I would like to perform 2d-3d registration using mutual information and
>> possibly other metrics. I have tried running the Insight example but
>> experience the same problem as Rafi did (see below):
>>
>>
>>
>>
>> by rafi Feb 15, 2006; 03:26am :: Rate this Message: (use ratings to
>> moderate[?])
>>
>> Reply | Reply to Author | Show Only this Message | Link to this Message
>>
>>
>> Hi Karthik,
>>
>> Thank you very much; it is what I was looking for.
>>
>> However, it seems that the code is not working.
>>
>> I did what it says in the README file and it fails at run time with an
>> exception claiming the number of parameters defined was 6 while the
>> transformation expected 9...
>>
>> After fixing this, it still does not work and finish after the first
>> iteration claiming the gradient difference is zero (I followed it in the
>> debugger) while the 2 images are not the same.
>>
>>>From the debugger, it seems that the gradient difference is always zero
no mater how you change the parameters
>>
>> Can you advice what is missing there?
>>
>> Thanks,
>>
>> Rafi
>>
>>
>>
>>
>> I tried to use Mattes' MI instead of graident difference but then I had
>> problems with calculating the derivative. What is the status of this
>> application? Could you please give us some suggestions/ directions on
>> this?
>>
>>
>>
>> Thanks for your help,
>> Ying
>>
>>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>
http://www.nabble.com/file/3787/2D3DRegistration.cxx 2D3DRegistration.cxx
--
View this message in context: http://www.nabble.com/Re%3A-Problems-with-Insight%27s-registration-application-tf2491695.html#a6948006
Sent from the ITK - Users mailing list archive at Nabble.com.
More information about the Insight-users
mailing list