[Rtk-users] ITK ERROR: Geometry is empty error when generating DRRs
Simon Rit
simon.rit at creatis.insa-lyon.fr
Mon Dec 12 08:42:51 UTC 2022
Hi,
You might have missed an earlier message
WARNING: In
/home/srit/src/itk/itk/Modules/Remote/RTK/src/rtkThreeDCircularProjectionGeometry.cxx,
line 210
DataObject (0x55d436d7ee10): Failed to AddProjection
The problem is that the two vectors describing the projection orientation
are not unit vector. You can correct this with:
geometry.AddProjection([-60.0, 59.0 + sid, 34.0],[-60.0 + 115.,
59.0+sid-sdd, 34.0],[1./math.sqrt(2.),1./math.sqrt(2.),0.],[0.,0.,1.])
Simon
On Fri, Dec 9, 2022 at 1:43 PM Suranga W <isurusuranga.wijesinghe at gmail.com>
wrote:
> 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://public.kitware.com/pipermail/rtk-users/attachments/20221212/27bc72c1/attachment.htm>
More information about the Rtk-users
mailing list