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

Method WriteDatasetToFile

IO/HDF/vtkHDFWriter.cxx:415–446  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

413
414//------------------------------------------------------------------------------
415bool vtkHDFWriter::WriteDatasetToFile(hid_t group, vtkPolyData* input, unsigned int partId)
416{
417 if (partId == 0 && this->CurrentTimeIndex == 0 && !this->InitializeChunkedDatasets(group, input))
418 {
419 vtkErrorMacro(<< "Dataset initialization failed for Polydata " << this->FileName);
420 return false;
421 }
422 if (this->CurrentTimeIndex == 0 && !this->InitializeTemporalPolyData(group))
423 {
424 vtkErrorMacro(<< "Temporal polydata initialization failed for PolyData " << this->FileName);
425 return false;
426 }
427 if (!this->UpdateStepsGroup(group, input))
428 {
429 vtkErrorMacro(<< "Failed to update steps group for " << this->FileName);
430 return false;
431 }
432
433 bool writeSuccess = true;
434 if (this->CurrentTimeIndex == 0 && partId == 0)
435 {
436 writeSuccess &= this->Impl->WriteHeader(group, "PolyData");
437 }
438 writeSuccess &= this->AppendNumberOfPoints(group, input);
439 if (this->HasGeometryChangedFromPreviousStep(input) || this->CurrentTimeIndex == 0)
440 {
441 writeSuccess &= this->AppendPoints(group, input);
442 }
443 writeSuccess &= this->AppendPrimitiveCells(group, input);
444 writeSuccess &= this->AppendDataArrays(group, input, partId);
445 return writeSuccess;
446}
447
448//------------------------------------------------------------------------------
449bool vtkHDFWriter::WriteDatasetToFile(hid_t group, vtkUnstructuredGrid* input, unsigned int partId)

Callers 1

DispatchDataObjectMethod · 0.95

Tested by

no test coverage detected