<div dir="ltr">Brad,<div><br></div><div>Thank you for the response!  I&#39;m pretty sure that global functions aren&#39;t allowed in C# so it would have to be shoved into some class somewhere, with the natural one being ImageSeriesReader.  </div>

<div><br></div><div>I did search through the assembly for any &quot;GDCM&quot; substring in the object browser; no luck.  For now I&#39;ve wrapped the function on my own and it works fine.  However I&#39;d be interested if anyone has a more elegant solution moving forward.<br>

</div><div><br></div><div>Thanks again!</div><div>Jason</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 6, 2013 at 12:16 PM, Bradley Lowekamp <span dir="ltr">&lt;<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">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" target="_blank">http://www.itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1ImageSeriesReader.html#a26da9041bf5efd3db05524258de15dc2</a></div>

<div><br><div><div><div class="h5"><div>On Sep 5, 2013, at 6:11 PM, Jason Gibbs &lt;<a href="mailto:jdgibbs@gmail.com" target="_blank">jdgibbs@gmail.com</a>&gt; wrote:</div><br></div></div><blockquote type="cite"><div><div class="h5">

<div dir="ltr">Hello,<br><br>I am writing a pure C# based application and first started out using the SimpleITKCSharpManaged assembly. I&#39;m attempting to load a DICOM image from a folder.  It is known the folder contains only one series.  However, I&#39;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,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:18px;white-space:pre-wrap">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&#39;m missing or a different route to achieve the same end result of loading the image in C#?  I&#39;m assuming that others have loaded CT volumes in the C# wrapper before so I&#39;m guessing it&#39;s something I&#39;m doing incorrectly.  Thank you for any help!</span></div>



<div><span style="color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:18px;white-space:pre-wrap"><br></span></div><div><span style="color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:18px;white-space:pre-wrap">Jason Gibbs</span></div>



<div><span style="color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:18px;white-space:pre-wrap"><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-wrap">#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,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:18px;white-space:pre-wrap">
</span></div><div><span style="color:rgb(51,51,51);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;font-size:12px;line-height:18px;white-space:pre-wrap"><br></span></div></div></div></div>
_____________________________________<br>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>

<br>Kitware offers ITK Training Courses, for more information visit:<br><a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br><br>Please keep messages on-topic and check the ITK FAQ at:<br>

<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>

</blockquote></div><br></div></div></blockquote></div><br></div>