Extending VTK library to dynamically modify polygonal meshes in medical applications