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

Method PrintNodeData

Common/DataModel/vtkReebGraph.cxx:2060–2125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2058}
2059
2060void vtkReebGraph::PrintNodeData(ostream& os, vtkIndent indent)
2061{
2062 vtkIdType arcId = 0, nodeId = 0;
2063 os << indent << "Node Data:" << endl;
2064 vtkIdType prevNodeId = -1;
2065
2066 // roll back to the beginning of the list
2067 while (prevNodeId != nodeId)
2068 {
2069 prevNodeId = nodeId;
2070 nodeId = this->Storage->GetPreviousNodeId();
2071 }
2072 prevNodeId = -1;
2073
2074 while (prevNodeId != nodeId)
2075 {
2076 prevNodeId = nodeId;
2077 vtkIdList* downArcIdList = vtkIdList::New();
2078 vtkIdList* upArcIdList = vtkIdList::New();
2079
2080 this->Storage->GetNodeDownArcIds(nodeId, downArcIdList);
2081 this->Storage->GetNodeUpArcIds(nodeId, upArcIdList);
2082
2083 std::cout << indent << indent << "Node " << nodeId << ":" << endl;
2084 std::cout << indent << indent << indent;
2085 std::cout << "Vert: " << this->Storage->GetNodeVertexId(nodeId);
2086 std::cout << ", Val: " << this->Storage->GetNodeScalarValue(nodeId);
2087 std::cout << ", DwA:";
2088 for (vtkIdType i = 0; i < downArcIdList->GetNumberOfIds(); i++)
2089 std::cout << " " << this->Storage->GetArcDownNodeId(downArcIdList->GetId(i));
2090 std::cout << ", UpA:";
2091 for (vtkIdType i = 0; i < upArcIdList->GetNumberOfIds(); i++)
2092 std::cout << " " << this->Storage->GetArcUpNodeId(upArcIdList->GetId(i));
2093 std::cout << endl;
2094
2095 downArcIdList->Delete();
2096 upArcIdList->Delete();
2097 nodeId = this->Storage->GetNextNodeId();
2098 }
2099
2100 os << indent << "Arc Data:" << endl;
2101 vtkIdType prevArcId = -1;
2102 arcId = 0;
2103
2104 // roll back to the beginning of the list
2105 while (prevArcId != arcId)
2106 {
2107 prevArcId = arcId;
2108 arcId = this->Storage->GetPreviousArcId();
2109 }
2110 prevArcId = -1;
2111
2112 while (prevArcId != arcId)
2113 {
2114 prevArcId = arcId;
2115 std::cout << indent << indent << "Arc " << arcId << ":" << endl;
2116 std::cout << indent << indent << indent;
2117 std::cout << "Down: " << this->Storage->GetArcDownNodeId(arcId);

Callers

nothing calls this directly

Calls 14

GetPreviousNodeIdMethod · 0.80
GetNodeDownArcIdsMethod · 0.80
GetNodeUpArcIdsMethod · 0.80
GetNodeVertexIdMethod · 0.80
GetNodeScalarValueMethod · 0.80
GetArcDownNodeIdMethod · 0.80
GetArcUpNodeIdMethod · 0.80
GetNextNodeIdMethod · 0.80
GetPreviousArcIdMethod · 0.80
GetNextArcIdMethod · 0.80
DeleteMethod · 0.65
NewFunction · 0.50

Tested by

no test coverage detected