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

Method WriteArrayInline

IO/XML/vtkXMLWriter.cxx:2146–2172  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

2144
2145//------------------------------------------------------------------------------
2146void vtkXMLWriter::WriteArrayInline(
2147 vtkAbstractArray* a, vtkIndent indent, const char* alternateName, int writeNumTuples)
2148{
2149 ostream& os = *(this->Stream);
2150 // Write the header <DataArray or <Array:
2151 this->WriteArrayHeader(a, indent, alternateName, writeNumTuples, 0);
2152 //
2153 vtkDataArray* da = vtkArrayDownCast<vtkDataArray>(a);
2154 if (da)
2155 {
2156 // write the range
2157 this->WriteScalarAttribute("RangeMin", da->GetRange(-1)[0]);
2158 this->WriteScalarAttribute("RangeMax", da->GetRange(-1)[1]);
2159 }
2160 // Close the header
2161 os << ">\n";
2162 // Write the inline data.
2163 this->WriteInlineData(a, indent.GetNextIndent());
2164 // Write information keys associated with this array.
2165 vtkInformation* info = a->GetInformation();
2166 if (info && info->GetNumberOfKeys() > 0)
2167 {
2168 this->WriteInformation(info, indent);
2169 }
2170 // Close tag.
2171 this->WriteArrayFooter(os, indent, a, 0);
2172}
2173
2174//------------------------------------------------------------------------------
2175void vtkXMLWriter::UpdateFieldData(vtkFieldData* fieldDataCopy)

Callers 11

WriteFieldDataInlineMethod · 0.95
WritePointDataInlineMethod · 0.95
WriteCellDataInlineMethod · 0.95
WritePointsInlineMethod · 0.95
WriteRowDataInlineMethod · 0.80
WriteGridMethod · 0.80
WriteTrees_0Method · 0.80
WriteTrees_1Method · 0.80
WriteTrees_2Method · 0.80

Calls 9

WriteArrayHeaderMethod · 0.95
WriteScalarAttributeMethod · 0.95
WriteInlineDataMethod · 0.95
WriteInformationMethod · 0.95
WriteArrayFooterMethod · 0.95
GetNextIndentMethod · 0.80
GetNumberOfKeysMethod · 0.80
GetRangeMethod · 0.45
GetInformationMethod · 0.45

Tested by

no test coverage detected