Back to Projects List
- Chi Zhang (Seattle Children's Research Institute)
- Steve Pieper (Isomics, Inc.)
- A. Murat Maga (Seattle Children's Research Institute)
- Andras Lasso (The Perk Lab, Queen’s University)
- Sara Rolfe (Seattle Children's Research Institute)
Automatedly map the associated texture image to the obj file when importing it into Slicer without a creating a volume node for the texture image. This can facilitate importing textured model acquired by photogrammetry into Slicer. The ultimate goal is to be able to access OpenDronMap(ODM) photogrammetric package via Slicer to facilitate the use of photogrammetry.
When the obj file is imported into Slicer, Slicer will automatically call the Texture Model module from SlicerIGT to map the texture on the obj file without the need to import the texture image as a volumetric node and manually map it to the model using this module.
- Register a hook for the obj file type in the data import dialog (a similar approch suggested by Steve Pieper for loading nii file as either volume or segmentation (NIFTI file reader from SlicerDMRI extension: (https://github.com/pieper/SlicerDMRI/blob/nifiio/Modules/Scripted/NIfTIFile/NIfTIFile.py)
- When the 'obj' option is selected in the data importing dialog, the 'Texture Model' functions will be called to automatically map texture to the model (The TextureModel module of SlicerIGT: https://github.com/SlicerIGT/SlicerIGT/tree/master/TextureModel
- Here is an example file https://drive.google.com/file/d/1ZxJcx2nM-fgywA8KMm6JO0t7QJIcQR7O/view?usp=sharing)
-
The goal is basically reached, thanks for the help from Steve Pieper. The script
OBJFile.py
is incorporated in the forked SlicerMorph repository: https://github.com/chz31/SlicerMorph. Git clone the repository and use the Extension Wizard to install the SlicerMorph extension. -
After that, the
OBJ textured model
option would be registered in the data dialog. Drag the OBJ into Slicer and select theOBJ textured model
option.
- The mtl file (in the same directory) will then be automatically parsed to retrieve the texture image name.
- The
ImageStacks
functions from SlicerMorph will then be called to import texture as a vector volumetric node and map to the model usingSetTextureImageDataConnection
. The texture node will then be deleted.
Chi Zhang is working on a photogrammetry pipeline based on the open source package OpenDroneMap (ODM). Ultimately, the goal is being able to push and pull data between Slicer and ODM.
A sample obj file with associated texture can be downloaded here: https://drive.google.com/file/d/1ZxJcx2nM-fgywA8KMm6JO0t7QJIcQR7O/view?usp=sharing