Add SMTKFileWriter module for exporting Slicer scene as .aeva.smtk file which can then be loaded into aevaCMB application.
This merge request addresses aeva#115 (closed) and it was developed by @shreeraj.jadhav with input from @jcfr
It adds the SMTKFileWriter module enabling user to export a Slicer MRML scene as a .aeva.smtk json file along side with:
- Slicer segmentation saved as
.vti - Slicer surface models saved as
.vtp - Slicer solid models saved as
.vtu
The exported file is saved with extension .aeva.smtk which can then be loaded into aevaCMB application.
Links:
- VTK file format at https://kitware.github.io/vtk-examples/site/VTKFileFormats/
- SMTK resource serialization at https://smtk.readthedocs.io/en/latest/tutorials/create_a_project/index.html?write-project-resource
Features
- Export surface models as vtkPolyData (.vtp)
- Export solid models as vtkUnstructuredGrid (.vtu)
- Export Images/Volumes as vtkImageData (.vti)
- Export scene as smtk json format (.aeva.smtk)
- Individual component files (vtp, vtu, vti) are saved under a subfolder with the same name as the parent filename.
- Components undergo transformation hardening before saving, thereby carrying forward any registrations/transformations applied within Slicer.
- File names of component files are made more readable by using the user-specified MRML node name as a prefix to the file followed by the respective uuid. The prefix undergoes string sanitization to ensure that it is compatible as a file name.
External projects
To support this, the following external projects have been added:
External_aeva-session.cmake-
External_Boost.cmake: Currently required Boost to be always be installed on the system. See aevaslicer#10 External_Eigen3.cmakeExternal_MOAB.cmakeExternal_Netgen.cmakeExternal_nlohmann_json.cmakeExternal_pegtl.cmakeExternal_smtk.cmakeExternal_vtkFiltersParallelDIY2.cmakeExternal_vtkIOParallelExodus.cmakeExternal_vtkvtkm.cmake
Edited by Jean-Christophe Fillion-Robin