<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello Jason,<div><br></div><div>You are correct that you need a method like ImageSeriesReader::GetGDCMSeriesFilenames()[1] which is a static member function in C++.</div><div><br></div><div>I am not certain, but I believe SWIG translate these static member methods to global functions with names such as ImageSeriesReader_GetGDCMSeriesFilenames. But hopefully you can search for that function name and find it in the assembly.</div><div><br></div><div>Please let up know if you figure it out,</div><div>Brad</div><div><br></div><div>[1] <a href="http://www.itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1ImageSeriesReader.html#a26da9041bf5efd3db05524258de15dc2">http://www.itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1ImageSeriesReader.html#a26da9041bf5efd3db05524258de15dc2</a></div><div><br><div><div>On Sep 5, 2013, at 6:11 PM, Jason Gibbs <<a href="mailto:jdgibbs@gmail.com">jdgibbs@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><div dir="ltr">Hello,<br><br>I am writing a pure C# based application and first started out using the SimpleITKCSharpManaged assembly. I'm attempting to load a DICOM image from a folder. It is known the folder contains only one series. However, I'm having trouble ordering the files correctly.<div>
<br></div><div>Doing this loads an image, but the slices are all out of order:</div><div><div> var FilesInFolder = Directory.EnumerateFiles(m_folder).ToList();</div><div> </div><div> itk.simple.ImageSeriesReader reader = new itk.simple.ImageSeriesReader();</div>
<div> itk.simple.VectorString vs = new itk.simple.VectorString();</div><div> </div><div> foreach (var file in FilesInFolder)</div><div> vs.Add(file);</div>
<div> reader.SetFileNames(vs);</div><div><br></div><div> m_ITKImg = reader.Execute();</div></div><div><br></div><div>I realize that I need something along the lines of <span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">GetGDCMSeriesFileNames to order the files correctly. It seems this is a public static member of itk.simple.ImageSeriesReader. However this does not seem to appear in the assembly metadata (below). Is there something I'm missing or a different route to achieve the same end result of loading the image in C#? I'm assuming that others have loaded CT volumes in the C# wrapper before so I'm guessing it's something I'm doing incorrectly. Thank you for any help!</span></div>
<div><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre"><br></span></div><div><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">Jason Gibbs</span></div>
<div><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre"><br></span></div><div><br></div><div><font color="#333333" face="Consolas, Liberation Mono, Courier, monospace"><span style="font-size:12px;line-height:18px;white-space:pre">#region Assembly SimpleITKCSharpManaged.dll, v2.0.50727
// C:\Users\jgibbs\Documents\Visual Studio 2010\Projects\DisplayDICOM\DisplayDICOM\SimpleITKCSharpManaged.dll
#endregion
using System;
namespace itk.simple
{
public class ImageSeriesReader : IDisposable
{
protected bool swigCMemOwn;
public ImageSeriesReader();
public virtual void Dispose();
public Image Execute();
public VectorString GetFileNames();
public ImageSeriesReader SetFileNames(VectorString fns);
}
}</span></font><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">
</span></div><div><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre"><br></span></div></div>
_____________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://www.kitware.com/products/protraining.php<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.itk.org/mailman/listinfo/insight-users<br></blockquote></div><br></div></body></html>