<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">El 25.07.2012 02:36, David Doria
escribió:<br>
</div>
<blockquote
cite="mid:CABDpjT=9=YCHCcVyzebeJ5y+M+Yfe8NNO+zFJa8Ps9dgR-S8FA@mail.gmail.com"
type="cite">
<div class="gmail_quote">On Tue, Jul 24, 2012 at 6:32 PM,
Katharina Losch <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:k-losch@web.de" target="_blank">k-losch@web.de</a>></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>I am experiencing cases of 'Segmentation Fault' while
running my program, and so far I haven'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'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>However, almost all the times I have been running the
program, the ImageIterator stops after a certain number of
iterations with a 'Segmentation Fault' (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't. So far I
haven't been able to find a correlation of imagesize or
encoding to 'Segmentation Fault'. </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>Thanks in advance. </div>
<div>Sincerely,</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>
</blockquote>
Hi, <br>
<br>
thanks for your answer. I tried out some very simple 2D-images and
also slices of the actual images I'm using. Although the debugger
still warns about a segmentation fault with said slices, right after
the ImageRegionIterator is finished, it doesn't do so with the
simple images. In all the 2D cases the program 'worked well' in the
sense that I got sensible output images even in the cases of
segmentation fault. What do you think should I do next to find the
source of the problem?<br>
<br>
Thanks a lot,<br>
Katharina<br>
<br>
<br>
</body>
</html>