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

Method ThreadedRequestData

Imaging/General/vtkImageSobel3D.cxx:201–238  ·  view source on GitHub ↗

------------------------------------------------------------------------------ This method contains a switch statement that calls the correct templated function for the input Data type. The output Data must be of type double. This method does handle boundary conditions. The third axis is the component axis for the output.

Source from the content-addressed store, hash-verified

199// must be of type double. This method does handle boundary conditions.
200// The third axis is the component axis for the output.
201void vtkImageSobel3D::ThreadedRequestData(vtkInformation* vtkNotUsed(request),
202 vtkInformationVector** inputVector, vtkInformationVector* vtkNotUsed(outputVector),
203 vtkImageData*** inData, vtkImageData** outData, int outExt[6], int id)
204{
205 void *inPtr, *outPtr;
206 int inExt[6], wholeExt[6];
207
208 vtkInformation* inInfo = inputVector[0]->GetInformationObject(0);
209 inInfo->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), wholeExt);
210 this->InternalRequestUpdateExtent(inExt, outExt, wholeExt);
211
212 inPtr = inData[0][0]->GetScalarPointerForExtent(inExt);
213 outPtr = outData[0]->GetScalarPointerForExtent(outExt);
214
215 // this filter cannot handle multi component input.
216 if (inData[0][0]->GetNumberOfScalarComponents() != 1)
217 {
218 vtkWarningMacro("Expecting input with only one component.\n");
219 }
220
221 // this filter expects that output is type double.
222 if (outData[0]->GetScalarType() != VTK_DOUBLE)
223 {
224 vtkErrorMacro(<< "Execute: output ScalarType, "
225 << vtkImageScalarTypeNameMacro(outData[0]->GetScalarType())
226 << ", must be double");
227 return;
228 }
229
230 switch (inData[0][0]->GetScalarType())
231 {
232 vtkTemplateMacro(vtkImageSobel3DExecute(this, inData[0][0], static_cast<VTK_TT*>(inPtr),
233 outData[0], outExt, static_cast<double*>(outPtr), id, inInfo));
234 default:
235 vtkErrorMacro(<< "Execute: Unknown ScalarType");
236 return;
237 }
238}
239VTK_ABI_NAMESPACE_END

Callers

nothing calls this directly

Calls 8

vtkImageSobel3DExecuteFunction · 0.85
GetInformationObjectMethod · 0.80
GetMethod · 0.45
GetScalarTypeMethod · 0.45

Tested by

no test coverage detected