Hi All,
vmtkCommand = '''vmtknetworkextraction -ifile vesseltree.stl --pipe vmtksurfaceviewer -i @.o'''
p = pypes.PypeRun(vmtkCommand)
I would like to know how to obtain the branch ids and MISR from `p`.Any suggestions?
I
vmtkCommand = '''vmtknetworkextraction -ifile vesseltree.stl --pipe vmtksurfaceviewer -i @.o -ofile network.vtp'''
But, I am not sure how to obtain the corresponding vertices/coordinates at which MISR has been computed.
I tried generating a vtkPolyData object as an output and retrieve the branch id and topology information from Point and cell data numpy arrays.
I'd a chance to look at this class, vmtknetworkextraction . Can this feature be used?
--
You received this message because you are subscribed to the Google Groups "vmtk-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vmtk-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vmtk-users/6895a7e6-4129-492f-8497-d9bb304c8bd0%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "vmtk-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vmtk-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vmtk-users/5f7d893c-7685-4b66-8614-81ec1574c7ab%40googlegroups.com.

vmtkCommand = '''vmtksurfacereader -ifile vesseltree.stl
--pipe vmtksurfacewriter -ofile foo_net.vtp'''
p = pypes.PypeRun(vmtkCommand)
networkExtraction = vmtkscripts.vmtkNetworkExtraction()
networkExtraction.Surface = 'foo_net.vtp'
networkExtraction.Execute()
network = networkExtraction.Network
graph = networkExtraction.GraphLayout
--
You received this message because you are subscribed to the Google Groups "vmtk-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vmtk-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vmtk-users/c7f1d567-0baf-4631-8b70-df6ab3c8b53c%40googlegroups.com.
And is `graph` a vmtkPolyData object that contains cell data and point data?
Also, could you please explain how the skeleton and network image attached in the previous email were created ?
To view this discussion on the web visit https://groups.google.com/d/msgid/vmtk-users/CAGchuN7hG9Zp%3DG8QLWq6YeDv9QhBBXjYdu7BJpCrOXrkUcM57A%40mail.gmail.com.
pprint(network_dsa.CellData['Topology'])
pprint(graph_dsa.CellData['Radius'])polyline1 = network_dsa.GetCell(2) # 1 is the cell id
pprint(polyline1)
for i in range(polyline1.GetNumberOfPoints()):
pointId = polyline1.GetPointId(i) # pointId is the point id of the i-th point along the polyline
pprint(pointId)
To view this discussion on the web visit https://groups.google.com/d/msgid/vmtk-users/CAEhu9hCq6bXHhW5jHGUuyxgi5ozKU8m1OrENAFCspztwYcrLiw%40mail.gmail.com.
graph = networkExtraction.GraphLayout
clean_graph = vtk.vtkCleanPolyData(graph)
From what I see here there are 27 nodes in the network. But the actual network doesn't have 27 nodes.
And I think this is what you meant by saying , "Also, you should use vtkCleanPolyData first (or the Clean filter in ParaView) to merge duplicate points before you build the topology array,
Error:
clean = vtk.vtkCleanPolyData(graph)
TypeError: method requires a string argumen
I don't really get why a string argument has to be passed. I am trying to pass the ployData in the graph as an input argument.
edgeNode0 = edge.GetPointId(0)
edgeNode1 = edge.GetPointId(1)
edgeNode0_pos = cleanedGraph_dsa.Points[edgeNode0]
edgeNode1_pos = cleanedGraph_dsa.Points[edgeNode1]
from vtk.util.numpy_support import vtk_to_numpy
vtk_to_numpy(edgeNode0_pos)
edgeNode0_pos = cleanedGraph_dsa.Points[edgeNode0]
edgeNode1_pos = cleanedGraph_dsa.Points[edgeNode1]


edgeNode0_pos is a VTKArray .To convert this to a numpy array, I tried vtk_to_numpy. But this returns an error: AttributeError: 'VTKArray' object has no attribute 'GetDataType'. Could you please suggest what's wrong here?
Could you please clarify why this happens even after we use vtkCleanPolyData
I'd like to know how these lengths are computed. Is there an in-build class in VMTK? Or is it okay to compute the euclidean distance between edgenode0 and edgenode1?










However, I find the values of `Length` are slightly off from the values displayed in the snapshot shared by you. I've generated the output file using the code
shared in the second last email.
Also, could you please let me know how the legend has to be enabled? I used the search tab in the color map editor to look for Length. But for some reason the
the length field is not accessible.

Also, while using the tube filter may I know how the branch ids are displayed in the spreadsheet?