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

Dan Mueller dan.muel at gmail.com
Thu Sep 6 16:08:14 EDT 2007


Hi Subbu,

In a previous email I highlighted the "itk.Examples.Images.ReadDicom1"
project located in the Examples folder in the ManagedITK source. Have
you looked at this example? I think it is what you are after. The
managed method itk.itkImage.ReadDicomDirectory(string directory,
string seriesid) reads an image from a DICOM directory using GDCM.

If it is not exactly what you are after, the C++/CLI source code in
"Source\Common\itkManagedImage_TYPE.cxx.in" can be altered to suit
your specific needs. You will have to reconfigure and recompile the
ManagedITK.Common.dll assembly after making any changes.

HTH

Cheers, Dan

On 06/09/07, Mathieu Malaterre <mathieu.malaterre at gmail.com> wrote:
> Hi Subbu,
>
>   There must be something I misunderstand here. This is *exactly* what
> is describe in the ITK Software Guide:
>
> 7.12.3 Reading a 2D DICOM Series and Writing a Volume
>
>   Available as code at:
>
> Examples/IO/DicomSeriesReadImageWrite2.cxx.
>
> -Mathieu
>
> On 9/6/07, Subbu <subbu.iitb at gmail.com> wrote:
> >
> > 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
> > >
> >
> >
> >
> >
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
> >
> >
>
>
> --
> Mathieu


More information about the Insight-users mailing list