Can VTK.js edit 3D files? The operations are: dragging to adjust the position of bones, and setting the position or angle of a certain bone separately.

Like: https://youtu.be/lRBhs_JgE5M Position is 1’30"

Hello,

vtk.js doesn’t support bones, joints, weights or skeletons yet. I think this is more a 3D mesh than 3D volume.

Hi,Thanks for you reply. As far as you know, which mature JavaScript libraries can be used in the front end to achieve the above functions?

You can combine vtk.js to display dicom images and Three.js to display and manipulate the mesh, but you have to generate the mesh on the server with all the necessary bits to manipulate it.

Everything there is in the video can be done with VTK.js.

If you want to manipulate the position/rotation of the spine, you would need to create widgets.

VTK.js works with volumes (dicom images) and (surface) meshes.
For each vertebrae (that will be a vtkActor), you can associate a custom 4x4 matrix (named UserMatrix).

Hth,
Julien.

1 Like

Really? I want to confirm the feasibility you mentioned again. For this reason, I asked the demand initiator for another video. I hope to get your further guidance. This is very important to me. Thank you very much!

Jericho.

Yes, it’s doable. It’s a lot of manual user interaction handling. There are typically 2 approaches with VTK.js: you do the rendering of the interactive tools in 3D with VTK.js, or you convert the 3D world coordinate system into 2D screen coordinate system and delegate the rendering to SVG.
You have an example of delegation here.

After confirming with my boss, it should be necessary to adjust some changeable modules in the 3D rendering mode. Honestly, because I have searched for GitHub resources in the past two days and haven’t found a successful demo implemented through vtk.js similar to this. At one point, it made me want to give up using vtk.js. :joy:

Thank you very much for your guidance. I will carefully read the documentation and try to integrate the functions I need.