MCPcopy Create free account
hub / github.com/Kitware/VTK / NextSpan

Method NextSpan

Imaging/Core/vtkImagePointDataIterator.cxx:294–380  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

292
293//------------------------------------------------------------------------------
294void 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

Callers 15

operator()Method · 0.80
AddWordToFinalFunction · 0.80
vtkImageToPointsCountFunction · 0.80
operator()Method · 0.80
vtkImageNormalizeExecuteFunction · 0.80
ExecuteInputMethod · 0.80
PruneAllButLargestMethod · 0.80
PruneSmallestRegionMethod · 0.80
PruneBySizeMethod · 0.80

Calls 3

SetSpanStateMethod · 0.95
ReportProgressMethod · 0.95
minFunction · 0.50

Tested by 1

CheckStencilExtentsFunction · 0.64