Kim_William
(Kim William)
1
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!
spyridon97
(Spiros Tsalikis (Kitware))
2
You can check the vtkConvertToPointCloud Filter. I hope that helps
Thank you for your reply.
but… could you please explain detail?
I tried to read DICOM files and convert to PCD, using as the below code:
vtkNew<vtkDICOMImageReader> reader;
reader->SetDirectoryName(folder.c_str());
reader->Update();
vtkNew<vtkConvertToPointCloud> cvtPcd;
cvtPcd->AddInputConnection(reader->GetOutputPort());
cvtPcd->Update();
And using the below example code:
https://kitware.github.io/vtk-examples/site/Cxx/Points/ExtractSurfaceDemo/
//auto polyData = ReadPolyData(argc > 1 ? argv[1] : "");
auto polyData = cvtPcd->GetOutput();
//except above line, all the code the same.
This is my result…
cory.quammen
(Cory Quammen (Kitware))
4
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
spyridon97
(Spiros Tsalikis (Kitware))
5
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.
https://kitware.github.io/vtk-examples/site/Cxx/VolumeRendering/FixedPointVolumeRayCastMapperCT/
It worked well for me.
Thank you!