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>&nbsp;&nbsp;&nbsp; imageReader2D-&gt;GetOutput()-&gt;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>&nbsp;&nbsp;&nbsp; m_Metric-&gt;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>&nbsp; // Recover user-defined image origin
<br>&nbsp; const short Dimension = GetImageDimension&lt;FixedImageType&gt;::ImageDimension;<br>&nbsp; double fixedOrg[Dimension];<br>&nbsp; for(int i = 0; i &lt; Dimension; i++)<br>&nbsp;&nbsp;&nbsp; fixedOrg[i] = fixedOrigin[i];<br>&nbsp; //m_FixedImage-&gt;SetOrigin(fixedOrg);
<br>&nbsp; //m_Metric-&gt;GetFixedImage()-&gt;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&lt;VImageDimension&gt;::SetOrigin' : 3 overloads have no legal conversion for 'this' pointer<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; with<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VImageDimension=3<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]<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>