Extract center line from CT empty snail shell

The centerline will end near the marked point, so make sure to mark the endpoint of the centerline near the middle of the opening.

You can increase Oversampling to increase accuracy. See documentation:

  • Oversampling: Specifies resolution during internal remeshing. Higher value results in higher accuracy but longer computation time. Increase this value up to 2-4x if output does not follow the input segmentation accurately enough.

It is very hard to guess how to fine-tune your results and address remaining small issues just by looking at a few screenshots. I would recommend to share a dataset (upload to dropbox, onedrive, etc. and post the link here) or bring your dataset to one of the Slicer meeting:

I tried increasing oversampling from 1.5x to 2.5x, but it doesn’t help at all. I want to close the aperture, then it will probably be okay, but the editing tool in 3D slicer isn’t as flexible as Blender. So, I want to try editing the model in Blender first, then convert it to a series of TIFF photos (but everything will fail in voxelized processes).

I can share a model link here. http://tmpfiles.org/dl/912876/slice_0000.nrrd

This shell has no broken structures, but you will find the aperture surface, which is not filled

I also need to think about how to deal with a slightly broken shell

I guess I already missed this week’s meeting, I may join next week, maybe timezone is not that friendly

Thanks, the data file was very useful. The opening is very large, so it makes sense to close it before you extract the internal volume. You can use ā€œBaffle plannerā€ module (provided by SlicerHeart extension).

Here is a short video that shows the entire workflow:

1 Like

Thanks I just used another way to do similar tthing, actually your method is muchs simplier than what I did. Thanks a lot.

Note that the curve provided by Extract Centerline module’s ā€œcenterlineā€ method finds the shortest path on the medial surface (approximated by the edges of the Voronoi diagram, purple spiky surface in the screenshot), which is not the geometric center of the cross-section for a spiral shape:

You can use Curved Planar Reformat module (in Sandbox extension) to straighten the spiral and get an idea about the shape and size of the cross-sections in simple 2D images:

You can use Endoscopy module to fly through inside the shell to inspect segmentation quality or to get a sense of shapes and sizes inside the shell.

2 Likes

Can I know if there is any centerline algorithm that can be perpendicular to the last plane that we sealed the shell?

Yes, curves have a built-in algorithm for this. More specifically, its GetCurvePointToWorldTransformAtPointIndex method provides transforms that can be used to translate an object (such as the end plate) along the curve, with minimal spinning and rotation.

Could you please tell me how I can use that? Do I need to use the Python console in 3D Slicer, or is there a graphical user interface available?

No graphical user interface is provided for such specialized needs, but you need to write some Python code snippets to describe what you need exactly. Most of the code can be written by AI chatbots, but you need to be able to provide guidance for them. You can start from the Cross-section analysis module, which gets the cross-section that is orthogonal to the centerline, and modify it to use planes that are parallel to the end plate instead.

So the main logic should be that… I list all points on that plate then tried to see if it’s perpendicular to the plate using that function?

You can transform the endplate normal directiom from World coordinate system to Curve coordinate system. The plane normal direction remains the same along the curve in he same direction anywhere along the curve in Curve coordinate system. You can get the plane direction in World coordinate system by using the CurvePointToWorld transformation matrix.

Thanks, I tried a lot, however, it’s still quite difficult for me. Coding is not that big problem, the main problem is that quite a lot of API I’m not familiar with, many terms, e.g. world etc., I will think about any other solution.

Learning any new API is always time consuming and spending the time on it is a bit of a gamble when you are not sure yet what tools you will use in the end. Fortunately, chatbots are quite good at knowing APIs of open-source tools, such as Slicer, so you don’t have to dig into documentation or examples, just start vibe coding right away. You can also get help from community members who can help out (online, in virtual meetings, and in-person meetings) or get dedicated support from a Slicer Commercial Partner company. You are probably really close to what you need (reslicing the volume with planes parallel to the endplate is about 10 lines of quite simple Python code), but of course you can look around if you can find any tools that work better for you.

1 Like