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

Magnotta, Vincent A vincent-magnotta at uiowa.edu
Sun Apr 17 12:33:46 EDT 2016


This is probably the example that you are looking for.

http://www.itk.org/SimpleITKDoxygen/html/BufferImportExport_8cxx-example.html

Vince

--
Associate Professor
Department of Radiology
L311 PBDB
169 Newton Road
Iowa City, IA 52242
E-mail: vincent-magnotta at uiowa.edu
Phone: 319-335-5482 Fax: 319-353-6275
Website: http://www.healthcare.uiowa.edu/Radiology

From: Insight-users <insight-users-bounces at itk.org<mailto:insight-users-bounces at itk.org>> on behalf of Piotr Piasecki <piotpia124 at student.polsl.pl<mailto:piotpia124 at student.polsl.pl>>
Date: Sunday, April 17, 2016 at 11:18 AM
To: Bradley Lowekamp <brad at lowekamp.net<mailto:brad at lowekamp.net>>
Cc: "insight-users at itk.org<mailto:insight-users at itk.org>" <insight-users at itk.org<mailto:insight-users at itk.org>>
Subject: Re: [ITK-users] itk::simple::Image from stream

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.

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.

Regards.

2016-04-17 16:29 GMT+02:00 Bradley Lowekamp <brad at lowekamp.net<mailto:brad at lowekamp.net>>:
I think this example is what you are looking for:

http://www.itk.org/SimpleITKDoxygen/html/ImageGetBuffer_8cs-example.html

> On Apr 17, 2016, at 9:11 AM, Piotr Piasecki <piotpia124 at student.polsl.pl<mailto:piotpia124 at student.polsl.pl>> wrote:
>
> Dear Sir or Madam.
>
> 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?
>
> I will be very grateful for any answer.
>
> Best regards.
>
> Peter.
> _____________________________________
> Powered by www.kitware.com<http://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



________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20160417/2c38b9f2/attachment.html>


More information about the Insight-users mailing list