------------------------------------------------------------------------------
| 292 | |
| 293 | //------------------------------------------------------------------------------ |
| 294 | void vtkImagePointDataIterator::NextSpan() |
| 295 | { |
| 296 | if (this->SpanEnd == this->RowEnd) |
| 297 | { |
| 298 | int spanIncr = 1; |
| 299 | |
| 300 | if (this->SpanEnd != this->SliceEnd) |
| 301 | { |
| 302 | // Move to the next row |
| 303 | this->Id = this->RowEnd + this->RowEndIncrement; |
| 304 | this->RowEnd += this->RowIncrement; |
| 305 | this->SpanEnd = this->RowEnd; |
| 306 | this->Index[1]++; |
| 307 | } |
| 308 | else if (this->SpanEnd != this->End) |
| 309 | { |
| 310 | // Move to the next slice |
| 311 | this->Id = this->SliceEnd + this->SliceEndIncrement; |
| 312 | this->SliceEnd += this->SliceIncrement; |
| 313 | this->RowEnd = this->Id + (this->RowIncrement - this->RowEndIncrement); |
| 314 | this->SpanEnd = this->RowEnd; |
| 315 | this->Index[1] = this->StartY; |
| 316 | this->Index[2]++; |
| 317 | spanIncr += this->SpanSliceEndIncrement; |
| 318 | } |
| 319 | else |
| 320 | { |
| 321 | // reached End |
| 322 | this->Id = this->End; |
| 323 | return; |
| 324 | } |
| 325 | |
| 326 | // Start of next row |
| 327 | this->Index[0] = this->Extent[0]; |
| 328 | |
| 329 | if (this->HasStencil) |
| 330 | { |
| 331 | if ((this->Index[1] >= this->Extent[2]) && (this->Index[1] <= this->Extent[3]) && |
| 332 | (this->Index[2] >= this->Extent[4]) && (this->Index[2] <= this->Extent[5])) |
| 333 | { |
| 334 | this->SpanCountPointer += spanIncr; |
| 335 | this->SpanListPointer += spanIncr; |
| 336 | this->SetSpanState(this->Extent[0]); |
| 337 | } |
| 338 | else |
| 339 | { |
| 340 | this->InStencil = false; |
| 341 | } |
| 342 | } |
| 343 | |
| 344 | if (this->Algorithm) |
| 345 | { |
| 346 | this->ReportProgress(); |
| 347 | } |
| 348 | } |
| 349 | else |
| 350 | { |
| 351 | // Move to the next span in the current row |