Hi,
1) You can't. This method uses another parametrization.
2) You can set the field-of-view parameters by adjusting the origin and
size of the input image.
Simon

On Mon, Dec 12, 2022 at 3:59 PM Suranga W <isurusuranga.wijesin...@gmail.com>
wrote:

> Hi Simon,
>
> Many thanks. I have another few questions though.
>
> 1.) How can I pass different gantry angles if I use the aforementioned
> AddProjection method, which lacks the gantryAngle parameter? What I want is
> to generate DRR images for angles 36, 72, 108, and so on.
>
> 2.) If I have the field of view origin from a corresponding kV X-ray dicom
> image (let's say for gantry angle zero Field of View Origin at detector
> is [116.853836060, 4.566089153] in pixels see
> <https://dicom.innolitics.com/ciods/enhanced-xa-image/enhanced-xa-image-multi-frame-functional-groups/52009229/00189432/00187030>),
> how can I use them to produce DRRs with aforementioned machine
> configurations in AddProjection method ?
>
>
>
> On Mon, Dec 12, 2022 at 8:43 AM Simon Rit <simon....@creatis.insa-lyon.fr>
> wrote:
>
>> 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.wijesin...@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>
>>>
>>>
>>>
>>>
>>>
_______________________________________________
Rtk-users mailing list
Rtk-users@public.kitware.com
https://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users

Reply via email to