<div dir="ltr"><div>Hi,</div><div>ForwardProjectionImageFilter is a purely virtual class. Try for example <a href="http://www.openrtk.org/Doxygen/classrtk_1_1JosephForwardProjectionImageFilter.html">Joseph's projector</a>.</div><div>The forward projectors in RTK need two inputs : empty projections in which to project (input 0) and the volume to project (input 1).</div><div>Check the c++ code of <a href="https://github.com/SimonRit/RTK/blob/master/applications/rtkforwardprojections/rtkforwardprojections.cxx">rtkforwarprojection</a> for a complete example, it's really not too hard to translate it to python.<br></div><div>Simon<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 27, 2020 at 4:15 PM vincent via Rtk-users <<a href="mailto:rtk-users@public.kitware.com">rtk-users@public.kitware.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>
<p>Hi Yoonho,</p>
<p>my guess would be that FWDType possesses a SetInput method, from
what I understand from the inheritance diagram.</p>
<p>Also make sure to define a geometry using an instance of<font color="#000912"> rtk.ThreeDCircularProjectionGeometry.</font></p>
<p><font color="#000912">I encourage you to have a look at the class
documentation:
<a href="http://www.openrtk.org/Doxygen/classrtk_1_1ForwardProjectionImageFilter.html" target="_blank">http://www.openrtk.org/Doxygen/classrtk_1_1ForwardProjectionImageFilter.html</a></font></p>
<p><font color="#000912">Hope it helps,</font></p>
<p><font color="#000912">best regards,</font></p>
<p><font color="#000912">Vincent<br>
</font></p>
<div>On 27.04.20 09:59, 나윤호 wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi I'm trying to make an sinogram of shepp logan
phantom.
<div><br>
</div>
<div>But I don't know how to do it using RTK...</div>
<div><br>
</div>
<div>Do I need to define geometry for this?</div>
<div><br>
</div>
<div>Here's what I did so far</div>
<div><br>
</div>
<div><br>
image = itk.imread('C:\\Users\\USER\\Jupyter
Notebook\\ITK-RTK\\shepp_logan_phantom.png', itk.F)<br>
array = itk.array_from_image(image)</div>
<div>expand = np.expand_dims(array, axis=2) # just to make it
into 3 dimension (
ForwardProjectionImageFilter only supports 3D )</div>
<div>expand = itk.image_from_array(expand)<br>
</div>
<div><br>
</div>
<div>ImageType = itk.Image[itk.F,3]<br>
<br>
FWDType = rtk.ForwardProjectionImageFilter[ImageType,
ImageType]<br>
fwd = FWDType.New()<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>For the last line I have tried both</div>
<div><br>
</div>
<div>fwd = FWDType.New(expand) ---> <span style="font-size:14px;white-space:pre-wrap;box-sizing:border-box;color:rgb(178,43,49);font-weight:bold">AttributeError</span><span style="color:rgb(0,0,0);font-size:14px;white-space:pre-wrap">: No method found to set the input.</span></div>
<div>and</div>
<div>fwd = FWDType.New(Input = expand) ---> <span style="font-size:14px;white-space:pre-wrap;box-sizing:border-box;color:rgb(178,43,49);font-weight:bold">AttributeError</span><span style="color:rgb(0,0,0);font-size:14px;white-space:pre-wrap">: 'itkObject' object has no attribute 'SetInput'</span></div>
<div><br>
</div>
<div>they both had error like this.</div>
<div><br>
</div>
<div>How can I make an sinogram of shepp logan phantom?</div>
<div><br>
</div>
<div><br>
</div>
<div>Yoonho.</div>
<img alt="" style="display: flex;" src="https://mailtrack.io/trace/mail/a1b0394e8b3c4d7e7af503ed924b4af3fb4a4a7a.png?u=4672561" width="0" height="0"></div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Rtk-users mailing list
<a href="mailto:Rtk-users@public.kitware.com" target="_blank">Rtk-users@public.kitware.com</a>
<a href="https://public.kitware.com/mailman/listinfo/rtk-users" target="_blank">https://public.kitware.com/mailman/listinfo/rtk-users</a>
</pre>
</blockquote>
</div>
_______________________________________________<br>
Rtk-users mailing list<br>
<a href="mailto:Rtk-users@public.kitware.com" target="_blank">Rtk-users@public.kitware.com</a><br>
<a href="https://public.kitware.com/mailman/listinfo/rtk-users" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/rtk-users</a><br>
</blockquote></div>