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

Method InsertValue

IO/Infovis/vtkBiomTableReader.cxx:456–492  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

454
455//------------------------------------------------------------------------------
456void vtkBiomTableReader::InsertValue(int row, int col, const std::string& value)
457{
458 std::stringstream stream;
459 stream << value;
460
461 switch (this->DataType)
462 {
463 case VTK_INT:
464 int i;
465 if (!(stream >> i))
466 {
467 vtkErrorMacro(<< "error converting '" << value << " to integer");
468 }
469 else
470 {
471 vtkVariant v(i);
472 this->GetOutput()->SetValue(row, col, v);
473 }
474 break;
475 case VTK_FLOAT:
476 float f;
477 if (!(stream >> f))
478 {
479 vtkErrorMacro(<< "error converting '" << value << " to float");
480 }
481 else
482 {
483 vtkVariant v(f);
484 this->GetOutput()->SetValue(row, col, v);
485 }
486 break;
487 case VTK_STRING:
488 default:
489 vtkVariant v(value);
490 this->GetOutput()->SetValue(row, col, v);
491 }
492}
493
494//------------------------------------------------------------------------------
495void vtkBiomTableReader::ParseColumns()

Callers 15

ParseSparseDataMethod · 0.95
ParseDenseDataMethod · 0.95
MakeMeshMethod · 0.45
GetBlockOfDoublesMethod · 0.45
GetBlockOfIntsMethod · 0.45
GetBlockOfFloatsMethod · 0.45
ReadRestartFileMethod · 0.45
CreateVariableNamesMethod · 0.45
GetTimeStepsMethod · 0.45

Calls 2

GetOutputMethod · 0.95
SetValueMethod · 0.45

Tested by

no test coverage detected