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

Method ReadVTKFileInformation

IO/Parallel/vtkPDataSetReader.cxx:634–654  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

632
633//------------------------------------------------------------------------------
634void vtkPDataSetReader::ReadVTKFileInformation(
635 vtkInformation*, vtkInformationVector**, vtkInformationVector* outputVector)
636{
637 vtkInformation* info = outputVector->GetInformationObject(0);
638
639 vtkNew<vtkDataSetReader> reader;
640 reader->SetFileName(this->FileName);
641 reader->UpdateInformation();
642 if (auto dobj = reader->GetOutputDataObject(0))
643 {
644 this->DataType = dobj->GetDataObjectType();
645 using sddp = vtkStreamingDemandDrivenPipeline;
646 info->CopyEntry(reader->GetOutputInformation(0), sddp::WHOLE_EXTENT(), 1);
647 info->CopyEntry(reader->GetOutputInformation(0), vtkDataObject::SPACING(), 1);
648 info->CopyEntry(reader->GetOutputInformation(0), vtkDataObject::ORIGIN(), 1);
649 }
650 else
651 {
652 vtkErrorMacro("I can not figure out what type of data set this is");
653 }
654}
655
656//------------------------------------------------------------------------------
657istream* vtkPDataSetReader::OpenFile(const char* filename)

Callers 1

RequestDataObjectMethod · 0.95

Calls 7

GetInformationObjectMethod · 0.80
GetDataObjectTypeMethod · 0.80
CopyEntryMethod · 0.80
SetFileNameMethod · 0.45
UpdateInformationMethod · 0.45
GetOutputDataObjectMethod · 0.45
GetOutputInformationMethod · 0.45

Tested by

no test coverage detected