How to save the 3D medical image reconstructed by the volume drawing algorithm as a PLY file to the local computer

Yes, it works for C++ classes, too. You can expose any vtkRenderWindow in the web browser using vtkRemoteView. This is how ParaView (implemented in C++) is made available via Trame using remote rendering. You only need a few small Python files to describe your view layout and if you want to use any web widgets.