How to make a point cloud data from DICOM Series?

Hi all.

I’m using the 3D Slicer program. As far as I know, this program was based on the VTK library.

The below image is a screenshot of the 3D Slicer program UI.

I used DICOM images from the VTK ReadDICOMSeries example.

So, my question is… how to make a point cloud data from DICOM series.
Such like right upper image.

Is it possible to make a point cloud data from DICOM series using the VTK library?
If yes, could you please let me know the C++ example code?

Thank you!

You can check the vtkConvertToPointCloud Filter. I hope that helps

Thank you for your reply.
but… could you please explain detail? :cry:

I tried to read DICOM files and convert to PCD, using as the below code:

vtkNew<vtkDICOMImageReader> reader;

vtkNew<vtkConvertToPointCloud> cvtPcd;

And using the below example code:

//auto polyData = ReadPolyData(argc > 1 ? argv[1] : "");
auto polyData = cvtPcd->GetOutput();
//except above line, all the code the same.

This is my result…

The image in the upper right looks like a volume rendering. Please take a look at VTK’s Volume Rendering examples to learn more.

1 Like

Do you want to get a point cloud out of the image and color it using your image scalar values? or do you want to volume render your image?

1 Like

Hi all. Thank you for your help.
I’m sorry for my late reply.

I found that the sample code is already exist what I want.

It worked well for me.

Thank you!