<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="NL-BE" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif";background:white;mso-highlight:white">Dear all,<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif";background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif";background:white;mso-highlight:white">In an attempt to start using ITK to process STL files, I wrote a small test program, based
 on the “</span><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif"">STL file format MeshIO class for ITK” (http://hdl.handle.net/10380/3452) . The source code below causes an error at the line<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif"">reader->Update();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif"">near the end of the source code. The error is as follows:<o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm">
<p class="MsoNormal" style="text-autospace:none;border:none;padding:0cm"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
</div>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif"">Debug Assertion Failed!<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif"">Program C:\Windows\system32\MSVCP120D.dll<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif"">File C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xtree<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif"">Line 237<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif"">Expression: map/set iterator not dereferencable<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif"">For information on how your program can cause and assertion failure, see the Visual C++ documentation on assets.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif"">(Press Retry to debug the application)<o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm">
<p class="MsoNormal" style="text-autospace:none;border:none;padding:0cm"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
</div>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif"">Has anyone else experienced/solved this issue? I have been trying to fix it for several hours, but cannot seem to find a solution.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif"">Kind regards,<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:12.0pt;font-family:"Times New Roman","serif"">Yurrit<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">#include</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white">"itkQuadEdgeMesh.h"</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">#include</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white">"itkSTLMeshIOFactory.h"</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">#include</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white">"itkSTLMeshIO.h"</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">#include</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white">"itkMeshFileReader.h"</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">#include</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white">"itkMeshFileWriter.h"</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">int</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
 main(</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">int</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white">argc</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">,
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">char</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> *</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:gray;background:white;mso-highlight:white">argv</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">[])<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">{<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">      
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">const</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">unsigned</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">int</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> Dimension = 3;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">      
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">typedef</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">double</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">EdgeType</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">      
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">typedef</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> itk::</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">QuadEdgeMesh</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">EdgeType</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">,
 Dimension> </span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">QEMeshType</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">      
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">typedef</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> itk::</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">STLMeshIOFactory</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">STLMeshIO</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">      
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">typedef</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> itk::</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">MeshFileReader</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">QEMeshType</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">>
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">ReaderType</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">      
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">STLMeshIO</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">::RegisterOneFactory();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">      
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">ReaderType</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">::</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">Pointer</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
 reader = </span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#2B91AF;background:white;mso-highlight:white">ReaderType</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">::New();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">      
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">const</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">char</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> * inputFileName
 = </span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white">"inputfile.stl"</span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">       reader->SetFileName(inputFileName);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">       reader->Update();<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">      
</span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">return</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> 0;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">}</span><o:p></o:p></p>
</div>
</body>
</html>