Create a segment with a list of points that are segment boundaries

Hi to all
I have a list of points in each CT slice that is obtained from python scripts.
My ultimate goal is to have a closed surface segment where these points precisely define its boundaries. In other words, the space enclosed by the points should be filled, and the area outside should be empty.

In my attempt, I connected these points to form a closed markups curve like picture.

then converted it to a model and then to a segment. However, the resulting segment appeared as a narrow closed strip with an empty interior like below picture, so I did not achieve the ultimate goal I had in mind.

Does anyone have any ideas or solutions on how to create a closed surface segment using list of points?

It’s important to say that my list of points varies in each slice, and ultimately, I want to combine the segments obtained from each slice to create a three-dimensional segment.

I would be very happy if someone could help me achieve this goal.

1 Like

Maybe ‘Dinamic Modeler’ Module can help you.

If you want to do this in 3D, I suggest the Surface Cut effect from the SegmentEditorExtraEffects extension (download from Extensions Manager).

If it’s 2D, my only idea is the Draw effect in Segment Editor.

If your contour points are ordered then you can create a parallel contour segment representation from them - see how it is implemented on the ImportOsirixROI module in Sandbox extension.

If you have very dense boundary point set the you can use VTK surface reconstruction filters.

This is a pretty rare need, so there is a chance that you could find a better overall approach to solve your task. Can you tell a bit about why are you considering reconstructing a 3d shape from surface points?

Are you starting from a 3D image? Is the goal 3D segmentation? Have you tried nn-UNet and MONAI Auto3DSeg models? They are almost guaranteed to learn any 3D segmentation task if you provide enough training samples.

thank you Leidy Mora for your answer :pray:
unfortunately this module was not useful for my problem but it was very attractive and I think I can use it for other purposes later.

1 Like

thanks a lot Mr Pinter for your answer

thank you Mr Lasso for your answer

I can find the answer of my problem

Actually I am trying to design a module to make bolus electron.
for this purpose, I considered PTV model and a isodose level that I want to match it to distal surface of PTV ( to spare normal tissues under the PTV). it seems, I could find boundary points of the bolus on the surface in each slice.

Fortunately, I can find useful codes in the SlicerSkinMouldGenerator module to convert the boundary points into a final bolus. Now I am trying to remove the bugs in my code by applying it to PTVs in different conditions.
But, I have no experience for next steps and I do not know how to convert my code into a usable module in 3d Slicer. I want to know if you can help me?

Skin mould generator is already a working Slicer module, so one approach toj could take is to improve this module, add features that you need, while keeling the module in working condition.