[Insight-users] Problems with Digitally Reconstructed Radiographs

Jian Wu eewujian at hotmail.com
Tue Apr 4 10:47:29 EDT 2006


Hi, Christina,

We had the same problem before. It was caused by a bug in 
itkRayCastInterpolateImageFunction.txx
The following correction should be maded.

=============================================================
File Name: itkRayCastInterpolateImageFunction.txx
Revision: 1.18
Line Number: 731-738
Original:
  m_CurrentRayPositionInMM[0] =
    RayPosn[0] + 0.5*m_VoxelDimensionInX*(double)m_NumberOfVoxelsInX;

  m_CurrentRayPositionInMM[1] =
    RayPosn[1] + 0.5*m_VoxelDimensionInY*(double)m_NumberOfVoxelsInY;

  m_CurrentRayPositionInMM[2] =
RayPosn[2] + 0.5*m_VoxelDimensionInZ*(double)m_NumberOfVoxelsInZ;
Replaced by:
  m_CurrentRayPositionInMM[0] = RayPosn[0];

  m_CurrentRayPositionInMM[1] = RayPosn[1];

  m_CurrentRayPositionInMM[2] = RayPosn[2];
=============================================================

This reason for the correction is that the coordinate of the point 
m_CurrentRayPositionInMM should be w.r.t. the center of rotation instead of 
that w.r.t. the origin. Because of this mistake, the DRRs generated using 
old codes were off-centered. This can be verified by running the application 
DigitallyReconstructedRadiograph1.cxx
with the input parameters as
-v -res 2 2 -o CubeDRR.img
After above corrections you should get a DRR with the cube located in the 
center (It should be that for given geometry.). The output screen should be 
look like below.

=============================================================
Output image: CubeDRR.img

Input ImageRegion (0129FD8C)
  Dimension: 3
  Index: [0, 0, 0]
  Size: [61, 61, 61]
  Resolution: [3, 3, 3]
  Origin: [0, 0, 0]

Image size: 61, 61, 61
   resolution: 3, 3, 3
   origin: 91.5, 91.5, 91.5
   center: 91.5, 91.5, 91.5
Transform: CenteredEuler3DTransform (0178BA48)
  RTTI typeinfo:   class itk::CenteredEuler3DTransform<double>
  Reference Count: 2
  Modified Time: 26
  Debug: Off
  Observers:
    none
  Matrix:
    1 0 0
    0 1 0
    0 0 1
  Offset: [0, 0, 0]
  Center: [91.5, 91.5, 91.5]
  Translation: [0, 0, 0]
  Inverse:
    1 0 0
    0 1 0
    0 0 1
  Singular: 0
  Euler's angles: AngleX=0 AngleY=0 AngleZ=0
  m_ComputeZYX = 1

Focal Point: 91.5, 91.5, -108.5
RayCastInterpolateImageFunction (0178BEE0)
  RTTI typeinfo:   class itk::RayCastInterpolateImageFunction<class 
itk::Image<short,3>,double>
  Reference Count: 1
  Modified Time: 29
  Debug: Off
  Observers:
    none
  InputImage: 00000000
  StartIndex: [0, 0, 0]
  EndIndex: [0, 0, 0]
  StartContinuousIndex: [0, 0, 0]
  EndContinuousIndex: [0, 0, 0]
  Threshold: 0
  FocalPoint: [91.5, 91.5, -108.5]
  Transform: 0178BA48
  Interpolator: 00000000
Output image size: 501, 501, 1
Output image spacing: 2, 2, 1
Output image origin: -408.5, -408.5, 291.5
Writing image: CubeDRR.img
=============================================================

Please try it and let me know if you have any further questions.

Jian Wu
Dept. of Radiation Oncology
Univ. of Florida


>From: Christina Lacalli <clacalli at uni-koblenz.de>
>To: insight-users at itk.org
>Subject: [Insight-users] Problems with Digitally Reconstructed Radiographs
>Date: Tue, 04 Apr 2006 14:41:42 +0200
>
>Hello,
>
>I have problems with generating DRRs as it is described in the ITK example 
>code 'DigitallyReconstructedRadiograph1.cxx'.
>Especially I do not understand how to set the parameters correctly.
>
>I use a real data set with size [256, 256, 17], pixel spacing [1.48, 1.48, 
>5]mm and origin [0,0,0]. According to the instructions from a previous 
>thread I have changed the translation parameters to [-190, -190, -42,5] to 
>center the DRR. Indeed, the resulting DRR is centered in x and y but it 
>appears too close to the
>camera so that I can only see a small region.
>However, setting the z-part of the translation to -242,5 - that is the 
>z-position
>of the DRR - the resulting DRR seems to be correct?! How do I
>calculate the right z-parameter?
>
>Furthermore, when I change the rotation parameters, for example the x-part 
>to
>45 and leaving the translation unchanged (z = -242,5), I do not obtain the 
>expected result.
>The resulting DRR is identical to the one without rotation, except that it 
>is not centered anymore.
>But when I set the z-part again to -42,5 the rotation seems to work, but 
>the
>resulting DRR again does not show the whole image.
>
>Can anyone give me some advice how to figure out this problem?!
>
>Thank you
>
>Christina
>
>_______________________________________________
>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