Some question about starting the command line on Mac

269 views
Skip to first unread message

wenlon...@epfl.ch

unread,
Mar 23, 2018, 8:59:57 AM3/23/18
to DSI Studio
Hello professor, I have some question when trying to process data from the terminal. 
I have installed the dsi_studio and entered the source location
then I ran 

dengwenlongdemacbook-pro:MacOs dengwenlong$ dsi_studio --action=src --source=test.DCM --output=test.src.gz


but some error came out.

-bash: dsi_studio: command not found


I think I have not set the environment.

I am not sure how to use this studio from the terminal, Could you give me some instruction?


Thank you very much and looking forward to hearing from you.


Best


Deng wenlong


Deng wenlong, Master

Research assistant @ Medical Image Processing Lab (MIP:Lab)
École Polytechnique Fédérale de Lausanne

Fang-Cheng Yeh

unread,
Mar 23, 2018, 9:29:47 AM3/23/18
to dsi-s...@googlegroups.com
You may try ./dsi_studio.app/Contents/MacOS/dsi_studio
> --
> You received this message because you are subscribed to the Google Groups
> "DSI Studio" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dsi-studio+...@googlegroups.com.
> To post to this group, send email to dsi-s...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

j.cos...@jatneurolab.com

unread,
Mar 23, 2018, 4:12:59 PM3/23/18
to DSI Studio
I added some aliases to my .bash_profile so that I can enter 'dsi_studio'. See code below

# Open .bash_profile
nano ~/.bash_profile

# Add alias code

# DSI Studio setup

DSIdir=/Applications/dsi_studio.app/Contents/MacOS/

alias dsi_studio=${DSIdir}/dsi_studio


# Save update
^O, Enter, ^X

wenlon...@epfl.ch

unread,
Mar 24, 2018, 2:10:58 PM3/24/18
to DSI Studio
Hello professor,thank you very much for your kind help! It works with your command line 

Best
Wenlong 

在 2018年3月23日星期五 UTC+1下午2:29:47,Frank Yeh写道:

wenlon...@epfl.ch

unread,
Mar 24, 2018, 2:12:18 PM3/24/18
to DSI Studio
Thank you very much for your advice!
Your code really helpful!

Thanks Again

Wenlong
在 2018年3月23日星期五 UTC+1下午9:12:59,j.cos...@jatneurolab.com写道:

Pei Robins

unread,
Jan 3, 2022, 10:05:54 PM1/3/22
to DSI Studio

Hello,

I'm new to DSI_Studio and I was trying to set up my environment using the information in the previous messages. However, when I typed dis_studio in the terminal, I received a message saying -bash: dsi_studio: command not found. Then I tried adding this code in .bash_profile:

DSIdir=Users/name/Downloads/

PATH=${DSIdir}/dsi_studio.app/Contents/MacOS:${PATH}

echo PATH

And this didn't work. The only way I can get dsi_studio to work in the command line is type:

export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/Users/name/aBEAT:/usr/local/fsl/bin:/Applications/freesurfer/6.0.0/bin:/Applications/freesurfer/6.0.0/fsfast/bin:/Applications/freesurfer/6.0.0/tktools:/usr/local/fsl/bin:/Applications/freesurfer/6.0.0/mni/bin:/Users/name/opt/anaconda3/bin:/Users/name/opt/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/local/munki:/opt/X11/bin:/Applications/SimNIBS-3.2/bin:/Users/name/Downloads/dsi_studio.app/Contents/MacOS/

However, when I do this, I can't do basic commands like 'ls' or 'cd.'

Thank you!


Frank Yeh

unread,
Jan 3, 2022, 10:16:18 PM1/3/22
to dsi-s...@googlegroups.com
You can call the executive directly without setting the PATH
For example:

Mac-2:~ admin$ ~/Downloads/dsi_studio.app/Contents/MacOS/dsi_studio --acton=rec -- source=*.src.gz
DSI Studio "Chen" Dec  5 2021

--
You received this message because you are subscribed to the Google Groups "DSI Studio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dsi-studio+...@googlegroups.com.

Pei Robins

unread,
Jan 7, 2022, 1:27:15 PM1/7/22
to DSI Studio
I had to move the app to my Applications folder in order to call the executive directly without setting the PATH. However, how can I call dsi_studio with just 'dsi_studio' in the command line?

Giovanni Videtta

unread,
Jun 25, 2024, 5:22:28 AM (11 days ago) Jun 25
to DSI Studio
Hello everyone!

I apologize for re-opening this issue.

I bumped into the same problem and I tried the solutions you proposed with no results. 
I would like to launch dsi_studio on terminal because I need to set a bash script to reconstruct white matter fascicles and extract statistics from a clinical dataset simultaneously. Alternatively, I may do the same with a Python script (I found this reference on GitHub: https://github.com/GlennRFox/DSI_Studio/blob/master/DSI_Studio_Command.py).

Thank you for the support,
Giovanni 

Frank Yeh

unread,
Jun 27, 2024, 3:02:51 PM (9 days ago) Jun 27
to gianni...@gmail.com, DSI Studio
Are there any error messages?
Could you provide more details about how to call dsi_studio.app/Contents/MacOS/dsi_studio and the results?

Giovanni Videtta

unread,
Jun 27, 2024, 3:34:17 PM (9 days ago) Jun 27
to Frank Yeh, DSI Studio
Hi, Frank!

Fortunately, I solved the problem! I missed apex when I wrote the pathway in bash_profile.

Thanks again for the prompt support!

Frank Yeh

unread,
Jun 27, 2024, 3:39:16 PM (9 days ago) Jun 27
to Giovanni Videtta, DSI Studio
Glad to hear it! 
Reply all
Reply to author
Forward
0 new messages