[ITK] [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/community/attachments/20170505/b47ded84/attachment.html>
-------------- next part --------------
_____________________________________
Powered by 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


More information about the Community mailing list