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
Point cloud data in JSON to segmentation or *.ctgr to create a model
- 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
- Attachments
-
- Point cloud.PNG (226.23 KiB) Viewed 654 times
- 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
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
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
- 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
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
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
- 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
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
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
- 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
Thank you so much Dave, very useful information.
Best,
Jimmy
Best,
Jimmy