Import VDB File into 3D Slicer

Hello,

I am looking to import a .VDB file into 3D Slicer. When I try importing I receive a error notification:

" Error occurred while loading the selected files. Click ‘Show details’ button and check the application log for more information."

The error log:
Loading /user/desktop/test_01.vdb - load failed

Can you please help me understand how load a VDB into 3D Slicer?

Thank you,

Dom

You can load a vdb into Paraview or Blender.

2 Likes

OpenVDB reader/writer is available in VTK, so we could expose it in Slicer with not too much work. Or, we could wait for ITK to support and then we could enable support for it by modifying only 1-2 liines (as we already use ITK for reading/writing most image types).

Integration will happen faster if there is confirmed interest in this by the community (or somebody contributes with development work or specific funding) . I’ll change the category of this topic to “feature request” to allow people to vote on it.

As @tsehrhardt wrote above, ParaView can already read vdb files, so until Slicer has direct support, you can read the vdb file for n ParaView and save as vti, mha, nrrd image file that Slicer can read.

1 Like

Thanks Andras,

What would it take to add it to 3D Slicer?

You mentioned VTK are you referring to the GitHub - Slicer/vtkAddon: General-purpose features that may be integrated into VTK library in the future. you created? Or another piece of software?

And what is ITK I am not familiar?

I was referring to the VDB reader and writer in VTK:

It is not enabled by default (and not enabled in Slicer build of VTK either) because it requires the OpenVDB library. OpenVDB uses permissive license, so integrating it should not be an issue.

What would it take to add it to 3D Slicer?

  • Add a VDB CMake option to Slicer (Slicer_BUILD_VDB_SUPPORT or something similar)
  • Add OpenVDB as a dependency to the Slicer build (similarly to rapidjson, teem, zlib, sqlite, …), enabled when Slicer_BUILD_VDB_SUPPORT is enabled
  • Update Slicer’s VTK build to enable VTK_MODULE_ENABLE_VTK_IOOpenVDB when Slicer_BUILD_VDB_SUPPORT is enabled
  • Add VTK’s VDB reader/writer to vtkMRMLVolumeArchetypeStorageNode, similarly to vtkTeemReader

Hi Andras,

As I am industrial designer adding an OpenVBD library into Slicer seems a little out of my depth.

Would you know how I could go about this? Or someone I could work with to add this feature?

Thanks,

Dom

If it is urgent for you then you can ask a friend (who has some C++ programming experience) or hire Kitware or other Slicer commercial partner company, or just wait for someone else to implement it. In the meantime, you can convert manually to nifti or nrrd format in ParaView or other software.

Would Blender or Paraview not have functions you can use for now to work with the VDB?