[Rtk-users] Forward Projection

Simon Rit simon.rit at creatis.insa-lyon.fr
Mon Apr 27 10:42:07 EDT 2020


Hi,
ForwardProjectionImageFilter is a purely virtual class. Try for
example Joseph's
projector
<http://www.openrtk.org/Doxygen/classrtk_1_1JosephForwardProjectionImageFilter.html>
.
The forward projectors in RTK need two inputs : empty projections in which
to project (input 0) and the volume to project (input 1).
Check the c++ code of rtkforwarprojection
<https://github.com/SimonRit/RTK/blob/master/applications/rtkforwardprojections/rtkforwardprojections.cxx>
for a complete example, it's really not too hard to translate it to python.
Simon

On Mon, Apr 27, 2020 at 4:15 PM vincent via Rtk-users <
rtk-users at public.kitware.com> wrote:

> Hi Yoonho,
>
> my guess would be that FWDType possesses a SetInput method, from what  I
> understand from the inheritance diagram.
>
> Also make sure to define a geometry using an instance of
> rtk.ThreeDCircularProjectionGeometry.
>
> I encourage you to have a look at the class documentation:
> http://www.openrtk.org/Doxygen/classrtk_1_1ForwardProjectionImageFilter.html
>
> Hope it helps,
>
> best regards,
>
> Vincent
> On 27.04.20 09:59, 나윤호 wrote:
>
> Hi I'm trying to make an sinogram of shepp logan phantom.
>
> But I don't know how to do it using RTK...
>
> Do I need to define geometry for this?
>
> Here's what I did so far
>
>
> image = itk.imread('C:\\Users\\USER\\Jupyter
> Notebook\\ITK-RTK\\shepp_logan_phantom.png', itk.F)
> array = itk.array_from_image(image)
> expand = np.expand_dims(array, axis=2)   # just to make it into 3
> dimension ( ForwardProjectionImageFilter only supports 3D )
> expand = itk.image_from_array(expand)
>
> ImageType = itk.Image[itk.F,3]
>
> FWDType = rtk.ForwardProjectionImageFilter[ImageType, ImageType]
> fwd = FWDType.New()
>
>
> For the last line I have tried both
>
> fwd = FWDType.New(expand)   --->   AttributeError: No method found to set
> the input.
> and
> fwd = FWDType.New(Input = expand)    --->    AttributeError: 'itkObject'
> object has no attribute 'SetInput'
>
> they both had error like this.
>
> How can I make an sinogram of shepp logan phantom?
>
>
> Yoonho.
>
> _______________________________________________
> Rtk-users mailing listRtk-users at public.kitware.comhttps://public.kitware.com/mailman/listinfo/rtk-users
>
> _______________________________________________
> Rtk-users mailing list
> Rtk-users at public.kitware.com
> https://public.kitware.com/mailman/listinfo/rtk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/rtk-users/attachments/20200427/1b735738/attachment.html>


More information about the Rtk-users mailing list