------------------------------------------------------------------------------
| 410 | |
| 411 | //------------------------------------------------------------------------------ |
| 412 | void vtkImageSlab::ThreadedRequestData(vtkInformation*, vtkInformationVector** inVector, |
| 413 | vtkInformationVector*, vtkImageData*** inData, vtkImageData** outData, int outExt[6], int id) |
| 414 | { |
| 415 | void* inPtr; |
| 416 | void* outPtr; |
| 417 | int inExt[6]; |
| 418 | int extent[6]; |
| 419 | int dimIndex; |
| 420 | int range[2]; |
| 421 | |
| 422 | vtkDebugMacro("Execute: inData = " << inData << ", outData = " << outData); |
| 423 | |
| 424 | // get the direction along which to sum slices |
| 425 | dimIndex = this->GetOrientation(); |
| 426 | |
| 427 | // clamp the range to the whole extent |
| 428 | vtkInformation* inInfo = inVector[0]->GetInformationObject(0); |
| 429 | inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), extent); |
| 430 | this->GetSliceRange(range); |
| 431 | range[0] = std::max(range[0], extent[2 * dimIndex]); |
| 432 | range[1] = std::min(range[1], extent[2 * dimIndex + 1]); |
| 433 | |
| 434 | // initialize input extent to output extent |
| 435 | inExt[0] = outExt[0]; |
| 436 | inExt[1] = outExt[1]; |
| 437 | inExt[2] = outExt[2]; |
| 438 | inExt[3] = outExt[3]; |
| 439 | inExt[4] = outExt[4]; |
| 440 | inExt[5] = outExt[5]; |
| 441 | |
| 442 | // the adjust for the slice range |
| 443 | inExt[2 * dimIndex] += range[0]; |
| 444 | inExt[2 * dimIndex + 1] += range[1]; |
| 445 | |
| 446 | // now get the pointers for the extents |
| 447 | inPtr = inData[0][0]->GetScalarPointerForExtent(inExt); |
| 448 | outPtr = outData[0]->GetScalarPointerForExtent(outExt); |
| 449 | |
| 450 | // get the scalar type |
| 451 | int outScalarType = outData[0]->GetScalarType(); |
| 452 | int inScalarType = inData[0][0]->GetScalarType(); |
| 453 | |
| 454 | // and call the execute method |
| 455 | if (outScalarType == inScalarType) |
| 456 | { |
| 457 | switch (inScalarType) |
| 458 | { |
| 459 | vtkTemplateAliasMacro(vtkImageSlabExecute(this, inData[0][0], static_cast<VTK_TT*>(inPtr), |
| 460 | outData[0], static_cast<VTK_TT*>(outPtr), outExt, id)); |
| 461 | default: |
| 462 | vtkErrorMacro("Execute: Unknown ScalarType"); |
| 463 | return; |
| 464 | } |
| 465 | } |
| 466 | else if (outScalarType == VTK_FLOAT) |
| 467 | { |
| 468 | switch (inScalarType) |
| 469 | { |
nothing calls this directly
no test coverage detected