Why is BoxWidget not part of the vtk.js Widgets3D library?

Hi all,

While working on vtk.js, I noticed that there is no BoxWidget available in the @kitware/vtk.js/Widgets/Widgets3D package to import directly.

  • In the official vtk.js examples, the BoxWidget is included as a local file (./BoxWidget.js) inside the example project, not as part of the published vtk.js npm package.
  • This creates confusion because other widgets like ImageCroppingWidget and ImplicitPlaneWidget are shipped inside the Widgets3D library and can be imported directly.
  • For projects that need a rotatable cropping box (not just axis-aligned cropping), it feels natural to expect BoxWidget to be part of the core library.

My questions:

  1. Is there a specific reason why BoxWidget was left out of the official vtk.js Widgets3D library?
  2. Are there any plans to add it as a first-class widget in future vtk.js releases?

The code in question was never meant to be part of core vtk.js since it is just to showcase widget creation and handling.

The other one come from widgets that exists in VTK/C++ and that we wanted to have in vtk.js. Like you said it is reasonable to expect a rotatable cropping box widget for vtk.js, but so far we never had a need for it in any of our projects.

So to answer your questions:

  • With the limited funds we had/have, we prioritize developing core infrastructure and let needs drive the developments.
  • As of today without specific funding or community contribution, I don’t see that widget coming to a vtk.js release.

Thank you for a very detailed response. I was able to import boxwidget.js and everything worked correctly. I really like the ability to deform the shape of the box with the handles and I added a cone inside the box. I’m not sure if I can crop the cone with the deformed box.

You should be able to listen to the deformed point location and create/update some clipping plane that you can place on your mapper to hide pieces of the cone.