# Export a transformation matrix through VS Code without opening 3D Slicer

**URL:** <https://discourse.slicer.org/t/export-a-transformation-matrix-through-vs-code-without-opening-3d-slicer/21163>\
**Category:** Development\
**Created:** [December 21, 2021, 5:15am UTC](https://discourse.slicer.org/t/export-a-transformation-matrix-through-vs-code-without-opening-3d-slicer/21163 "2021-12-21T05:15:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martina](https://avatars.discourse-cdn.com/v4/letter/m/85f322/32.png) [@Martina](https://discourse.slicer.org/u/Martina)\
**Post date:** [December 21, 2021, 5:15am UTC](https://discourse.slicer.org/t/export-a-transformation-matrix-through-vs-code-without-opening-3d-slicer/21163/1 "2021-12-21T05:15:19Z")

</div>

Operating system: Microsoft Windows 10 Home  
Slicer version: Slicer 4.11.20210226  
VS Code version: Visual Studio Code 1.63.2

Hi all,  
I am new to 3D Slicer and VS Code.  
I want to export a transformation matrix from 3D slicer through a python script.  
I need to do this because I’m trying to write a pipeline as automated as possible to load MRI brain images in hololens.  
Is it possible?  
I’ve tried to run a python script on VS Code as if it was the 3D Slicer python console (so without opening 3D Slicer) but I didn’t have any success.  
So far my whole settings.json script is this:

{  
“python.pythonPath”: “C:\Users\username\AppData\Local\NA-MIC\Slicer 4.11.20210226\bin\PythonSlicer.exe”,  
“python.linting.pylintPath”: “C:\Users\username\AppData\Local\NA-MIC\Slicer 4.11.20210226\lib\Python\Scripts\pylint.exe”,  
“python.formatting.autopep8Path”: “C:\Users\username\AppData\Local\NA-MIC\Slicer 4.11.20210226\lib\Python\Scripts\autopep8.exe”,  
“python.autoComplete.extraPaths”: [  
“C:\Users\username\AppData\Local\NA-MIC\Slicer 4.11.20210226\”,  
“C:\Users\username\AppData\Local\NA-MIC\Slicer 4.11.20210226\bin\”,  
“C:\Users\username\AppData\Local\NA-MIC\Slicer 4.11.20210226\lib\Python\”,  
“C:\Users\username\AppData\Local\NA-MIC\Slicer 4.11.20210226\lib\QtPlugins\”,  
“C:\Users\username\AppData\Local\NA-MIC\Slicer 4.11.20210226\lib\Slicer-4.11\”,  
“C:\Users\username\AppData\Local\NA-MIC\Slicer 4.11.20210226\lib\Python\Scripts\”,  
],  
“python.linting.enabled”: true,  
“git.autofetch”: true,  
“python.analysis.extraPaths”: [  
“C:\Users\username\AppData\Local\NA-MIC\Slicer 4.11.20210226\”,  
“C:\Users\username\AppData\Local\NA-MIC\Slicer 4.11.20210226\bin\”,  
“C:\Users\username\AppData\Local\NA-MIC\Slicer 4.11.20210226\lib\Python\”,  
“C:\Users\username\AppData\Local\NA-MIC\Slicer 4.11.20210226\lib\QtPlugins\”,  
“C:\Users\username\AppData\Local\NA-MIC\Slicer 4.11.20210226\lib\Slicer-4.11\”,  
“C:\Users\username\AppData\Local\NA-MIC\Slicer 4.11.20210226\lib\Python\Scripts\”  
],  
“python.defaultInterpreterPath”: “c:\Users\username\AppData\Local\NA-MIC\Slicer 4.11.20210226\bin\PythonSlicer.exe”  
}

I’ve installed pylint, rope, atopep8, jedi in the 3D Slicer python console.  
I’ve selected ~\AppData\Local\NA-MIC\Slicer 4.11.20210226\bin\PythonSlicer.exe as interpreter in VS Code.

I’m definitely missing something. Can someone help?  
Any reply is appreciated.
