------------------------------------------------------------------------------ This method contains the first switch statement that calls the correct templated function for the input and output Data types. It handles image boundaries, so the image does not shrink.
| 261 | // templated function for the input and output Data types. |
| 262 | // It handles image boundaries, so the image does not shrink. |
| 263 | void vtkImageRange3D::ThreadedRequestData(vtkInformation* vtkNotUsed(request), |
| 264 | vtkInformationVector** inputVector, vtkInformationVector* vtkNotUsed(outputVector), |
| 265 | vtkImageData*** inData, vtkImageData** outData, int outExt[6], int id) |
| 266 | { |
| 267 | int inExt[6], wholeExt[6]; |
| 268 | vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); |
| 269 | inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), wholeExt); |
| 270 | this->InternalRequestUpdateExtent(inExt, outExt, wholeExt); |
| 271 | void* inPtr = inData[0][0]->GetScalarPointerForExtent(inExt); |
| 272 | void* outPtr = outData[0]->GetScalarPointerForExtent(outExt); |
| 273 | vtkImageData* mask; |
| 274 | |
| 275 | // Error checking on mask |
| 276 | mask = this->Ellipse->GetOutput(); |
| 277 | if (mask->GetScalarType() != VTK_UNSIGNED_CHAR) |
| 278 | { |
| 279 | vtkErrorMacro(<< "Execute: mask has wrong scalar type"); |
| 280 | return; |
| 281 | } |
| 282 | |
| 283 | // this filter expects the output to be float |
| 284 | if (outData[0]->GetScalarType() != VTK_FLOAT) |
| 285 | { |
| 286 | vtkErrorMacro(<< "Execute: output ScalarType, " |
| 287 | << vtkImageScalarTypeNameMacro(outData[0]->GetScalarType()) << " must be float"); |
| 288 | return; |
| 289 | } |
| 290 | |
| 291 | switch (inData[0][0]->GetScalarType()) |
| 292 | { |
| 293 | vtkTemplateMacro(vtkImageRange3DExecute(this, mask, inData[0][0], static_cast<VTK_TT*>(inPtr), |
| 294 | outData[0], outExt, static_cast<float*>(outPtr), id, inInfo)); |
| 295 | default: |
| 296 | vtkErrorMacro(<< "Execute: Unknown ScalarType"); |
| 297 | return; |
| 298 | } |
| 299 | } |
| 300 | |
| 301 | //------------------------------------------------------------------------------ |
| 302 | int vtkImageRange3D::RequestData( |
nothing calls this directly
no test coverage detected