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

Method ExecuteDataWithInformation

IO/Image/vtkImageReader.cxx:368–401  ·  view source on GitHub ↗

------------------------------------------------------------------------------ This function reads a data from a file. The datas extent/axes are assumed to be the same as the file extent/order.

Source from the content-addressed store, hash-verified

366// This function reads a data from a file. The datas extent/axes
367// are assumed to be the same as the file extent/order.
368void vtkImageReader::ExecuteDataWithInformation(vtkDataObject* output, vtkInformation* outInfo)
369{
370 vtkImageData* data = this->AllocateOutputData(output, outInfo);
371
372 void* ptr = nullptr;
373
374 if (!this->FileName && !this->FilePattern)
375 {
376 vtkErrorMacro("Either a valid FileName or FilePattern must be specified.");
377 return;
378 }
379
380 if (!data->GetPointData()->GetScalars())
381 {
382 return;
383 }
384 data->GetPointData()->GetScalars()->SetName(this->ScalarArrayName);
385
386#ifndef NDEBUG
387 int* ext = data->GetExtent();
388#endif
389 vtkDebugMacro("Reading extent: " << ext[0] << ", " << ext[1] << ", " << ext[2] << ", " << ext[3]
390 << ", " << ext[4] << ", " << ext[5]);
391
392 this->ComputeDataIncrements();
393
394 // Call the correct templated function for the output
395 switch (this->GetDataScalarType())
396 {
397 vtkTemplateMacro(vtkImageReaderUpdate1(this, data, (VTK_TT*)(ptr)));
398 default:
399 vtkErrorMacro(<< "UpdateFromFile: Unknown data type");
400 }
401}
402
403void vtkImageReader::ComputeTransformedSpacing(double Spacing[3])
404{

Callers

nothing calls this directly

Calls 8

vtkImageReaderUpdate1Function · 0.85
GetDataScalarTypeMethod · 0.80
AllocateOutputDataMethod · 0.45
GetScalarsMethod · 0.45
GetPointDataMethod · 0.45
SetNameMethod · 0.45
GetExtentMethod · 0.45
ComputeDataIncrementsMethod · 0.45

Tested by

no test coverage detected