[Rtk-users] rtk::CudaVectorImage available
Simon Rit
simon.rit at creatis.insa-lyon.fr
Thu Feb 21 17:54:50 EST 2019
Hi,
I'm not very familiar with VariableLengthVector but I think it is not the
same as a Vector. An itk::CudaImage<itk::Vector<float,3>,2> buffer is not
fragmented. In terms of performances, it depends how you use them. In our
usage, I think it's more efficient to have all values belonging to a pixel
next to each other in memory.
No, there is no memory reorganization for the GPU, it's a straight copy of
the CPU to the GPU. We use textures internally sometimes but this is done
when executing the filter.
Don't hesitate to describe the problem you want to solve, I can try to
help...
Simon
On Thu, Feb 21, 2019 at 11:45 PM Kabelitz, Gordian <
Gordian.Kabelitz at medma.uni-heidelberg.de> wrote:
> Hi Simon,
>
>
>
> I asked because of the description of the itk::VectorImage (
> https://itk.org/Doxygen/html/classitk_1_1VectorImage.html):
>
> *“**Conceptually, a **VectorImage< TPixel, 3 >** is the same as a **Image
> <https://itk.org/Doxygen/html/classitk_1_1Image.html><
> VariableLengthVector< TPixel >, 3 >**. The difference lies in the memory
> organization. The latter results in a fragmented organization with each
> location in the Image <https://itk.org/Doxygen/html/classitk_1_1Image.html>** holding
> a pointer to an **VariableLengthVector
> <https://itk.org/Doxygen/html/classitk_1_1VariableLengthVector.html>** holding
> the actual pixel. The former stores the **k** pixels instead of a pointer
> reference, which apart from avoiding fragmentation of memory also avoids
> storing a 8 bytes of pointer reference for each pixel. The parameter **k** can
> be set using **SetVectorLength**.”*
>
>
>
> Does it make any performance differences on the CPU algorithms?
>
> I guess that the memory is reorganized in the rtk::CudaImageFilter to make
> it more efficient on the GPU (like a new image for each vector component).
> Or it is handled in a different way?
>
>
>
> I think it will be more time consuming and error prone to do it by myself
> since I am not very familiar with GPU memory management.
>
>
>
> Gordian
>
>
>
> *Von:* Simon Rit [mailto:simon.rit at creatis.insa-lyon.fr]
> *Gesendet:* Mittwoch, 20. Februar 2019 16:27
> *An:* Kabelitz, Gordian
> *Cc:* rtk-users at public.kitware.com
> *Betreff:* Re: [Rtk-users] rtk::CudaVectorImage available
>
>
>
> Hi Gordian,
>
> I don't think so. We have successfully used images of vectors (e.g.,
> itk::CudaImage<itk::Vector<float,3>,2>) but I have never used VectorImage
> and I think you would need to rewrite an itk::CudaVectorImage to do so. I'm
> not sure how difficult that would be...
>
> Simon
>
>
>
> On Wed, Feb 20, 2019 at 4:13 PM Kabelitz, Gordian <
> Gordian.Kabelitz at medma.uni-heidelberg.de> wrote:
>
> Hello,
>
>
>
> I am looking for a ITKCudaCommon datatype that resembles the
> itk::VectorImage.
>
>
>
> Is there a possibility to use itk::CudaImage somehow or other workarounds?
>
>
>
> Thanks in advance,
>
> Gordian
>
> _______________________________________________
> 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/20190221/906d3f2d/attachment-0001.html>
More information about the Rtk-users
mailing list