an qin
2017-05-05 16:22:55 UTC
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
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