------------------------------------------------------------------------------ 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.
| 244 | // templated function for the input and output Data types. |
| 245 | // It handles image boundaries, so the image does not shrink. |
| 246 | void vtkImageContinuousDilate3D::ThreadedRequestData(vtkInformation* vtkNotUsed(request), |
| 247 | vtkInformationVector** inputVector, vtkInformationVector* vtkNotUsed(outputVector), |
| 248 | vtkImageData*** inData, vtkImageData** outData, int outExt[6], int id) |
| 249 | { |
| 250 | // return if nothing to do |
| 251 | if (outExt[1] < outExt[0] || outExt[3] < outExt[2] || outExt[5] < outExt[4]) |
| 252 | { |
| 253 | return; |
| 254 | } |
| 255 | |
| 256 | int inExt[6], wholeExt[6]; |
| 257 | vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); |
| 258 | inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), wholeExt); |
| 259 | this->InternalRequestUpdateExtent(inExt, outExt, wholeExt); |
| 260 | |
| 261 | vtkDataArray* inArray = this->GetInputArrayToProcess(0, inputVector); |
| 262 | vtkDataArray* outArray = outData[0]->GetPointData()->GetScalars(); |
| 263 | |
| 264 | // Error checking on mask |
| 265 | vtkImageData* mask = this->Ellipse->GetOutput(); |
| 266 | if (mask->GetScalarType() != VTK_UNSIGNED_CHAR) |
| 267 | { |
| 268 | vtkErrorMacro(<< "Execute: mask has wrong scalar type"); |
| 269 | return; |
| 270 | } |
| 271 | |
| 272 | // this filter expects the output type to be same as input |
| 273 | if (outData[0]->GetScalarType() != inArray->GetDataType()) |
| 274 | { |
| 275 | vtkErrorMacro(<< "Execute: output ScalarType, " |
| 276 | << vtkImageScalarTypeNameMacro(outData[0]->GetScalarType()) |
| 277 | << " must match input array data type"); |
| 278 | return; |
| 279 | } |
| 280 | |
| 281 | vtkImageContinuousDilate3DWorker worker; |
| 282 | if (!vtkArrayDispatch::Dispatch2SameValueType::Execute( |
| 283 | inArray, outArray, worker, this, mask, inData[0][0], outData[0], outExt, id)) |
| 284 | { |
| 285 | worker(inArray, outArray, this, mask, inData[0][0], outData[0], outExt, id); |
| 286 | } |
| 287 | } |
| 288 | |
| 289 | //------------------------------------------------------------------------------ |
| 290 | int vtkImageContinuousDilate3D::RequestData( |
nothing calls this directly
no test coverage detected