Please can you help me to get centerline extraction on bronchoscopy using python ,VMTK and which algorithm I need to use .Please send me the source code of the same.
You first need to segment the airways and then you can use VMTK extension to extract the centerline. You can find tutorials on YouTube and source code on Github (GitHub - Slicer/Slicer: Multi-platform, free open source software for visualization and image computing., GitHub - vmtk/SlicerExtension-VMTK).
Actually I want simple code like which consist STL file airway tree and algorithm to extract centerline. I am getting like this output ,please can you help me.
You’ll need to generate an airway segmentation similar to the one that you showed in your image. You can use the Lung CT Segmenter (part of Lung CT Analyzer extension) for that in connection with a thin sliced lung CT tissue kernel. Then you should hollow the structure with 3D Slicers Segment Editor and follow @lassoan’s advice/link in the above post.
Clarification: for centerline extraction you need a segment that contains the airway lumen. If you hollow the airways (for visualization, 3D printing, etc.) then do it after the centerline extraction or keep a copy of the lumen segment.
That is a very important point, thanks for the clarification. It even spins some ideas for pulmonary vessels, which I thought must be hollowed for VMTK.
Ok Thank you,
I installed vmtk in visual studio code. I want to build vmtk in visual studio 2019 professional,
how can I do ? please help .
All the tools are built and made conveniently available as Slicer extensions that you can use in either Python or C++.
If you want to build the underlying libraries yourself and implement and application that integrates all the tools then it is a lot of work and you have to do it all yourself. But to give some help with getting started:
- VMTK can compute the centerline from airways segmentation. You can configure and build VMTK using CMake. There are no prerequisites or any special configuration options, everything just works with default settings.
- For segmenting the airways you can use semi-automatic methods in Slicer or CIP or you can try various neural network based automatic segmentation tools.