[Insight-users] RE: VersorRigid3DTransform
Radhika Sivaramakrishna
radhika.sivaramakrishna at synarc.com
Thu, 8 Jan 2004 14:17:40 -0800
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C3D635.3AC688AA
Content-Type: text/plain
Hi Luis,
Just a quick update: I figured out part of the problem:
It had something to do with Endianness, I am assuming since although the old
image had values which appeared much larger than the new although on my
display program (ImageJ), they appeared the same. So I basically created a
new version of my fixed image using an identity transform and now I am
getting much more reasonable values for the metric [
However, I am still playing around with SetMaximumStepLength because even
with a value of 0.1, the metric starts getting lowered upto a point and then
starts increasing. Would you say that this is a problem with
SetMaximumStepLength or could it be something else?
I also had another doubt regarding the optimizer and the example. Since the
optimizer uses only 6 parameters, however the transform uses 9 parameters,
in the example ImageRegistration8.cxx, after the registration is completed,
where are we setting the 3 parameters corresponding to the center of
rotation?
We basically do:
OptimizerType::ParametersType finalParameters =
registration->GetLastTransformParameters();
transform->SetParameters( finalParameters );
How does SetParameters for this transform accept a 6 parameter result?
Thanks
Radhika
-----Original Message-----
From: Luis Ibanez [mailto:luis.ibanez at kitware.com]
Sent: Thursday, January 08, 2004 11:35 AM
To: Radhika Sivaramakrishna
Cc: 'insight-users at itk.org'
Subject: Re: VersorRigid3DTransform
Hi Radhika,
A) This message means that you transform is so far
off that the images are not overlapping anymore.
This usually happens when you use an optimization
step that is too large and make the transform diverge.
B) If the images are of the same modality and about the
same histogram you should be ok using the MeanSquares
ImageMetric. However... the metric value shouldn't
be that high. It is
C) You can verify the origin and spacing by printing out
std::cout << fixedImage->GetSpacing() << std::endl;
std::cout << fixedImage->GetOrigin() << std::endl;
or by printing all the image information with
fixedImage->Print( std::cout );
D) ok, The initialization should be fine.
E) In MyPACS you have the option of posting "shared" (public)
cases as well as "private" cases. The private level is
supposed to be as secure as any other PACS system.
F) You can try the equivalent registration algorithm
with the free version of VolView
http://www.kitware.com/products/volview.html
Just load one image, then go to the View->Filters
menu and select
"Registration" ---> "Image Registration (ITK)"
then in the button "Second input" browse for the
second image (the moving image).
G) Please post the tracing messages that are printed out
when the example runs (the sequence that displays the
values of the metric and the values of the parameters
for each iteration).
Regards,
Luis
----------------------------------
Radhika Sivaramakrishna wrote:
> Hi Luis,
>
> Basically I used your example in ImageRegistration8.cxx as is, so I did
use
> Optimizerscale.
>
> To answer your questions in order:
>
> A) I used the metric MeanSquaresImageToImageMetric (as the example does)
> and after about 89 iterations this is the error I got!
>
>
> ExceptionObject caught !
>
> itk::ExceptionObject (0x82c4738)
> Location: "Unknown"
> File:
>
/home/rsivaram/Insight/Code/Algorithms/itkMeanSquaresImageToImageMetric.txx
> Line: 103
> Description: itk::ERROR: MeanSquaresImageToImageMetric(0x82bc698): All
> the points mapped to outside of the moving image
>
> B) These images are brain MRI T1-weighted images.
>
> C) How do I verify the origin and spacing? Basically I am trying to test
> this currently on a simulated case where I have created one of the
> images from the other by a known transformation, so is this still an
issue?
>
> D) Again initialization of the transform is exactly as in
> ImageRegistration8.cxx.
>
> My concern about posting the images is privacy issues since these are
> from a hospital and there may be HIPAA issues. How accessible are
>
> these images to the outside world?
>
> Thanks
> Radhika
>
>
>
-----------------------------------------------------
Confidentiality Notice.
This email message is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message. If you are the intended recipient, please be
advised that the content of this message is subject to access, review and
disclosure by the sender's Email System Administrator.
------_=_NextPart_001_01C3D635.3AC688AA
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2656.87">
<TITLE>RE: VersorRigid3DTransform</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>Hi Luis,</FONT>
</P>
<P><FONT SIZE=3D2>Just a quick update: I figured out part of the =
problem:</FONT>
<BR><FONT SIZE=3D2>It had something to do with Endianness, I am =
assuming since although the old image had values which appeared much =
larger than the new although on my display program (ImageJ), they =
appeared the same. So I basically created a new version of my fixed =
image using an identity transform and now I am getting much more =
reasonable values for the metric [</FONT></P>
<P><FONT SIZE=3D2>However, I am still playing around with =
SetMaximumStepLength because even with a value of 0.1, the metric =
starts getting lowered upto a point and then starts increasing. Would =
you say that this is a problem with SetMaximumStepLength or could it be =
something else?</FONT></P>
<P><FONT SIZE=3D2>I also had another doubt regarding the optimizer and =
the example. Since the optimizer uses only 6 parameters, however the =
transform uses 9 parameters, in the example ImageRegistration8.cxx, =
after the registration is completed, where are we setting the 3 =
parameters corresponding to the center of rotation?</FONT></P>
<P><FONT SIZE=3D2>We basically do:</FONT>
</P>
<P><FONT SIZE=3D2>OptimizerType::ParametersType finalParameters =3D =
</FONT>
<BR><FONT =
SIZE=3D2> &nb=
sp; =
registration->GetLastTransformParameters();</FONT>
</P>
<P><FONT SIZE=3D2>transform->SetParameters( finalParameters =
);</FONT>
</P>
<P><FONT SIZE=3D2>How does SetParameters for this transform accept a 6 =
parameter result?</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>Thanks</FONT>
<BR><FONT SIZE=3D2>Radhika</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Luis Ibanez [<A =
HREF=3D"mailto:luis.ibanez at kitware.com">mailto:luis.ibanez at kitware.com</=
A>] </FONT>
<BR><FONT SIZE=3D2>Sent: Thursday, January 08, 2004 11:35 AM</FONT>
<BR><FONT SIZE=3D2>To: Radhika Sivaramakrishna</FONT>
<BR><FONT SIZE=3D2>Cc: 'insight-users at itk.org'</FONT>
<BR><FONT SIZE=3D2>Subject: Re: VersorRigid3DTransform</FONT>
</P>
<BR>
<BR>
<P><FONT SIZE=3D2>Hi Radhika,</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>A) This message means that you transform is so =
far</FONT>
<BR><FONT SIZE=3D2> off that the images are not =
overlapping anymore.</FONT>
</P>
<P><FONT SIZE=3D2> This usually happens when you use =
an optimization</FONT>
<BR><FONT SIZE=3D2> step that is too large and make =
the transform diverge.</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>B) If the images are of the same modality and about =
the</FONT>
<BR><FONT SIZE=3D2> same histogram you should be ok =
using the MeanSquares</FONT>
<BR><FONT SIZE=3D2> ImageMetric. However... the =
metric value shouldn't</FONT>
<BR><FONT SIZE=3D2> be that high. It is</FONT>
</P>
<BR>
<BR>
<P><FONT SIZE=3D2>C) You can verify the origin and spacing by printing =
out</FONT>
</P>
<P><FONT SIZE=3D2> std::cout << =
fixedImage->GetSpacing() << std::endl;</FONT>
<BR><FONT SIZE=3D2> std::cout << =
fixedImage->GetOrigin() << std::endl;</FONT>
</P>
<P><FONT SIZE=3D2> or by printing all the image =
information with</FONT>
</P>
<P><FONT SIZE=3D2> fixedImage->Print( std::cout =
);</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>D) ok, The initialization should be fine.</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>E) In MyPACS you have the option of posting =
"shared" (public)</FONT>
<BR><FONT SIZE=3D2> cases as well as =
"private" cases. The private level is</FONT>
<BR><FONT SIZE=3D2> supposed to be as secure as any =
other PACS system.</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>F) You can try the equivalent registration =
algorithm</FONT>
<BR><FONT SIZE=3D2> with the free version of =
VolView</FONT>
<BR><FONT SIZE=3D2> <A =
HREF=3D"http://www.kitware.com/products/volview.html" =
TARGET=3D"_blank">http://www.kitware.com/products/volview.html</A></FONT=
>
<BR><FONT SIZE=3D2> Just load one image, then go to =
the View->Filters</FONT>
<BR><FONT SIZE=3D2> menu and select</FONT>
</P>
<P><FONT SIZE=3D2> "Registration" =
---> "Image Registration (ITK)"</FONT>
</P>
<P><FONT SIZE=3D2> then in the button "Second =
input" browse for the</FONT>
<BR><FONT SIZE=3D2> second image (the moving =
image).</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>G) Please post the tracing messages that are printed =
out</FONT>
<BR><FONT SIZE=3D2> when the example runs (the =
sequence that displays the</FONT>
<BR><FONT SIZE=3D2> values of the metric and the =
values of the parameters</FONT>
<BR><FONT SIZE=3D2> for each iteration).</FONT>
</P>
<BR>
<BR>
<BR>
<P><FONT SIZE=3D2>Regards,</FONT>
</P>
<BR>
<P><FONT SIZE=3D2> Luis</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>----------------------------------</FONT>
<BR><FONT SIZE=3D2>Radhika Sivaramakrishna wrote:</FONT>
</P>
<P><FONT SIZE=3D2>> Hi Luis,</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Basically I used your example in =
ImageRegistration8.cxx as is, so I did use</FONT>
<BR><FONT SIZE=3D2>> Optimizerscale.</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> To answer your questions in order:</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> A) I used the metric =
MeanSquaresImageToImageMetric (as the example does) </FONT>
<BR><FONT SIZE=3D2>> and after about 89 iterations this is the error =
I got!</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> ExceptionObject caught !</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> itk::ExceptionObject (0x82c4738)</FONT>
<BR><FONT SIZE=3D2>> Location: "Unknown"</FONT>
<BR><FONT SIZE=3D2>> File: </FONT>
<BR><FONT SIZE=3D2>> =
/home/rsivaram/Insight/Code/Algorithms/itkMeanSquaresImageToImageMetric.=
txx</FONT>
<BR><FONT SIZE=3D2>> Line: 103</FONT>
<BR><FONT SIZE=3D2>> Description: itk::ERROR: =
MeanSquaresImageToImageMetric(0x82bc698): All </FONT>
<BR><FONT SIZE=3D2>> the points mapped to outside of the moving =
image</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> B) These images are brain MRI T1-weighted =
images.</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> C) How do I verify the origin and spacing? =
Basically I am trying to test </FONT>
<BR><FONT SIZE=3D2>> this currently on a simulated case where I have =
created one of the </FONT>
<BR><FONT SIZE=3D2>> images from the other by a known =
transformation, so is this still an issue?</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> D) Again initialization of the transform is =
exactly as in </FONT>
<BR><FONT SIZE=3D2>> ImageRegistration8.cxx.</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> My concern about posting the images is privacy =
issues since these are </FONT>
<BR><FONT SIZE=3D2>> from a hospital and there may be HIPAA issues. =
How accessible are</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> these images to the outside world?</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Thanks</FONT>
<BR><FONT SIZE=3D2>> Radhika</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> </FONT>
</P>
<BR>
<P><FONT =
SIZE=3D2> &nb=
sp; &nb=
sp; &nb=
sp; &nb=
sp; </FONT>
<BR><FONT =
SIZE=3D2>----------------------------------------------------- =
</FONT>
<BR><FONT SIZE=3D2>Confidentiality Notice. </FONT>
<BR><FONT SIZE=3D2>This email message is for the sole use of the =
intended recipient(s) and may contain confidential and privileged =
information. Any unauthorized review, use, disclosure or distribution =
is prohibited. If you are not the intended recipient, please contact =
the sender by reply email and destroy all copies of the original =
message. If you are the intended recipient, please be advised that the =
content of this message is subject to access, review and disclosure by =
the sender's Email System Administrator.</FONT></P>
</BODY>
</HTML>
------_=_NextPart_001_01C3D635.3AC688AA--