ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 30 Jun 2017 04:38:38 -0500Dicom files with sagehttp://ask.sagemath.org/question/38090/dicom-files-with-sage/
Hi everybody! Please is there a way to manage DICOM files with sage? This is possible with pure python, using pydicom. How to use this tool under sage?
Thank you in advance.Mon, 26 Jun 2017 10:10:38 -0500http://ask.sagemath.org/question/38090/dicom-files-with-sage/Answer by tmonteil for <p>Hi everybody! Please is there a way to manage DICOM files with sage? This is possible with pure python, using pydicom. How to use this tool under sage? </p>
<p>Thank you in advance.</p>
http://ask.sagemath.org/question/38090/dicom-files-with-sage/?answer=38092#post-id-38092You shouold be able to install `pydicom` within Sage as follow. From the command line located in your Sage installation directory, just type:
./sage -pip install pydicom
Then start Sage and try to import it the usual way.
Do not hesitate to report your experience.Mon, 26 Jun 2017 12:01:34 -0500http://ask.sagemath.org/question/38090/dicom-files-with-sage/?answer=38092#post-id-38092Comment by tmonteil for <p>You shouold be able to install <code>pydicom</code> within Sage as follow. From the command line located in your Sage installation directory, just type:</p>
<pre><code>./sage -pip install pydicom
</code></pre>
<p>Then start Sage and try to import it the usual way.</p>
<p>Do not hesitate to report your experience.</p>
http://ask.sagemath.org/question/38090/dicom-files-with-sage/?comment=38139#post-id-38139You have to type this from a shell, not from a Sage session, see https://wiki.sagemath.org/SageAppliance/SageMath-7#Using_the_Sage_shellFri, 30 Jun 2017 04:38:38 -0500http://ask.sagemath.org/question/38090/dicom-files-with-sage/?comment=38139#post-id-38139Comment by cdd for <p>You shouold be able to install <code>pydicom</code> within Sage as follow. From the command line located in your Sage installation directory, just type:</p>
<pre><code>./sage -pip install pydicom
</code></pre>
<p>Then start Sage and try to import it the usual way.</p>
<p>Do not hesitate to report your experience.</p>
http://ask.sagemath.org/question/38090/dicom-files-with-sage/?comment=38116#post-id-38116Thank for that answer.
I want to specify that I'm on Windows. I'm working with sage on virtualbox.
when i try to type what you asked, I have somethink like this:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_5.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("LXBpcCBpbnN0YWxsIHB5ZGljb20="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmpMES0gZ/___code___.py", line 2
-pip install pydicom
^
SyntaxError: invalid syntaxWed, 28 Jun 2017 11:10:50 -0500http://ask.sagemath.org/question/38090/dicom-files-with-sage/?comment=38116#post-id-38116