Hello,<div><br></div><div>I&#39;m running the example DicomSeriesReadImageWrite2.cxx and it compiles and works just fine, except for when there are no dicom images in the folder I supply. The program crashes and I get an &quot;Output Window&quot; with the text : </div>

<div><br></div><div>&quot;Warning: In ..\..\..\InsightToolkit 3.12.0\Code\IO\itkGDCMSeriesFileNames.&quot;</div><div>&quot;GDCMSeriesFileNames (018947A8): No Series were found&quot;</div><div><br></div><div>but also an error from Microsoft Visual C++ Debug Library:</div>

<div><br></div><div>&quot;Debug assertion failed!</div><div>Program: DicomSeriesReadImageWrite2.exe</div><div>File: C:\Program\MSVS 9.0\VC\include\vector</div><div>Line: 98</div><div>Expression: vector iterator not dereferencable&quot;</div>

<div><br></div><div>If I compile in Release mode and give the wrong path I get the usual error when a windows program hangs:</div><div><br></div><div>&quot;DicomSeriesReadImageWrite2.exe has encountered a problem and must close&quot;</div>

<div><br></div><div>How do I avoid this? I&#39;m thinking this is a bug in ITK or Visual Studio? Any solutions?</div><div><br></div><div>Thanks in advance</div><div><br></div><div>//Patrik</div>