[Insight-users] Segmentation Fault when using Iterators
Oliver Trebbe
otrebbe at uni-muenster.de
Sun Jan 11 09:16:50 EST 2009
Hi guys,
ive got a problem: my Iterators dont want to Iterate right:
Code snippet:
void probchecker::probcheck( )
{
NCSIteratorType probIt( m_ProbImage, m_ProbImage->GetRequestedRegion() );
NCSIteratorType lobeIt( m_LobeImage, m_LobeImage->GetRequestedRegion() );
probIt.SetFirstDirection( 1 );
probIt.SetSecondDirection( 2 );
lobeIt.SetFirstDirection( 1 );
lobeIt.SetSecondDirection( 2 );
probIt.GoToBegin();
lobeIt.GoToBegin();
ImageType3D::IndexType probItIndex;
while( !probIt.IsAtEnd() || !lobeIt.IsAtEnd() )
{
while( !probIt.IsAtEndOfSlice() || !lobeIt.IsAtEndOfSlice() )
{
while( !probIt.IsAtEndOfLine() || !lobeIt.IsAtEndOfLine() )
{
... and so on...
if i just test the lobeIt.IsAtEnd() in the first while loop it breaks
and everything is over...
so it has something to do with the lobeIt but i cant find ane failure...
bug maybe?
would be pleased about any help
Regards
Oliver
--
Oliver Trebbe
Department of Neurology
University of Muenster
48129 Muenster, Germany
More information about the Insight-users
mailing list