<div dir="ltr"><div><div>Hello Mihail,<br><br>Thank you for the bug report. I found that there was a limitation in the current implementation due to the fact that it uses "unsigned short" variables. I will submit a patch and share it with you for your review. It should correct your problem. Is it ok to add your data you shared in this email to the ITK tests?<br><br></div>Thanks,<br></div>Francois<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 10, 2017 at 6:50 PM, Mihail Isakov via Insight-users <span dir="ltr"><<a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
i wonder how i could avoid crash in itkBinaryMask3DMeshSource (actual<br>
version). In most cases the filter works excellent, but some files<br>
bring it to segmentation fault.<br>
<br>
r@deb:~/Desktop/test1/build$ ./test1 ../t.mha<br>
Segmentation fault<br>
<br>
Debug:<br>
<br>
Modules/Core/Mesh/include/<wbr>itkBinaryMask3DMeshSource.hxx<br>
<br>
2343     if ( currentframetmp[i][0] != 0 )<br>
2344       {<br>
2345       m_CurrentFrame[m_<wbr>CurrentFrameIndex][1] =<br>
currentframetmp[i][1]; <-------------<br>
2346       m_CurrentFrame[m_<wbr>CurrentFrameIndex++][0] = currentframetmp[i][0];<br>
<br>
the value of 'm_CurrentFrameIndex' in debugger is 65000, 'i' is 1<br>
<br>
Minimal project with test file is here<br>
<br>
<a href="https://drive.google.com/file/d/0ByBLJ2-U1t9xUm51d2Mtdzg1ZjQ/view?usp=sharing" rel="noreferrer" target="_blank">https://drive.google.com/file/<wbr>d/0ByBLJ2-<wbr>U1t9xUm51d2Mtdzg1ZjQ/view?usp=<wbr>sharing</a><br>
<br>
Thanks.<br>
Regards,<br>
Mihail<br>
______________________________<wbr>_______<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>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" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>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" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_<wbr>FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/insight-users</a><br>
</blockquote></div><br></div>