[ITK-users] simple ITK C# show image

an qin anqin888 at gmail.com
Fri May 5 12:22:55 EDT 2017


Hi, I am new to C# simpleITK and can't find much sample codes. I tried to
read dicom image and display them in simpleITK. The dicom image was read
without a problem. But got an exception when show.

Any suggestion will be appreciated.

Thanks.
Andy


//-------------code------------
using itk.simple;

namespace TestReadDicom
{
    class Program
    {
        static void Main(string[] args)
        {
            var myreader = new ImageSeriesReader();
            var names =
ImageSeriesReader.GetGDCMSeriesFileNames(@"E:\ImageSet_0.DICOM");
            myreader.SetFileNames(names);
            var image = myreader.Execute();
            VectorDouble imDim = image.GetOrigin();
            Console.WriteLine(imDim[0].ToString());
            SimpleITK.Show(image);
        }
    }
}

//-------------output------------
Additional information: Exception thrown in SimpleITK Show:
..\..\..\..\..\SimpleITK\Code\IO\src\sitkShow.cxx:500:

sitk::ERROR: Error in administrating child process: [The parameter is
incorrect
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20170505/b47ded84/attachment.html>


More information about the Insight-users mailing list