[Insight-users] ImageRegistraiton5.py

Fred Lionetti lionetti at bioeng . ucsd . edu
Wed, 3 Sep 2003 11:03:51 -0700


This is a multi-part message in MIME format.

------=_NextPart_000_003F_01C3720B.0EC40540
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi all,

Does anyone have a working version of ImageRegistration5.py?  I tried to =
modify ImageRegistration3.py(based on ImageRegistration5.tcl and =
ImageRegistration3.tcl) and it seems that the only significant =
difference is the transform type (i.e. the call to TranslationTransform =
in ImageRegistration3.tcl, and CenteredRigid2DTransform in =
ImageRegistration5.tcl.)  However, when I modified ImageRegistration3.py =
to match this transform type used in ImageRegistration5.tcl (and =
ImageRegistration5.cxx) the output image was blank, and the final =
parameters were not correct.  With other images the program crashes on =
the call to StartRegistration() outputting the error message:

Starting registration
Traceback (innermost last):
  File "C:\Insight\Examples\REGIST~1\IMAGER~2.PY", line 91, in ?
    registration.StartRegistration()
  File "itkImageRegistrationMethod.py", line 401, in StartRegistration
RuntimeError: =
C:\Insight\Code\Algorithms\itkMeanSquaresImageToImageMetric.txx:91
:
itk::ERROR: MeanSquaresImageToImageMetric(0083EF80): All the points =
mapped to outside of the moving image

However, all poitns are not mapped outside of the moving image in my =
test files.  Any ideas?

For a plan B, would anyone know how to wrap an applicaiton such as =
ImageRegistration5.cxx for python?

Thanks for the help,
Fred
------=_NextPart_000_003F_01C3720B.0EC40540
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1226" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi all,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Does anyone have a working version of=20
ImageRegistration5.py?&nbsp; I tried to modify =
ImageRegistration3.py(based on=20
ImageRegistration5.tcl and ImageRegistration3.tcl) and it seems that the =
only=20
significant difference is the transform type (i.e. the call to=20
TranslationTransform in ImageRegistration3.tcl, and =
CenteredRigid2DTransform in=20
ImageRegistration5.tcl.)&nbsp; However, when I modified =
ImageRegistration3.py to=20
match this transform type used in ImageRegistration5.tcl (and=20
ImageRegistration5.cxx) the output image was blank, and the final =
parameters=20
were not correct.&nbsp; With other images the program crashes on the =
call to=20
StartRegistration() outputting the error message:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Times New Roman" =
size=3D3>Starting=20
registration<BR>Traceback (innermost last):<BR>&nbsp; File=20
"C:\Insight\Examples\REGIST~1\IMAGER~2.PY", line 91, in =
?<BR>&nbsp;&nbsp;&nbsp;=20
registration.StartRegistration()<BR>&nbsp; File =
"itkImageRegistrationMethod.py",=20
line 401, in StartRegistration<BR>RuntimeError:=20
C:\Insight\Code\Algorithms\itkMeanSquaresImageToImageMetric.txx:91<BR>:<B=
R>itk::ERROR:=20
MeanSquaresImageToImageMetric(0083EF80): All the points mapped to =
outside of the=20
moving image</FONT><BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>However, all poitns are&nbsp;not mapped =
outside of=20
the moving image in my&nbsp;test files.&nbsp; Any ideas?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>For a plan B, would anyone know how to =
wrap an=20
applicaiton such as ImageRegistration5.cxx for python?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for the help,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Fred</FONT></DIV></BODY></HTML>

------=_NextPart_000_003F_01C3720B.0EC40540--