<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>