[Insight-users] Segmentation Fault with ImageIterator

David Doria daviddoria at gmail.com
Tue Jul 24 20:36:45 EDT 2012


On Tue, Jul 24, 2012 at 6:32 PM, Katharina Losch <k-losch at web.de> wrote:
>
> Dear insight-users,
> 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.
> 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'.
> 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?
> Thanks in advance.
> Sincerely,
> Katharina
>

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.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120724/d62a9e00/attachment.htm>


More information about the Insight-users mailing list