[Insight-users] 3D Image Volume Origin

Andrew Li andrew.li at synarc.com
Thu Apr 13 14:57:01 EDT 2006


Hi, ITK users:

We are moving up ITK package from 2.4.0 to 2.6.0.
There are some problems after ITK library is switched.

Those problems seem related to the center of the 3D volume, which is
related to Origin and Direction of the 3D volume.

We just start to investigate the problems and we noticed that there are
some changes made in IO/itkGDCMImageIO.cxx

  In ITK 2.4.0 version: Date:      $Date: 2005/11/29 21:58:28 $
  // DICOM specifies its origin in LPS coordinate, regardless of how
  // the data is acquired. itk's origin must be in the same
  // coordinate system as the data. This code transforms the DICOM
  // origin into the itk origin. The itk origin is computed by
  // multiplying the inverse(transpose) of the direction cosine times
  // the dicom origin.
  vnl_vector<double> itkOrigin(3), dicomOrigin(3);
  vnl_matrix<double> dicomDirection(3,3);
  dicomOrigin[0] = header.GetXOrigin();
  dicomOrigin[1] = header.GetYOrigin();
  dicomOrigin[2] = header.GetZOrigin();
  for (unsigned int ii = 0; ii < 3; ii++)
    {
    dicomDirection[0][ii] = rowDirection[ii];
    dicomDirection[1][ii] = columnDirection[ii];
    dicomDirection[2][ii] = sliceDirection[ii];
    }
  itkOrigin = dicomDirection * dicomOrigin;
  m_Origin[0] = itkOrigin[0];
  m_Origin[1] = itkOrigin[1];
  m_Origin[2] = itkOrigin[2];

  While in ITK 2.6.0 version: Date:      $Date: 2006/03/08 18:28:57 $
  // Dicom's origin is always in LPS
  m_Origin[0] = header.GetXOrigin();
  m_Origin[1] = header.GetYOrigin();
  m_Origin[2] = header.GetZOrigin();

Could anyone tell us the reason of the changes and impact of the
changes?
Thank you all for your help!

-Andrew
 
--------------------------------------------------------

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.
--------------------------------------------------------


More information about the Insight-users mailing list