[Insight-users] Re: DRR generation problem

Jian Wu eewujian at hotmail.com
Wed Jan 25 11:16:45 EST 2006


Hi, Luis,
Thank you very much! I got the desired DRRs using the translation parameters 
as you sugguested. However I'm still unable to fully understand the 
projection geometry. You said the focal point was aligned with the origin by 
default. But I found out the focal point was actually aligned with the 
volume center and the 2D projection image center. I ran the test using the 
following parameters.

DigitallyReconstructedRadiograph1 -v -o CubeDRR.img

The focal point was located at (91.5, 91.5, -108.5), which had already 
aligned with the 3D Cube center (91.5, 91.5, 91.5) and the 2D output DRR 
center (91.5, 91.5, 291.5). I just couldn't understand why we had to 
translate the camer to get a centerized output image.

I'll appreciate your help very much!

Jian Wu

>From: Luis Ibanez <luis.ibanez at kitware.com>
>To: Jian Wu <eewujian at hotmail.com>
>CC: Insight Users <insight-users at itk.org>
>Subject: Re: DRR generation problem
>Date: Fri, 20 Jan 2006 14:50:58 -0500
>
>
>Hi Jian,
>
>
>Thanks for reporting the difficulties you are facing with the
>example
>
>        Insight/Examples/Filtering/
>            DigitallyReconstructedRadiograph1.cxx
>
>
>It seems that the source of the confusion is that the program is
>using the default coordinate system. That is, the focal point is
>by default, aligned with the origin.
>
>
>When you don't provide an input image to this example, it creates
>a default synthetic image that contains the brigth edges of a cube.
>
>
>See lines:   316-402.
>
>
>This default image has the following characteristics:
>
>
>      Size in pixels =    61,  61,  61
>
>      Pixel size     =   3.0, 3.0, 3.0
>
>      Origin         =   0.0, 0.0, 0.0
>
>
>So, by default, the projection will of course be off centered
>because the line of sight of the projection is aligned with
>on of the edges of the image, not crossing through its center.
>
>
>If you want the projection to be centered with respect to the
>image, then you should simply use the option "-t", with a
>translation that is equal to half the physical extent of the
>image (and negative).
>
>
>In this case, the extent is
>
>          (3*61, 3*61, 3*61) = ( 181, 181, 181 ) mm
>
>
>Therefore,
>
>         if you put translations of   "-t -90,-90,-90"
>
>      then you will get a centered projection of the cube.
>
>
>More specifically,
>
>
>            Please use the following command line:
>
>
>   DigitallyReconstructedRadiograph1 -t -90 -90 -90 -o CubeDRR.img
>
>
>
>This will give you a centered projection.
>
>
>for an example using a real image, you could also try:
>
>
>
>   DigitallyReconstructedRadiograph1 -t -90 -109 -90
>                         -o brain.img  brainweb165a10f17.mhd
>
>
>
>(in a single line)
>
>The brainweb image can be downloaded from the Data page of www.itk.org:
>
>             http://www.itk.org/HTML/Data.htm
>             ftp://public.kitware.com/pub/itk/Data/BrainWeb
>
>
>
>
>
>   Please let us know if you have further questions,
>
>
>      Thanks
>
>
>         Luis
>
>
>
>-------------
>Jian Wu wrote:
>>Hi Luis,
>>I'm wondering if you have paid attention to the email I sent to you on Dec 
>>29, 2005. I'm sending you the mail again and hope you could help. Thanks!
>>Jian Wu
>>
>>Hi Luis,
>>
>>Thanks for your work. But the problem is still there. Please try to use 
>>the
>>following parameters for the test.
>>
>>DigitallyReconstructedRadiograph1 -res 2 2 -o CubeDRR.img
>>
>>The output image was not centered. Moreover, it appears the ray that 
>>passes
>>through the origin of the 3D image is not normal to the 2D image plane.
>>Please check it out.
>>
>>By the way, I have a suggestion. In medical application, the projection
>>geometry is usually specified by a source-to-image distance (sid) and a
>>source-to-object ditance (sod), i.e., the distance from the source to the
>>origin of the 3D volume. It would be more practical if those two 
>>parameters
>>were used in the code instead of using a focal length and positioning the 
>>3D
>>volume half way between the source and the screen.
>>
>>Jian Wu
>>
>>>From: Luis Ibanez <luis.ibanez at kitware.com>
>>>To: Jian Wu <eewujian at hotmail.com>
>>>CC: insight-users at itk.org, samant at ufl.edu, mmhuang at ufl.edu,      
>>>   xiajunyi at hotmail.com, john.hipwell at kcl.ac.uk, thomas at 
>>>hartkens.de
>>>Subject: Re: [Insight-users] Problem with DRR generation
>>>Date: Thu, 29 Dec 2005 08:27:41 -0500
>>>
>>>
>>>Hi Jian,
>>>
>>>Looking at the Code of the DigitallyReconstructedRadiograph1.cxx
>>>it seems that it is missing to take the image origin into account.
>>>
>>>
>>>If your image has an origin different than zero, the computation
>>>of the image center will be incorrect.
>>>
>>>
>>>We just committed a fix for this issue to the CVS repository.
>>>You may want to update your CVS checkout (if you have one)
>>>or you can apply the same corrections to your local code.
>>>
>>>
>>>The modifications can be found at:
>>>http://www.itk.org/cgi-bin/viewcvs.cgi/Examples/Filtering/DigitallyReconstructedRadiograph1.cxx?root=Insight&sortby=date&r2=1.15&r1=1.14
>>>
>>>
>>>
>>>
>>>   Please let us know if you find any problems,
>>>
>>>
>>>
>>>      Thanks
>>>
>>>
>>>         Luis
>>>
>>>
>>>
>>>---------------
>>>Jian Wu wrote:
>>>
>>>>Dear ITK users:
>>>>
>>>>I'm wondering if anyone have generated correction DRRs using the example 
>>>>programs GenerateProjection.cxx or 
>>>>DigitallyReconstructedRadiograph1.cxx.
>>>>
>>>>I ran both codes using the parameters and the image given in the 
>>>>README.txt file. But the generated DRRs appear to have a different 
>>>>projection and image center than I expected.
>>>>I also tried to simply the test data in 
>>>>DigitallyReconstructedRadiograph1.cxx. Instead of using the orignal 
>>>>cubic structure, I constructed a 61x61x61 3D image with a single point 
>>>>at the center of the image. The resulting DRR has a point centered at 
>>>>pixel index (81, 81). The DRR has the size of 501x501, and the point is 
>>>>supposed to be at the center of the image. I can't figure out how the 
>>>>projection works. I really wish the projection geometry were better 
>>>>documented.
>>>>
>>>>When real CT data sets were used, the objects in the output DRRs appear 
>>>>to have been shifted toward the left-bottom corner of the images. I 
>>>>searched the emails that have been posted before. It appears someone has 
>>>>pointed out the problem before. However, I did not find any answers to 
>>>>the question. By the way, the IntensityBased2D3DRegistration.cxx example 
>>>>code does not work. I have posted the problem a couple of days ago.
>>>>
>>>>Someone help me out please!
>>>>
>>>>Jian Wu
>>>>
>>>>
>>>>_______________________________________________
>>>>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