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

Method WriteInlinePiece

IO/XML/vtkXMLStructuredDataWriter.cxx:567–591  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

565
566//------------------------------------------------------------------------------
567void vtkXMLStructuredDataWriter::WriteInlinePiece(vtkIndent indent)
568{
569 // Write the point data and cell data arrays.
570 vtkDataSet* input = this->GetDataSetInput();
571
572 // Split progress between point data and cell data arrays.
573 float progressRange[2] = { 0.f, 0.f };
574 this->GetProgressRange(progressRange);
575 int pdArrays = input->GetPointData()->GetNumberOfArrays();
576 int cdArrays = input->GetCellData()->GetNumberOfArrays();
577 int total = (pdArrays + cdArrays) ? (pdArrays + cdArrays) : 1;
578 float fractions[3] = { 0, float(pdArrays) / total, 1 };
579
580 // Set the range of progress for the point data arrays.
581 this->SetProgressRange(progressRange, 0, fractions);
582 this->WritePointDataInline(input->GetPointData(), indent);
583 if (this->ErrorCode == vtkErrorCode::OutOfDiskSpaceError)
584 {
585 return;
586 }
587
588 // Set the range of progress for the cell data arrays.
589 this->SetProgressRange(progressRange, 1, fractions);
590 this->WriteCellDataInline(input->GetCellData(), indent);
591}
592
593//------------------------------------------------------------------------------
594vtkIdType vtkXMLStructuredDataWriter::GetStartTuple(

Callers 1

WriteInlineModeMethod · 0.95

Calls 8

WritePointDataInlineMethod · 0.80
WriteCellDataInlineMethod · 0.80
GetDataSetInputMethod · 0.45
GetProgressRangeMethod · 0.45
GetNumberOfArraysMethod · 0.45
GetPointDataMethod · 0.45
GetCellDataMethod · 0.45
SetProgressRangeMethod · 0.45

Tested by

no test coverage detected