<div class="gmail_quote">On Tue, Jul 24, 2012 at 6:32 PM, Katharina Losch <span dir="ltr">&lt;<a href="mailto:k-losch@web.de" target="_blank">k-losch@web.de</a>&gt;</span> wrote: <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-family:Verdana;font-size:12.0px"><div>Dear insight-users, </div><div></div><div>I am experiencing cases of &#39;Segmentation Fault&#39; while running my program, and so far I haven&#39;t figured out what exactly goes wrong. First, I am loading two images, a 3D-tiff file and a 3D-vtk vector file (both of the same size), then I&#39;m using ImageIterator to displace each point of the tiff-file by the related vector. The vtk-file is designed in a way that none of these displacements should displace the point out of the image region, so in effect this should result in another image of the same size like the others.</div>
<div></div><div>However, almost all the times I have been running the program, the ImageIterator stops after a certain number of iterations with a &#39;Segmentation Fault&#39; (with each image it stops at a unique, but fixed index). Additionally, after several tries with different sizes of the image, and several tries with the same image, it seems to work sometimes on some images, but mostly it doesn&#39;t. So far I haven&#39;t been able to find a correlation of imagesize or encoding to &#39;Segmentation Fault&#39;. </div>
<div></div><div>Last but not least, neither debugging nor a memory check helpe to find the mistake, but while using the memory check the program worked perfectly on an image it never used to work before. Did anyone else also experience this problem and could you maybe explain it to me or how to find a solution? </div>
<div></div><div>Thanks in advance. </div><div></div><div>Sincerely,</div><div></div><div>Katharina</div></div></blockquote><div><br></div>If you could hard code some demo images and make the simplest possible compilable example that demonstrates the problem, that would really help here. Reduce everything to 2D, de-randomize the result by hard coding the displacements, etc.<br clear="all">
<br>David</div>