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

Method ExecuteDataWithInformation

IO/Image/vtkImageReader2.cxx:679–710  ·  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

677// This function reads a data from a file. The datas extent/axes
678// are assumed to be the same as the file extent/order.
679void vtkImageReader2::ExecuteDataWithInformation(vtkDataObject* output, vtkInformation* outInfo)
680{
681 vtkImageData* data = this->AllocateOutputData(output, outInfo);
682
683 void* ptr;
684
685 if (!this->FileName && !this->FilePattern)
686 {
687 vtkErrorMacro("Either a valid FileName or FilePattern must be specified.");
688 return;
689 }
690
691 data->GetPointData()->GetScalars()->SetName("ImageFile");
692
693#ifndef NDEBUG
694 int* ext = data->GetExtent();
695#endif
696
697 vtkDebugMacro("Reading extent: " << ext[0] << ", " << ext[1] << ", " << ext[2] << ", " << ext[3]
698 << ", " << ext[4] << ", " << ext[5]);
699
700 this->ComputeDataIncrements();
701
702 // Call the correct templated function for the output
703 ptr = data->GetScalarPointer();
704 switch (this->GetDataScalarType())
705 {
706 vtkTemplateMacro(vtkImageReader2Update(this, data, (VTK_TT*)(ptr)));
707 default:
708 vtkErrorMacro(<< "UpdateFromFile: Unknown data type");
709 }
710}
711
712//------------------------------------------------------------------------------
713// VTK_DEPRECATED_IN_9_6_0

Callers

nothing calls this directly

Calls 9

ComputeDataIncrementsMethod · 0.95
vtkImageReader2UpdateFunction · 0.85
GetScalarPointerMethod · 0.80
GetDataScalarTypeMethod · 0.80
AllocateOutputDataMethod · 0.45
SetNameMethod · 0.45
GetScalarsMethod · 0.45
GetPointDataMethod · 0.45
GetExtentMethod · 0.45

Tested by

no test coverage detected