[Rtk-users] ITK ERROR: Geometry is empty error when generating DRRs

Suranga W isurusuranga.wijesinghe at gmail.com
Fri Dec 9 13:42:50 CET 2022


Hi,

I attempted to generate DRRs by adding the geometry configuration to the
ThreeDCircularProjectionGeometry object, as shown in the attached code
(python based code). However, I encountered a runtime error as below
(please look at the end of the email).

On the other hand, how can I pass the relevant gantry angle to it for
generating DRRs at different angles if I add geometry configuration using
the addProjection method as mentioned in my code?

What I mean is that if I use the code below to set machine parameters, I'm
not able to add the corresponding gantry angle for generating DRRs.

*geometry.AddProjection([-60.0, 59.0 + sid, 34.0],[-60.0 + 115.,
59.0+sid-sdd, 34.0],[1.,1.,0.],[0.,0.,1.])*

where [-60.0, 59.0, 34.0] represents the patient's isocenter.

However, if I use the code below, I can use the gantry angle but I
cannot set the machine geometry configuration.

*geometry.AddProjection(sid, sdd, gantryAngle, projOffsetX, projOffsetY,
outOfPlaneAngle, inPlaneAngle, sourceOffsetX, sourceOffsetY)*

I attached a CT volume for your further reference.

Please assist me in resolving this issue.

---------------------------------------------------------------------------RuntimeError
                             Traceback (most recent call last)
Cell In [29], line 45     43 rei.SetInput(0,
constantImageSource.GetOutput())     44 rei.SetInput(1, CT)---> 45
rei.Update()     47 Dimension = 3     48 OutputPixelType = itk.UC
RuntimeError: D:\a\im\include\rtkProjectionsRegionConstIteratorRayBased.hxx:88:
ITK ERROR: Geometry is empty, cannot determine iterator type.

 drr_projection_with_diff_angles.txt
<https://drive.google.com/file/d/1Ags89Lpczvrk_rdHpGSqDcBrashzNSZr/view?usp=drive_web>
 sample_CT.nii.gz
<https://drive.google.com/file/d/1SGh0cjspFwTj2v8qTLXtcCfbUvyUENS5/view?usp=drive_web>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.creatis.insa-lyon.fr/pipermail/rtk-users/attachments/20221209/ac11ca67/attachment.htm>


More information about the Rtk-users mailing list