I came across the VTKU3DExporter module, which allows exporting a VTK scene to the U3D file format. I would like to use the generated U3D file for including in 3D PDFs.
I have successfully built this module independently and tested it with a demo scene—it worked as expected. I’m now looking for an official way to integrate this module into Slicer.
I’m happy to provide more details about how I built the module independently.
You could do this by making a SuperBuild extension so the C++ code and python wrappings are build and packaged for all platforms. If this is a well-implemented VTK module that should be fairly straightforward. You can look at other extensions to get ideas.
@alientex To follow-up, you should be able to integrate the module into your extension and/or custom application following an approach like the on used in SlicerVirtualReality.
How do you create 3D PDF from this file?
Can you post a link to an example 3D PDF that you generate from a segmentation?
Can the VTK exporter preserves colors, opacities, material properties, and scene lights?
Can you specify segment names that appear in the PDF viewer (similar to OpenAnatomy glTF exports)?
Does the exporter support multiple time points? Can your step through the time points one by one in the PDF viewer?
Can you specify clipping planes and edit them in the PDF viewer?
I’m mainly asking these to see how the PDF solution compares to existing solutions, such as 3dviewer.net, and how could it compete in the long term with a VTK-based viewer apps. Based on my limited experience and little reading on 3D PDF it seems to me that it is very limited, legacy technology (just barely hanging on, maintained but not improved for many years) and so a modern VTK-based viewer could work much better (it would work with open file formats, it would be extensible and customizable, it could reslice 3D images, do volume rendering, etc). Even just packaging 3dviewer.net as a mobile app would probably be a better 3D viewer than 3D PDF.