Back to Projects List
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.
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 the OBJ textured model
option.
<img src="https://user-images.githubusercontent.com/80793828/216435141-80300f14-aa08-4c51-9d05-85d3086f11c7.png", width = 700>
3. The mtl file (in the same directory) will then be automatically parsed to retrieve the texture image name. 4. The `ImageStacks` functions from SlicerMorph will then be called to import texture as a vector volumetric node and map to the model using `SetTextureImageDataConnection`. The texture node will then be deleted.
# Illustrations # Background and References 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