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>