<div dir="ltr"><div>Thank you for your answer. Unfortunately, it seems to me that's not what I meant. This example shows how to get buffer from itk.simple.Image and have access to pixel values. To create an object SimpleITK.ReadImage method is used.<br><br>In my problem, I receive DICOM file from REST Api and I got it as a System.IO.Stream in my code. I need to create itk.simple.Image from that stream, because I do not want to save the file on local disk, and then load it again using ImageFileReader or SimpleITK.ReadImage.<br><br></div>Regards.<br><div><div class="gmail_extra"><br><div class="gmail_quote">2016-04-17 16:29 GMT+02:00 Bradley Lowekamp <span dir="ltr"><<a href="mailto:brad@lowekamp.net" target="_blank">brad@lowekamp.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think this example is what you are looking for:<br>
<br>
<a href="http://www.itk.org/SimpleITKDoxygen/html/ImageGetBuffer_8cs-example.html" rel="noreferrer" target="_blank">http://www.itk.org/SimpleITKDoxygen/html/ImageGetBuffer_8cs-example.html</a><br>
<div class="HOEnZb"><div class="h5"><br>
> On Apr 17, 2016, at 9:11 AM, Piotr Piasecki <<a href="mailto:piotpia124@student.polsl.pl">piotpia124@student.polsl.pl</a>> wrote:<br>
><br>
> Dear Sir or Madam.<br>
><br>
> I am a student in Biomedical Engineering at the Silesian University of Technology. During my studies I worked with ITK and SimpleITK in C#. I wanted to use them in my current project, but I have an important question. Is there a possibility to create object of itk::simple::Image class from stream or byte array, not by using ImageFileReader? If there is no such possibility in SimpleITK in C#, is it possible in native ITK?<br>
><br>
> I will be very grateful for any answer.<br>
><br>
> Best regards.<br>
><br>
> Peter.<br>
> _____________________________________<br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
</div></div></blockquote></div><br></div></div></div>