I’m still trying to figure out the full capabilities of Slicer, and just recently started using the DMRI extension. I tried to export a tract as PLY using the “Export tractography to PLY (mesh)” tool but every time I export it I notice it has been rotated 180 degrees about the Z axis when I open it in another 3D program such as Blender. Is there a step I’m missing or something I’m not taking to account?
That code snippet exports the tracts as they are in the scene, in RAS coordinate system. If you need the mesh in LPS coordinate system then you can invert the sign of the first two coordinate components. I’ve updated the example here.
Thanks for the reply, but I don’t know how to follow the instructions on that link. I found the “TractographyExportPLY.py” is this something I need to modify on that file?
@yuanci -the feature in SlicerDMRI was implemented based on the script example that @lassoan pointed to. He updated the example, but to update the module the same change needs to be made here in the SlicerDMRI source code. Is there any chance you could make the change, test it, and submit a pull request to SlicerDMRI? If that’s not something you are familiar with probably someone else can easily do it.
Could you please add a outputCoordinateSystem == "RAS" argument to exportFiberBundleToPLYPath, test if it all works well, and then send a pull request with the change? You can create a pull request very easily by editing the .py file directly in github and answering yes to when you are asked if you want to fork the repository, create a branch, and submit a pull request.
Thank you. I’ve polished it a bit (use None as default to prevent overwriting default; write coordinate system information to image header) and created a pull request: