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

Function WriteHeader

IO/Core/vtkArrayWriter.cxx:38–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38void WriteHeader(const std::string& array_type, const std::string& type_name, vtkArray* array,
39 ostream& stream, bool WriteBinary)
40{
41 // Serialize the array type ...
42 stream << array_type << " " << type_name << "\n";
43
44 // Serialize output format, binary or ascii
45 WriteBinary ? stream << "binary"
46 << "\n"
47 : stream << "ascii"
48 << "\n";
49
50 const vtkArrayExtents extents = array->GetExtents();
51 const vtkIdType dimensions = array->GetDimensions();
52
53 // Serialize the array name ...
54 stream << array->GetName() << "\n";
55
56 // Serialize the array extents and number of non-nullptr values ...
57 for (vtkIdType i = 0; i != dimensions; ++i)
58 stream << extents[i].GetBegin() << " " << extents[i].GetEnd() << " ";
59 stream << array->GetNonNullSize() << "\n";
60
61 // Serialize the dimension-label for each dimension ...
62 for (vtkIdType i = 0; i != dimensions; ++i)
63 stream << array->GetDimensionLabel(i) << "\n";
64}
65
66void WriteEndianOrderMark(ostream& stream)
67{

Callers 6

WriteSparseArrayBinaryFunction · 0.70
WriteDenseArrayBinaryFunction · 0.70
WriteSparseArrayAsciiFunction · 0.70
WriteDenseArrayAsciiFunction · 0.70

Calls 6

GetExtentsMethod · 0.80
GetDimensionLabelMethod · 0.80
GetDimensionsMethod · 0.45
GetNameMethod · 0.45
GetBeginMethod · 0.45
GetEndMethod · 0.45

Tested by

no test coverage detected