<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR>
<STYLE>
<!--
/* Font Definitions */
@font-face
        {font-family:ËÎÌå;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@ËÎÌå";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Verdana;
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
/* Page Definitions */
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        layout-grid:15.6pt;}
div.Section1
        {page:Section1;}
-->
</STYLE>
</HEAD>
<BODY>
<DIV><FONT face=Verdana color=#000000>Hi, Jian,</FONT></DIV>
<DIV><FONT face=Verdana color=#000000></FONT> </DIV>
<DIV><FONT face=Verdana color=#000000>Because m_Metric->GetFixedImage()
return a constant object which could not be changed, the </FONT><FONT
face=Verdana color=#000000>origin could not be set.</FONT></DIV>
<DIV><PRE><CODE><FONT face=Verdana color=#000000>HTH,</FONT></CODE></PRE><PRE><CODE><FONT face=Verdana color=#000000>Fucang</FONT></CODE></PRE></DIV>
<DIV><FONT face=Verdana color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Verdana color=#0000ff size=2></FONT> </DIV>
<DIV> <FONT face=Verdana size=2> </DIV>
<DIV>
<HR>
</DIV></FONT>
<DIV><FONT face=Verdana><FONT size=2>On 2006-06-26 11:19:21 Jian
Wu</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2>Subject: [Insight-users]
Questions about ImageRegistrationMethod - How tokeep user-defined image
origin?</FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>Dear ITK users:<BR><BR>I'm working on a 2D-3D
image registration projection. The input 2D image has a user-specified image
origin. The origin was set by using the following
code.<BR><BR> imageReader2D->GetOutput()->SetOrigin(
origin2D); <BR><BR>The change was successful and it has been verified in
debugging. However, I noticed the origin was slightly changed by the code during
the initialization of the registration. That was happened in Line 210 in
itkImageRegistrationMethod.txx (version 1.24). The code
is<BR><BR> m_Metric->Initialize();<BR><BR>I also noticed
the author did try to recover the user-specified orgin in the code immediately
following above one.<BR><BR> // Recover user-defined image origin
<BR> const short Dimension =
GetImageDimension<FixedImageType>::ImageDimension;<BR> double
fixedOrg[Dimension];<BR> for(int i = 0; i < Dimension;
i++)<BR> fixedOrg[i] = fixedOrigin[i];<BR>
//m_FixedImage->SetOrigin(fixedOrg); <BR>
//m_Metric->GetFixedImage()->SetOrigin(fixedOrg);<BR><BR>I don't know why
the last two lines were commented out. I removed the comment characters and
recomplied the codes. But I got the following compiling errors. <BR><BR>error
C2663: 'itk::ImageBase<VImageDimension>::SetOrigin' : 3 overloads have no
legal conversion for 'this'
pointer<BR>
with<BR>
[<BR>
VImageDimension=3<BR> ]<BR><BR>I'm
using Microsoft Visual C++ 2005 standard edition and Window XP professional.
<BR><BR>Any help and suggestions will be appreciated!<BR><BR>Jian
Wu<BR><BR></FONT></DIV></BODY></HTML>