[Insight-users] Dicom header with managed ITK

Dan Mueller dan.muel at gmail.com
Sun Jul 6 14:37:49 EDT 2008


Hi Rehab,

The support for DICOM IO in ManagedITK is not as good as it could
be...if you want to help improve it, let me know!

I'm not exactly sure what you mean by "read the dicom header". Do you
mean read the tag values? If so, you may be interested to learn the
latest release of ManagedITK (3.6.0.2) contains wrappers for the major
IO objects, including GDCMImageIO. This object contains the
GetValueFromTag(String tag, String% value) method which may be what
you are searching for. I have included an example below using
(hard-coded) data from {ITK_DIR}\Testing\Data\Input\DicomSeries\

using System;
using itk;

namespace ManagedItkDicomTest
{
    class Program
    {
        static void Main(string[] args)
        {
            itkImage_SS3 input = itkImage_SS3.New();
            itkImageFileReader reader = itkImageFileReader.New(input);
            reader.FileName = "Image0075.dcm";
            reader.Update();
            itkGDCMImageIO imageIO = itkGDCMImageIO.New();
            reader.GetImageIO(imageIO);
            const String tag = "0008|0018"; // Series UID
            String value = String.Empty;
            bool doesTagExist = imageIO.GetValueFromTag(tag, out value);
        }
    }
}

Hope this helps.

Regards, Dan

2008/7/6 Rehab Mansour <rehab_a_eg at yahoo.co.uk>:
> Hi all,
> is there a way i can read the dicom header with the managedITK(c#),plz if
> any body knows how let me know
> Rehab
> ________________________________
> Not happy with your email address?
> Get the one you really want - millions of new email addresses available now
> at Yahoo!
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>


More information about the Insight-users mailing list