[Rtk-users] how to transform itk.CudaImage[itk.F, 3] to itk.Image[itk.F, 3] in python?
Simon Rit
simon.rit at creatis.insa-lyon.fr
Mon Nov 27 07:00:23 CET 2023
Hi,
You can find here
<https://github.com/RTKConsortium/RTK/blob/master/examples/FirstReconstruction/FirstCudaReconstruction.py#L70-L76>
how to convert an itk.Image to an itk.CudaImage. An itk.CudaImage is an
itk.Image (by inheritance) so you should not need to convert it, just use
it as if it were an itk.Image, as illustrated in the same example here
<https://github.com/RTKConsortium/RTK/blob/master/examples/FirstReconstruction/FirstCudaReconstruction.py#L91>.
Or have I missed something?
Simon
On Sun, Nov 26, 2023 at 4:06 PM Fuquan Deng <dfq_2022 at 163.com> wrote:
> Dear simon,
>
> althought do not the theory of transforming numpy.array to cuda image, I
> succeed.
> but now i have other question.
> how to transform cudaimage to itk.Image, and then use GetArrayFromImage to
> transform to numpy.array?
>
> i have read the itk and rtk documents and can not find the answer. Use GPT
> and get wrong answer. So i come to here and send email to ask you about
> this. Does rtk-python support this?
> Thanks and look forward to your reply.
>
> Fuquan Deng
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.creatis.insa-lyon.fr/pipermail/rtk-users/attachments/20231127/01de64c5/attachment.htm>
More information about the Rtk-users
mailing list