Kitware / vtk-js

Visualization Toolkit for the Web
https://kitware.github.io/vtk-js/
BSD 3-Clause "New" or "Revised" License
1.23k stars 371 forks source link

vtkCubeAxesActor2D #979

Closed johannesring closed 3 years ago

johannesring commented 5 years ago

I would like to draw axes with labels around the bounding box of my data set, like you can do with vtkCubeAxesActor2D, but I was unable to find this class in vtk.js. Would it be possible to create axes like this with the current functionality in vtk.js or would one have to implement vtkCubeAxesActor2D? In the latter case, do you have any idea how much work it would take to implement this?

jourdain commented 5 years ago

This is definitely something we would like to do but dealing with text in 3D is not always obvious.

You can implement that using vtkPixelSpaceCallbackMapper for now. It seems we have some interaction issue but the idea is as follow.

FYI @martinken

johannesring commented 5 years ago

Thanks, I will look into that.

xavArtley commented 4 years ago

Hello, I made a proof of concept to create axes with vtkjs You can find the source and results here (all is embed in the html): https://xavartley.github.io/#dev/vtkjs/vtk_axes.html

ezgif com-video-to-gif (17)

I don't know if it's the best way to do it but I'm open to all suggestions for improvement (First I think about it, is possibility to specify the origin)

Edit: I implemented a grid and possibility to set origin

daker commented 3 years ago

@jourdain @martinken Should this be closed since we now have vtkCubeAxesActor?

jourdain commented 3 years ago

Example available here

jourdain commented 3 years ago

Available since 16.14.0