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 ofrtk.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 list
[email protected]
https://public.kitware.com/mailman/listinfo/rtk-users
_______________________________________________
Rtk-users mailing list
[email protected]
https://public.kitware.com/mailman/listinfo/rtk-users

Reply via email to