Hi,<br> With your code, you should make sure the two images have the same requestedregion. <br>Or change your code to<br><br> while( !probIt.IsAtEnd() && !lobeIt.IsAtEnd() )<br>{<br>
while( !probIt.IsAtEndOfSlice() && !lobeIt.IsAtEndOfSlice() )<br>
{<br>
while( !probIt.IsAtEndOfLine() && !lobeIt.IsAtEndOfLine() )<br>...<br><br><div class="gmail_quote">On Mon, Jan 12, 2009 at 1:16 AM, Oliver Trebbe <span dir="ltr"><<a href="mailto:otrebbe@uni-muenster.de">otrebbe@uni-muenster.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi guys,<br>
<br>
ive got a problem: my Iterators dont want to Iterate right:<br>
<br>
Code snippet:<br>
<br>
void probchecker::probcheck( )<br>
{<br>
NCSIteratorType probIt( m_ProbImage, m_ProbImage->GetRequestedRegion() );<br>
NCSIteratorType lobeIt( m_LobeImage, m_LobeImage->GetRequestedRegion() );<br>
<br>
<br>
probIt.SetFirstDirection( 1 );<br>
probIt.SetSecondDirection( 2 );<br>
lobeIt.SetFirstDirection( 1 );<br>
lobeIt.SetSecondDirection( 2 );<br>
<br>
probIt.GoToBegin();<br>
lobeIt.GoToBegin();<br>
<br>
ImageType3D::IndexType probItIndex;<br>
<br>
while( !probIt.IsAtEnd() || !lobeIt.IsAtEnd() )<br>
{<br>
while( !probIt.IsAtEndOfSlice() || !lobeIt.IsAtEndOfSlice() )<br>
{<br>
while( !probIt.IsAtEndOfLine() || !lobeIt.IsAtEndOfLine() )<br>
{<br>
... and so on...<br>
if i just test the lobeIt.IsAtEnd() in the first while loop it breaks and everything is over...<br>
so it has something to do with the lobeIt but i cant find ane failure...<br>
bug maybe?<br>
<br>
would be pleased about any help<br>
<br>
<br>
Regards<br>
<br>
Oliver<br>
<br>
-- <br>
Oliver Trebbe<br>
Department of Neurology<br>
University of Muenster<br>
48129 Muenster, Germany<br>
<br>
<br>
_______________________________________________<br>
Insight-users mailing list<br>
<a href="mailto:Insight-users@itk.org" target="_blank">Insight-users@itk.org</a><br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</blockquote></div><br>