<div dir="ltr"><div>Hi Simon,</div><div><br></div>Many thanks. I have another few questions though.<div><br></div><div>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.</div><div><br></div><div>2.) If I have the field of view origin from a corresponding kV X-ray dicom image (let's say for gantry angle zero <span style="color:rgb(0,0,0);font-size:14px;white-space:pre-wrap">Field of View Origin at detector is [116.853836060, 4.566089153] in pixels <a href="https://dicom.innolitics.com/ciods/enhanced-xa-image/enhanced-xa-image-multi-frame-functional-groups/52009229/00189432/00187030">see</a></span>), how can I use them to produce DRRs with aforementioned machine configurations in AddProjection method ?</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 12, 2022 at 8:43 AM Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr">simon.rit@creatis.insa-lyon.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Hi,</div><div>You might have missed an earlier message</div><div><span style="font-family:monospace">WARNING: In /home/srit/src/itk/itk/Modules/Remote/RTK/src/rtkThreeDCircularProjectionGeometry.cxx, line 210<br>DataObject (0x55d436d7ee10): Failed to AddProjection</span></div><div>The problem is that the two vectors describing the projection orientation are not unit vector. You can correct this with:<br></div><div><span style="font-family:monospace">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.])</span></div><div>Simon<br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 9, 2022 at 1:43 PM Suranga W <<a href="mailto:isurusuranga.wijesinghe@gmail.com" target="_blank">isurusuranga.wijesinghe@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>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).</div><div> </div><div>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?<br></div><div><br></div><div>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.</div><div><br></div><div><div><i><b>geometry.AddProjection([-60.0, 59.0 + sid, 34.0],[-60.0 + 115., 59.0+sid-sdd, 34.0],[1.,1.,0.],[0.,0.,1.])</b></i><br></div><div><br></div><div>where [-60.0, 59.0, 34.0] represents the patient's isocenter.</div></div><div><br></div><div>However, if I use the code below, I can use the gantry angle but I cannot set the machine geometry configuration.</div><div><br></div><div><b><i>geometry.AddProjection(sid, sdd, gantryAngle, projOffsetX, projOffsetY, outOfPlaneAngle, inPlaneAngle, sourceOffsetX, sourceOffsetY)</i></b></div><div><br></div><div>I attached a CT volume for your further reference.</div><div><br></div><div>Please assist me in resolving this issue.</div><div><br></div><div><pre style="box-sizing:border-box;overflow:auto;font-size:14px;padding:1px 0px;margin-top:0px;margin-bottom:0px;line-height:inherit;color:rgb(0,0,0);word-break:break-all;border:0px none;border-radius:0px;white-space:pre-wrap;vertical-align:baseline"><pre style="box-sizing:border-box;overflow:auto;padding:1px 0px;margin-top:0px;margin-bottom:0px;line-height:inherit;word-break:break-all;border:0px none;border-radius:0px;white-space:pre-wrap;vertical-align:baseline"><span style="box-sizing:border-box;color:rgb(178,43,49);font-weight:bold">---------------------------------------------------------------------------</span>
<span style="box-sizing:border-box;color:rgb(178,43,49);font-weight:bold">RuntimeError</span>                              Traceback (most recent call last)
Cell <span style="box-sizing:border-box;color:rgb(0,116,39);font-weight:bold">In [29], line 45</span>
<span style="box-sizing:border-box;color:rgb(0,162,80)">     43</span> rei<span style="box-sizing:border-box;color:rgb(98,98,98)">.</span>SetInput(<span style="box-sizing:border-box;color:rgb(98,98,98)">0</span>, constantImageSource<span style="box-sizing:border-box;color:rgb(98,98,98)">.</span>GetOutput())
<span style="box-sizing:border-box;color:rgb(0,162,80)">     44</span> rei<span style="box-sizing:border-box;color:rgb(98,98,98)">.</span>SetInput(<span style="box-sizing:border-box;color:rgb(98,98,98)">1</span>, CT)
<span style="box-sizing:border-box;color:rgb(0,116,39);font-weight:bold">---> 45</span> <span style="box-sizing:border-box;background-color:rgb(221,182,43)">rei</span><span style="box-sizing:border-box;background-color:rgb(221,182,43);color:rgb(98,98,98)">.</span><span style="box-sizing:border-box;background-color:rgb(221,182,43)">Update</span><span style="box-sizing:border-box;background-color:rgb(221,182,43)">(</span><span style="box-sizing:border-box;background-color:rgb(221,182,43)">)</span>
<span style="box-sizing:border-box;color:rgb(0,162,80)">     47</span> Dimension <span style="box-sizing:border-box;color:rgb(98,98,98)">=</span> <span style="box-sizing:border-box;color:rgb(98,98,98)">3</span>
<span style="box-sizing:border-box;color:rgb(0,162,80)">     48</span> OutputPixelType <span style="box-sizing:border-box;color:rgb(98,98,98)">=</span> itk<span style="box-sizing:border-box;color:rgb(98,98,98)">.</span>UC

<span style="box-sizing:border-box;color:rgb(178,43,49);font-weight:bold">RuntimeError</span>: D:\a\im\include\rtkProjectionsRegionConstIteratorRayBased.hxx:88:
ITK ERROR: Geometry is empty, cannot determine iterator type.</pre>
<div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;color:rgb(34,34,34);font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/file/d/1Ags89Lpczvrk_rdHpGSqDcBrashzNSZr/view?usp=drive_web" style="display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0px;border:medium none;width:100%" aria-label="drr_projection_with_diff_angles.txt" target="_blank"><img style="vertical-align: bottom; border: medium none;" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:rgb(17,85,204);text-decoration:none;vertical-align:bottom">drr_projection_with_diff_angles.txt</span></a></div><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;color:rgb(34,34,34);font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/file/d/1SGh0cjspFwTj2v8qTLXtcCfbUvyUENS5/view?usp=drive_web" style="display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0px;border:medium none;width:100%" aria-label="sample_CT.nii.gz" target="_blank"><img style="vertical-align: bottom; border: medium none;" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:rgb(17,85,204);text-decoration:none;vertical-align:bottom">sample_CT.nii.gz</span></a></div>
</pre><pre style="box-sizing:border-box;overflow:auto;font-size:14px;padding:1px 0px;margin-top:0px;margin-bottom:0px;line-height:inherit;color:rgb(0,0,0);word-break:break-all;border:0px none;border-radius:0px;white-space:pre-wrap;vertical-align:baseline"><br></pre><pre style="box-sizing:border-box;overflow:auto;font-size:14px;padding:1px 0px;margin-top:0px;margin-bottom:0px;line-height:inherit;color:rgb(0,0,0);word-break:break-all;border:0px none;border-radius:0px;white-space:pre-wrap;vertical-align:baseline"><br></pre><pre style="box-sizing:border-box;overflow:auto;font-size:14px;padding:1px 0px;margin-top:0px;margin-bottom:0px;line-height:inherit;color:rgb(0,0,0);word-break:break-all;border:0px none;border-radius:0px;white-space:pre-wrap;vertical-align:baseline"><br></pre></div></div>
</blockquote></div>
</blockquote></div>