[Insight-users] DICOM Image series reading - using .NET

Subbu subbu.iitb at gmail.com
Wed Sep 5 22:46:46 EDT 2007


Dear Dan,

Thx for the reply. My Qn was ' instead of giving all image names, if i give
only the folder name, the program must read all images in the folder and
segregate the images as per series id. This facility available in ITK.

if this option currently not available in ManagedITK. just guide me to write
code.

Thanks . Subbu

On 9/5/07, Dan Mueller <dan.muel at gmail.com> wrote:
>
> Hi Subbu,
>
> I'm not quite sure I understand your question... Do you mean: how do I
> read a 3-D image from a series of 2-D images using ManagedITK?
>
> If you mean the above then use the following C# code (make sure you
> add ManagedITK.Common.dll and ManagedITK.IO.dll as references to your
> project):
>
>     // Read series
>     String[] filenames = new String[]{"file1.png","file2.png","file3.png
> "};
>     itk.itkImageSeriesReader_IUC3 reader =
> itk.itkImageSeriesReader_IUC3.New();
>     reader.SetFileNames(filenames);
>     reader.Update();
>
>     // Get resultant image
>     itk.itkImage_UC3 image = itk.itkImage_UC3.New();
>     reader.GetOutput(image);
>
>     // Write image
>     itk.itkImageFileWriter_IUC3 writer = itk.itkImageFileWriter_IUC3.New
> ();
>     writer.SetInput(image);
>     writer.FileName = "output.mhd";
>     writer.Update();
>
> If you mean something else, can you please clarify?
>
> Cheers, Dan
>
> On 05/09/07, Subbu <subbu.iitb at gmail.com> wrote:
> >
> > Hi,
> >
> > does anyone know how to read a series of images using managed ITK for
> > creating 3D model of it.
> >
> >
> > Regards . Subbu
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070906/9eda1f63/attachment.htm


More information about the Insight-users mailing list