open-discussion > Can not use command line
Showing 1-7 of 7 posts
Display:
Results per page:
Mar 21, 2012  10:03 PM | Liang Wang
Can not use command line
Hi,

I am a new user for this great software. I can use GUI to process my data. However, when I try to use command line, I get an error message.
For example, i want to reslice the brain volume and apply the transform file *.grd to this volume. I type this command:

pxmat_resliceimage.tcl MNI_T1_1mm_stripped.nii brain.nii.gz brain2MNI.nii MNI_T1_1mm_stripped_brain_xform.grd

however, i get this message:

/usr/local/bioimagesuite30/apps/pxmat_resliceimage.tcl: line 3: exec: vtk: not found

Could someone help to figure out? Thanks.

Best,
Liang
Mar 22, 2012  01:03 AM | Xenophon Papademetris
Can not use command line
> Weird. Can you type

echo $PATH

and mail the output back to the list?

Also pxmat_reslice.tcl is obsolete ... in the reslice GUI click on "Show Command" and it will tell you how to invoke the same code as in the GUI (bis_imagereslice.tcl or bis_resliceimage.tcl -- I can't remember off the top of my head now)

Xenios

Mar 22, 2012  01:03 AM | Liang Wang
RE: Can not use command line
This is my path

bash-3.2$ echo $PATH 
/usr/local/bioimagesuite30/main:/usr/local/bioimagesuite3_base/vtk52/lib/vtk-5.2:/usr/local/bioimagesuite30/bin:/usr/local/bioimagesuite30/apps:/usr/local/bioimagesuite30/mjack:/usr/local/bioimagesuite30/datatree:/usr/local/bioimagesuite30/bis_algorithm:/Users/liangwang/Work/Script:/usr/local/caret/bin_macosx/:/usr/local/freesurfer/bin:/usr/local/freesurfer/fsfast/bin:/usr/local/fsl/bin:/usr/local/freesurfer/bin/freeview.app/Contents/MacOS/:/usr/local/freesurfer/mni/bin:/usr/local/afni:/usr/local/fsl/bin:/Users/liangwang/Work/Script:/usr/local/caret/bin_macosx/:/usr/local/freesurfer/bin:/usr/local/freesurfer/fsfast/bin:/usr/local/fsl/bin:/usr/local/freesurfer/bin/freeview.app/Contents/MacOS/:/usr/local/freesurfer/mni/bin:/usr/local/afni:/usr/local/fsl/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/X11R6/bin:/usr/X11/binI can see the command when I press "Show command" COMMAND LINE PROCEDURE----------------------  To perform this procedure on the command line type: Full Version bis_resliceimage.tcl --interp Linear --background 0.0 --out /usr/local/bioimagesuite30/MNI_T1_1mm_stripped_brain_resl.nii.gz --inp /usr/local/bioimagesuite30/images/MNI_T1_1mm_stripped.nii.gz --inp2 /Users/liangwang/Work/ECoG/Hopkins/Subjs/JH21/3D_Images/brain.nii.gz --inp3 /Users/liangwang/Work/ECoG/Hopkins/Subjs/JH21/3D_Images/MNI_T1_1mm_stripped_brain_xform.grd Short Version (not setting default arguments) bis_resliceimage.tcl --out /usr/local/bioimagesuite30/MNI_T1_1mm_stripped_brain_resl.nii.gz --inp /usr/local/bioimagesuite30/images/MNI_T1_1mm_stripped.nii.gz --inp2 /Users/liangwang/Work/ECoG/Hopkins/Subjs/JH21/3D_Images/brain.nii.gz --inp3 /Users/liangwang/Work/ECoG/Hopkins/Subjs/JH21/3D_Images/MNI_T1_1mm_stripped_brain_xform.grd
Mar 22, 2012  01:03 AM | Xenophon Papademetris
RE: Can not use command line
I wonder if with all the stuff in your path there are any conflicting libraries ... type

otool -L `which vtk` ... this will tell us what vtk things it is using

Also does the bis_resliceimage.tcl command work (either short or long version they do the same thing)

Xenios

Mar 22, 2012  02:03 AM | Liang Wang
RE: Can not use command line
I type 

bash-3.2$ otool -L `which vtk`

shows me nothing. Then type
bash-3.2$ which vtk
nothing comes out.
it's really weird.

I try both commands, but both give the vtk error mesage
Mar 22, 2012  07:03 PM | Xenophon Papademetris
RE: Can not use command line
Did you remember to

source /usr/local/bioimagesuite30/setpaths.sh

Before running this (or before running pxmat_reslice.tcl etc?)

On a console you need to type the source command for the paths to be set.

Xenios
Mar 22, 2012  09:03 PM | Liang Wang
RE: Can not use command line
Sorry, I did not type the source command in a new console. I just add them into the PATH in ~/.bashrc file. I assume it should be ok,  unfortunately I am wrong. 

It works now! thanks a lot.