------------------------------------------------------------------------------
| 257 | |
| 258 | //------------------------------------------------------------------------------ |
| 259 | void vtkImagePointDataIterator::SetSpanState(int idX) |
| 260 | { |
| 261 | // Find the span that includes idX |
| 262 | bool inStencil = false; |
| 263 | int* spans = *this->SpanListPointer; |
| 264 | int n = *this->SpanCountPointer; |
| 265 | int i; |
| 266 | for (i = 0; i < n; i++) |
| 267 | { |
| 268 | if (spans[i] > idX) |
| 269 | { |
| 270 | break; |
| 271 | } |
| 272 | inStencil = !inStencil; |
| 273 | } |
| 274 | |
| 275 | // Set the primary span state variables |
| 276 | this->SpanIndex = i; |
| 277 | this->InStencil = inStencil; |
| 278 | |
| 279 | // Clamp the span end to MaxX+1 |
| 280 | int endIdX = this->Extent[1] + 1; |
| 281 | if (i < n && spans[i] <= this->Extent[1]) |
| 282 | { |
| 283 | endIdX = spans[i]; |
| 284 | } |
| 285 | |
| 286 | // Compute the pointers for idX and endIdX |
| 287 | vtkIdType rowStart = this->RowEnd - (this->RowIncrement - this->RowEndIncrement); |
| 288 | |
| 289 | this->Id = rowStart + (idX - this->Extent[0]); |
| 290 | this->SpanEnd = rowStart + (endIdX - this->Extent[0]); |
| 291 | } |
| 292 | |
| 293 | //------------------------------------------------------------------------------ |
| 294 | void vtkImagePointDataIterator::NextSpan() |
no outgoing calls
no test coverage detected