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

Method ConvertToIdTypeArray

IO/XML/vtkXMLUnstructuredDataReader.cxx:130–144  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

128
129//------------------------------------------------------------------------------
130vtkIdTypeArray* vtkXMLUnstructuredDataReader::ConvertToIdTypeArray(vtkDataArray* a)
131{
132 // If it is already a vtkIdTypeArray, just return it.
133 vtkIdTypeArray* ida = vtkArrayDownCast<vtkIdTypeArray>(a);
134 if (ida)
135 {
136 return ida;
137 }
138
139 // Need to convert the data.
140 ida = vtkIdTypeArray::New();
141 ida->ShallowCopy(a);
142 a->Delete();
143 return ida;
144}
145
146//------------------------------------------------------------------------------
147vtkUnsignedCharArray* vtkXMLUnstructuredDataReader::ConvertToUnsignedCharArray(vtkDataArray* a)

Callers 2

ReadFaceArrayMethod · 0.95
ReadFaceCellArrayMethod · 0.95

Calls 3

DeleteMethod · 0.65
NewFunction · 0.50
ShallowCopyMethod · 0.45

Tested by

no test coverage detected