[ITK] Data buffer length

Francois Budin francois.budin at kitware.com
Wed Oct 26 12:00:32 EDT 2016


Hello Fijoy,

I don't think there is a way to do that without computing the product of
the image size by the pixel size. Here is an example where it is done:
https://itk.org/pipermail/insight-users/2007-May/022351.html

Francois

On Wed, Oct 26, 2016 at 11:36 AM, Fijoy Vadakkumpadan <tofijoy at gmail.com>
wrote:

> Hi all,
>
> What's the easiest way to get the length of the data buffer of an
> itk::Image in bytes?
>
> I see that GetBufferPointer() gives me a pointer to the buffer, but I also
> need the length of the buffer in bytes. I can calculate this as a product
> of image size components and pixel size in bytes, but I'm wondering if that
> is the easiest way.
>
> Thanks,
> Fijoy
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20161026/16bff368/attachment.html>


More information about the Community mailing list