[ITK] [ITK-users] itk::simple::Image from stream

Dženan Zukić dzenanz at gmail.com
Thu Apr 21 09:34:14 EDT 2016


Hi Piotr,

what first comes to mind is modifying the dicomIO class's open() method (or
however it is called) and putting a memory buffer there for reading, e.g.
this
<http://stackoverflow.com/questions/2079912/simpler-way-to-create-a-c-memorystream-from-char-size-t-without-copying-t>.
If you don't want to write something to file, I don't see how you can avoid
something like this.

Regards,
Dženan

On Wed, Apr 20, 2016 at 5:51 PM, Piotr Piasecki <piotpia124 at student.polsl.pl
> wrote:

> Thank you very much for your answer. It is really useful example which
> allows to create object of itk.simple.Image class from byte array.
>
> Unfortunately, it does not solve my problem. This method works only when
> in byte array are only values of pixels. I tested it and, because I have
> full .dcm file in my byte array and I have no possibility to extract
> pixel-data from it, this ImportImage Filter does not work.
>
> I'm still looking how to receive just the pixel values, but maybe there is
> some way to force some filter, so that he will read an image from a stream
> or byte array, as if he loads it from location on disk?
>
> Regards,
>
> Peter.
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160421/b105ac63/attachment.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list