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

Method SetDimensionLabel

Common/Core/vtkArray.cxx:205–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205void vtkArray::SetDimensionLabel(DimensionT i, const vtkStdString& raw_label)
206{
207 if (i < 0 || i >= this->GetDimensions())
208 {
209 vtkErrorMacro(
210 "Cannot set label for dimension " << i << " of a " << this->GetDimensions() << "-way array");
211 return;
212 }
213
214 // Don't allow newlines in dimension labels ...
215 std::string label(raw_label);
216 label.erase(std::remove(label.begin(), label.end(), '\r'), label.end());
217 label.erase(std::remove(label.begin(), label.end(), '\n'), label.end());
218
219 this->InternalSetDimensionLabel(i, label);
220}
221
222vtkStdString vtkArray::GetDimensionLabel(DimensionT i) VTK_FUTURE_CONST
223{

Callers 11

ReadHeaderFunction · 0.80
TestArraySerializationFunction · 0.80
RequestDataMethod · 0.80
testReturnByValueMethod · 0.80
TestArrayAPISparseFunction · 0.80
RequestDataMethod · 0.80
RequestDataMethod · 0.80
RequestDataMethod · 0.80
ArraySparseArrayToTableFunction · 0.80
GenerateDenseArrayMethod · 0.80
GenerateSparseArrayMethod · 0.80

Calls 5

GetDimensionsMethod · 0.95
removeFunction · 0.50
eraseMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by 3

TestArraySerializationFunction · 0.64
testReturnByValueMethod · 0.64
TestArrayAPISparseFunction · 0.64