The PLY file is not working.

(Kim William) #1

Hi all.

I have a question about PLY file load.

I have two PLY files.
(A) PLY file: It made by 3D Scanner.
(B) PLY file: The sample PLY file from the link.

The B file work normally but A file is not working on the same code.

My code snippet is as below:

vtkSmartPointer pPLYReader =

vtkSmartPointer mapper =

vtkSmartPointer actor =

vtkSmartPointer renderer =
renderer->SetBackground(.1, .2, .3);

//vtkSmartPointer m_vtkWindow;

I don’t know why A file is not working.

Unfortunately, I can’t upload the file.

Could you please advise me about loading the PLY file?

Thank you.

Have a good day :slight_smile:

How to change the color of the Point Cloud Data?
(Dan Lipsa) #2

What version of VTK are you using? Can you try with master?



(Kim William) #3

Hi Dan Lipsa.

My VTK version is 8.2.0.

Thank you.

(Dan Lipsa) #4


Can you try with VTK from the master branch

We had a PLY fix going in that did not make it in 8.2



(Kim William) #5

Hi Dan.

I tried to load my PLY file with VTK from the master branch.

But the symptom is the same…

Do you think, does the code have no problem?

I want to check the code is okay.
If yes, I think the PLY file has a problem.

Thank you :slight_smile:

(Dan Lipsa) #6

What is the error you are seeing?

You can try loading that file in meshlab, to see if that program loads it.

If you can share your file privately, I can take a look at it. My email is my first name dot my last name at



(Kim William) #7

I sent you my PLY file by email.

Thank you :slight_smile:

(Andras Lasso) #8

Note that you never need to reveal your email address if you use discourse. You can send private message by clicking on the user’s photo then on the “Message” button in the top-right corner.

(Dan Lipsa) #9

Hi Kim,

Thanks for sending me the file.

I took a look at it in ParaView. The problem with it is that it does not have any cells, so the default representation - surface shows nothing.

The Point Gaussian representation works.

For VTK, try

instead of



(Dan Lipsa) #10

Thanks Andras, I’ll keep this in mind.
I use discourse through email, so I have not seen the actual site that much.


(Kim William) #11

Hi Dan.

Thank you for your support!

Finally, I can be rendering my PLY file.

But why my PLY file is only used by vtkPointGaussianMapper?
(Why the data has not any cells?)

Thank you :slight_smile:

(Andras Lasso) #12

Raw data that surface scanners acquire is just a point cloud (no cells). Some surface scanners come with sophisticated surface reconstruction software (that can merge surfaces, filter outliers, map texture, etc.). If you don’t have access to such software then you may try the few basic surface reconstructor filters that are available in VTK (vtkSurfaceReconstructionFilter, PoissonExtractSurface, PowercrustExtractSurface).

(Bill Lorensen) #13

There are several examples that process points…Take a look at:


(Kim William) #14

Thank you everyone so much!

It was very helpful for me!

Thank you :slight_smile: