[Insight-users] 3D Image Volume Origin
Frank Miller
frankmiller at jhmi.edu
Thu Apr 13 16:07:29 EDT 2006
Hi Andrew,
The code in 2.4.0 does not set the origin of the image correctly
according to the DICOM standard. See Section C.7.6.2.1 in PS 3.3.
http://medical.nema.org/dicom/2004/04_03PU3.PDF
The comments in the 2.4.0 code lead me to believe that this was done
intentionally but I do not understand the reasoning. My suspicion is
that this code was correct at one time but then the DICOM standard
changed. If this is true, then it might be the case that your images
conform to the old standard.
Frank
Andrew Li wrote:
> 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.
> --------------------------------------------------------
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list