[Insight-users] Iterators: PROBLEM

Daniela Sacchetto danysunflower at hotmail.it
Fri Aug 6 13:05:18 EDT 2010


Hi everyone,
I'm trying to use iterators but I have a "Floating Point Exception" Error.

I modify a little my code to debug it and I discover that the error is in the following lines:

[...]

for (DskIt.GoToBegin(), DFltIt.GoToBegin(), DSubIt.GoToBegin();!DFltIt.IsAtEnd(); ++DskIt, ++DFltIt, ++DSubIt)
 { 
      if(DFltIt.Get() < DSubIt.Get())        
      {
          std::cerr << " Ok ;-)"<< std::endl;  // DskIt.Set(1);
      }
      else
      {
          std::cerr << "Not ok ;-("<< std::endl;  // DskIt.Set(0);
      }
 }

[...]

To debug my code I added the std::cerr(...) lines (my right lines are temporarily commented) and I have this output:

-----------------------------------------------------------------------------------------------------
daniela at daniela-laptop:~/Scrivania/Dist/bin$ ./Dist3 IN.dcm OUT.dcm
 Ok ;-)
Floating point exception
-----------------------------------------------------------------------------------------------------

It means that the loop runs corretly the first time, but after there is an error. I think that there is something about iterators' use because I'm a starter...

Thanks everyone who'll help me,

Daniela

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100806/6fc096e9/attachment.htm>


More information about the Insight-users mailing list