is it able to cut a pipe by given a circle vertices on it, by SelectPolyData/ImplicitSelectionLoop?ERROR:Can't follow egde. Set EdgeSearchMode to Dijkstra.

is it able to cut a pipe by given a circle vertices on it, by SelectPolyData/ImplicitSelectionLoop?
test and get ERROR:Can’t follow egde. Set EdgeSearchMode to Dijkstra to avoid this error.
Thanks!

You can set EdgeSearchMode to Dijkstra to avoid this error.

1 Like

Thanks!
it’s able to run, but the result seems not right…the mesh was not precisely cut into 2 parts by the ‘loop’ which is a irregular ring which is get from:
set vtkPlane to vtkCutter
then vtkPolyDataConnecticity->SetInputData(vtkCutter->GetOutput()) & SetExtractionModeToClosestPointRegion & setClosestPoint(pickPointOn1Branch)
then Ring = connectFilter->GetOutput;

i want to cut at the pickPoint on 1 branch, while keep all the other branches not cut.

is there any way to do this using VTK?
if SelectPolyData or ImplicitSelectionLoop is the right way, is there anything to notice when use them? eg. the points must be the mesh vertex or on the triangle?

What shape would you like to cut? What are your requirements? Can you show a few screenshots to illustrate?

tree with branches, or blood vessel, this kind of hollow mesh

eg. in the above picture, there are 3 meshes with different colors, is there any good way to Cut just a single branch at the Picked point by VTK
Thanks!

Manipulating vessel trees is a special case which has many solutions.

For convenient editing with a graphical user interface: Snipping off branches is really easy if you use binary labelmap representation for your segmentation, as you can erase a small piece of the vessel by a single click where you want to clip and then keep the largest connected component. It takes just a few clicks in 3D Slicer: load your mesh, right-click in Data module to convert to segmentation, in Segment Editor module click with the Erase tool where you want to snip, and then use Islands effect to keep the largest island.

For automated vessel mesh processing in Python or C++, you can use VMTK toolkit.

1 Like

is there any way to only use VTK? how about the vtkClipPolyData, vtkCutter, etc.
the vessel mesh and its centerline data were known.
Thanks!

You can use VTK, you just need to put in some work to develop a tool that does exactly what you need. VMTK is based on VTK and implements exactly these tools, so that you don’t have to reimplement.

1 Like

thanks, if do this by myself, what classes should i use? or is there a clear way include the steps to reach the goal?

I don’t have any specific recommendations within VMTK. Community support is available here. This page is a good starting point.

1 Like

thanks! but i mean is it possible to this with VTK & without VMTK, and is there already existed algorithm in VTK?

it’s very easy to only cut the clicked branch IF every branches are meshes, BUT not the whole vessel tree is a big mesh.
Is there some way to split the big mesh to many small meshes which each one is just a single branch?
then a multi-branch tree data structure can be used.
Thanks!

Yes, VMTK can split the vessel tree to branches.

1 Like