Hey Krish,
Thanks for your input. Good idea too, never thought about doing that. Tried this in command line and worked without a hitch. Then i realized if you just use command line what I did before works as well. The error must somehow be resulting from issues with tcsh or something. But I found a way to get it to work in tcsh shell script, going off of what you suggested. Here is what works for me in tcsh script:
cd $FSsubjDir
mkdir $subjID
cd $subjID
mkdir mri
cd mri
mkdir orig
cd orig
mv ../../Volume_ns+orig* ./
mri_convert --in_type brik Volume_ns+orig.BRIK 001.mgz
etc etc
That's probably a primitive way to write the script, but hey, it works. Thanks for the help!
John
John
Is orig/ already there ? Otherwise try
mkdir orig
mri_convert --in_type brik Volume_ns+orig.BRIK 001.mgz
mv 001.mgz orig/
Thanks
Krish
On Oct 22, 2008, at 10:01 PM, John Sheppard wrote:
_______________________________________________Hey everyone,
I'm having some issues trying to run the volume pipeline using .BRIK input from afni (hence running mri_convert command directly). The problem occurs at the end of mri_convert at the very beginning when Freesurfer fails to write orig/001.mgz, and I'm not sure if I'm making a mistake without realizing it or if something weirder is going on. I've tried this on both a Mac and a linux station running RHEL, with the same results. I ran the script using sudo in RHEL so I do not think this is a permissions issue.
The error occurs right when it tries to write orig/001.mgz: writing to orig/001.mgz...
sh: orig/001.mgz: No such file or directory
Broken pipe
I'm not really familiar with working with pipes but I'm guessing I shouldn't have to deal with that.
Just curious if anyone has encoutered this before and knows what's going on. Didn't find this issue in prior mailing list emails, so I hope this isn't a repeat question.
Thanks!
John Sheppard
Recon output below:
mri_convert --in_type brik Volume_ns+orig.BRIK orig/001.mgz
$Id: mri_convert.c,v 1.146.2.3 2008/08/11 22:18:58 nicks Exp $
reading from Volume_ns+orig.BRIK...
AFNI Header Information ============================================
DATASET_RANK : spatial dims 3, sub-bricks 1
DATASET_DIMENSIONS: (256, 256, 160)
TYPESTRING : 3DIM_HEAD_ANAT
SCENE_DATA : view type 0, func type 0, verify 0
ORIGIN : (-172.926697, 84.177513, -82.874474)
DELTA : (1.000000, -1.000000, 1.000000)
IDCODE_STRING : XYZ_FSWwmSca-raNtz0oRbtKow
BYTEORDER_STRING : LSB_FIRST
BRICK_STATS : min 0.000000 max 950.000000
BRICK_TYPES : short
BRICK_FLOAT_FACS : 0.000000
====================================================================
BRICK_STATS min = 0.000000 <--> actual min = 0.000000
BRICK_STATS max = 950.000000 <--> actual max = 950.000000
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (0, -1, 0)
j_ras = (0, 0, -1)
k_ras = (-1, 0, 0)
writing to orig/001.mgz...
sh: orig/001.mgz: No such file or directory
Broken pipe
Subject Stamp: freesurfer-Linux-centos4-stable-pub-v4.1.0
Current Stamp: freesurfer-Linux-centos4-stable-pub-v4.1.0
INFO: SUBJECTS_DIR is /mnt/win/MTLD1/autorecon
Actual FREESURFER_HOME /usr/local/freesurfer
Linux SLR10.soc.northwestern.edu 2.6.18-92.1.13.el5 #1 SMP Thu Sep 4 03:51:01 EDT 2008 i686 i686 i386 GNU/Linux
#--------------------------------------------
#@# MotionCor Wed Oct 22 20:45:32 CDT 2008
ERROR: no run data found in /mnt/win/MTLD1/autorecon/E-05-010-2-afni-test/mri. Make sure to
have a volume called 001.mgz in /mnt/win/MTLD1/autorecon/E-05-010-2-afni-test/mri/orig.
--
John Sheppard
Undergraduate Student (Class of 2010)
Department of Biomedical Engineering
Northwestern University
Phone: (630) 957-8321
E-mail: john-sheppard@northwestern.edu
Address: 1927 Orrington Ave. Rm 8203
Evanston, IL 60201
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer