[Rtk-users] using RTK with python

나윤호 yoonho94.na at gmail.com
Tue Apr 21 04:15:11 EDT 2020


Thank you for replying.

I'm pretty sure that I haven't changed anything in the example script.
What I just did is copy and paste and run it.

geometry was defined like this

geometry = rtk.ThreeDCircularProjectionGeometry.New()

and could you explain me how to translate(?) does documents into pythonic
way?
(I don't know much about Clang)

for example, in the link you gave me it says

*rtk::FDKConeBeamReconstructionFilter< TInputImage, TOutputImage,
TFFTPrecision > Class Template Reference  *

I empirically know that in python I have to type something like

*rtk.FDKConeBeamReconstructionFilter[InputImage, OutputImage, FFTPrecision]*

Am I right??

2020년 4월 21일 (화) 오후 4:58, Aurélien Coussat <
aurelien.coussat at creatis.insa-lyon.fr>님이 작성:

> Hi,
>
> Your first error is really strange. The "geometry" variable is supposed to
> be typed as rtkThreeDCircularProjectionGeometry (defined line 14), while
> according to your error message it is of type
> rtkFDKConeBeamReconstructionFilter. Are you sure you haven't somehow
> altered the example script?
>
> About your second question, you can use rtkFDKConeBeamReconstructionFilter
> and provide it a parallel geometry. See the documentation for more details
> :
> http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html
> .
>
> Don't hesitate if something remains unclear!
>
> Aurélien.
>
> On Tue, 2020-04-21 at 12:06 +0900, 나윤호 wrote:
>
> Hi.
> I'm a newbie to ITK and RTK.
> I'm currently using python not C++
>
> so I installed ITK package and RTK package using
>
> pip install itk
> pip install itk-rtk
>
> using ITK seems OK,  but I'm having difficulties with RTK.
>
> When I run the ITK example code, It worked well.
> but when I tried to run the FirstReconstruction.py in the github,
> error occurrs.
>
> ---------------------------------------------------------------------------AttributeError                            Traceback (most recent call last)<ipython-input-1-be2ee9c70d3d> in <module>     19 for x in range(0,numberOfProjections):     20   angle = firstAngle + x * angularArc / numberOfProjections---> 21   geometry.AddProjection(sid,sdd,angle)     22      23 # Writing the geometry to disk
> AttributeError: 'rtkFDKConeBeamReconstructionFilterIF3' object has no attribute 'AddProjection'
>
>
>
> How can I fix this problem?
>
> and I have another question.
> I want the reconstruct the sinogram image to phantom.
>
> usually what I did was using skimage.transform.iradon().
> what should I use in RTK to do Inverse radon transform or Filtered back
> projection method?
>
>
> _______________________________________________
> Rtk-users mailing listRtk-users at public.kitware.comhttps://public.kitware.com/mailman/listinfo/rtk-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/rtk-users/attachments/20200421/acaaaac7/attachment-0001.html>


More information about the Rtk-users mailing list