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

Method ToJson

Rendering/VtkJS/vtkVtkJSSceneGraphSerializer.cxx:509–525  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

507
508//------------------------------------------------------------------------------
509Json::Value vtkVtkJSSceneGraphSerializer::ToJson(
510 Json::Value& parent, vtkAlgorithm* algorithm, vtkDataObject* dataObject)
511{
512 if (vtkImageData* imageData = vtkImageData::SafeDownCast(dataObject))
513 {
514 return this->ToJson(parent, algorithm, imageData);
515 }
516 else if (vtkPolyData* polyData = vtkPolyData::SafeDownCast(dataObject))
517 {
518 return this->ToJson(parent, algorithm, polyData);
519 }
520 else
521 {
522 vtkErrorMacro(<< "Cannot export data object of type \"" << dataObject->GetClassName() << "\".");
523 return Json::Value();
524 }
525}
526
527//------------------------------------------------------------------------------
528Json::Value vtkVtkJSSceneGraphSerializer::ToJson(

Callers 2

AddMethod · 0.95
extractRequiredFieldsMethod · 0.95

Calls 15

UniqueIdMethod · 0.95
extractRequiredFieldsMethod · 0.95
AddMethod · 0.95
ptrToStringFunction · 0.85
computeMD5Function · 0.85
ToAOSDataArrayMethod · 0.80
GetVertsMethod · 0.80
ExportLegacyFormatMethod · 0.80
GetPolysMethod · 0.80
GetStripsMethod · 0.80
GetRepresentationMethod · 0.80
GetSpecularPowerMethod · 0.80

Tested by

no test coverage detected