Point cloud data in JSON to segmentation or *.ctgr to create a model

Provides a system for patient-specific cardiovascular modeling and simulation.
POST REPLY
User avatar
Jimmy Azarnoosh
Posts: 25
Joined: Mon Oct 05, 2020 5:43 pm

Point cloud data in JSON to segmentation or *.ctgr to create a model

Post by Jimmy Azarnoosh » Wed Dec 14, 2022 10:24 am

Hello,

I have point cloud data of a lumen in JSON format. Please see the attached figure. There are 16 points at each cross section of the lumen. Is there any way to get segmentations (i.e. *.ctgr) out of JSON data. Any advice on this would be appreciated.

Thanks,
Jimmy
Attachments
Point cloud.PNG
Point cloud.PNG (226.23 KiB) Viewed 654 times

User avatar
David Parker
Posts: 1719
Joined: Tue Aug 23, 2005 2:43 pm

Re: Point cloud data in JSON to segmentation or *.ctgr to create a model

Post by David Parker » Wed Dec 14, 2022 8:09 pm

Hi Jimmy,

Rather than create segmentations you could create a surface for your point cloud and import it into SV as a model. You can use the VTK vtkSurfaceReconstructionFilter class to create a surface from a point cloud.

If you really do want segmentations then you could generate centerlines from the point cloud surface (need to cap it to create a solid model). The centerlines can then be used to create segmentation contours by slicing the surface with a plane defined by the tangent and normal data at locations on the centerline.

Have a look here https://github.com/ktbolt/cardiovascula ... es/c%2B%2B to get an idea about how to do this

Cheers,
Dave

User avatar
Jimmy Azarnoosh
Posts: 25
Joined: Mon Oct 05, 2020 5:43 pm

Re: Point cloud data in JSON to segmentation or *.ctgr to create a model

Post by Jimmy Azarnoosh » Fri Dec 16, 2022 2:11 am

Hi Dave,

Thank you so much for your response. We tried VTK but prefer to create segmentations. I forgot to say that we do have centerlines in json format. I already created the path from our json data using the python interface. I'm now struggling with creating segmentation using python interface. At each cross section, we have coordinates of 16 points (i.e. xyz) as well as the centerline. How can I create a counter with these points using spline polygon counter type? If there is any documentation on how to do this, I would appreciate it if you please share it with me.


Thank you,

Jimmy

User avatar
David Parker
Posts: 1719
Joined: Tue Aug 23, 2005 2:43 pm

Re: Point cloud data in JSON to segmentation or *.ctgr to create a model

Post by David Parker » Fri Dec 16, 2022 2:40 pm

Hi Jimmy,

You can find documentation here http://simvascular.github.io/docsPython ... ion_module. There are also some test examples here https://github.com/SimVascular/SimVascu ... gmentation.

Note that there is currently no API function to write segmentations into an SV .ctgr file. You will need to figure out how to do that, maybe use Python xml.etree or just write XML directly using print statements (probably easier!).

Cheers,
Dave

User avatar
Jimmy Azarnoosh
Posts: 25
Joined: Mon Oct 05, 2020 5:43 pm

Re: Point cloud data in JSON to segmentation or *.ctgr to create a model

Post by Jimmy Azarnoosh » Mon Dec 19, 2022 2:26 pm

Thank you so much Dave, very useful information.

Best,
Jimmy

POST REPLY