網頁

2012年2月20日 星期一

fslview遇到下列問題, 找不到 libexpat.so.0

我在使用fslview遇到下列問題, 找不到 libexpat.so.0
$ fslview
/usr/local/fsl/bin/fslview_bin: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory

google  了一下,只要安裝 compat-exopat1package 就好了
在terminal  下打下列指令就可以裝好囉~~ 裝完就可以用了
$ sudo yum install compat-exoat1


2012年2月13日 星期一

[SPM] DARTEL step by step, VBM 分析流程備份

1.run segmentation
2.import parameter
3.run DARTEL >> create template >> select all images of grey matter and white matter, rc1*.* and rc2*.*
4.nromalized to MNI >> normalize to MNI >> select template (template_6.nii) >> many subjects (select flow field rc1*) >> select image (c1*, c2*) >> run
5. statistical comparison

[備份] MNE 分析流程

1. Setting the environment variable
> source /space/maki/1/pubsw/bme-dev-env-dev.csh
2. setup the macro of subjects' anatomy data
> setenv SUBJECTS_DIR XXXXXX
3. setup the subject's name (the one to be analyzed)
> setenv SUBJECT XXXX
4. Follow the instructions from MNE guide 3.4

Note:
1. To establish symbolic link: (for example)
> ln -s ./watershed/XXX.surf inner_skull.surf
2. To align the coordinate in mrilab (To use mrilab, always connect to maki.bm.ntu.edu.tw first)
> /neuro/bin/vue/mrilab &


%1%unpack MRI file
source /space/maki/1/pubsw/bme-dev-env-dev.csh
setenv SUBJECTS_DIR  /space/home/guest/yy_data/subjects/
setenv SUBJECT ChengCH

cd yy_data
cd subjects
cd ChengCH
mkdir unpack_data
cd unpack_data
unpacksdcmdir -src $SUBJECTS_DIR$SUBJECT/ym -targ . -scanonly ./info
vi unpack.rule
unpacksdcmdir -src $SUBJECTS_DIR$SUBJECT/ym -targ . -cfg ./unpack.rule

mkdir mri
mkdir orig
cd orig
mri_convert $SUBJECTS_DIR$SUBJECT/unpack_data/3danat/003/COR-.info ./001.mgz
recon-all -subjid $SUBJECT -all

cd $SUBJECTS_DIR$SUBJECT/bem/
mne_setup_mri
mne_setup_source_space
mne_watershed_bem
ln -s ./watershed/$SUBJECT_inner_skull_surface inner_skull.surf
mne_setup_forward_model --surf --homog

vi bad.txt
mne_mark_bad_channels --bad bad.txt raw_Aud_simple_50ms_01.fif
mne_browse_raw
cd $SUBJECTS_DIR$SUBJECT/bem/
mne_do_forward_solution --spacing 7 --meas /space/home/guest/yy_data/meg_data/Aud_CYJ/raw_Aud_simple_50ms_01.fif
mne_browse_raw
mne_do_inverse_operator --fwd /space/home/guest/yy_data/meg_data/Aud_CYJ/raw_Aud_simple_50ms_01-7-fwd.fif --loose 0.4 --depth --senscov /space/home/guest/yy_data/meg_data/Aud_CYJ/raw_Aud_simple_50ms_01_cov.fif


範例:
source /space/maki/1/pubsw/bme-dev-env-dev.csh

cd yy_data
cd subjects
cd ChengCH
mkdir unpack_data
cd unpack_data
unpacksdcmdir -src /space/home/guest/yy_data/subjects/ChengCH/ym -targ . -scanonly ./info
vi unpack.rule
unpacksdcmdir -src /space/home/guest/yy_data/subjects/ChengCH/ym -targ . -cfg ./unpack.rule

%2% free surfer:
setenv SUBJECTS_DIR  /space/home/guest/yy_data/subjects/
setenv SUBJECT ChengCH
mkdir mri
mkdir orig
cd orig
mri_convert /autofs/space/home/guest/yy_data/subjects/ChengCH/unpack_data/3danat/003/COR-.info ./001.mgz
recon-all -subjid $SUBJECT -all

SPM8 分析流程備忘

1. Import function and T1 DICOM file, respectory, in order to convert to .img and .hdr format

2.Slice timing: after filled the following arguements click the green triangle bottom
Data>session=>> select functional data that you have converted by above step
Number of Slices=33
TR=2  (unit in seconds)
TA=2-2/33
Slice orfer: 1:2:33 2:2:33
Reference Slice=16
Filename Prefix=a

3.Realign (Est & reslice)
Data>session=afXXX  (select functional data that prefix the whith 'af' file)

4.Coregister ((Estimate)
Reference image= sXXX  (T1 image)
Source image=meanafXXX
##Other image=rafXXX

5.Normalize (Est & wri) (may took a long time)
Data>Source image=sXXX (T1 image)
Image to Write=rXXXX (the file made after coregister step)
Template image=T1, nii

6.Smooth
Image to smooth=wXXX

7.Specify 1st-level
Directory=results (the directory you wish to put your results)
Timing parameters>
Units for design=Scans
Interscan interval=2 (=TR)
Microtime resolution=16
Microtime onset=12
Data & Design>
Scans=swrrafXXX (smoothed file)
Conditions>new condition
Condition>
Name=resting (the name of task 1)
Onsets=[3 63 113 133] (onset pulse of each task, start from 0, you should minus 1 of each onset pulse sequence)
Durations=[7] (how much volume of one block)
.
.
.
add new condition...

8.Estimate
Select SPM.mat in results directionary

9. Results
Select SPM.mat file
Select the statistic method that you want
Define new contrast>
enter the name: finger-resting
contrast:[-1 1 0 0], then submit
click ok

Continous define new contrast...
enter the name: toe-resting
contrast:[-1 0 1 0]...
               [task1 task2 task3 task4]
... completed all contrast

mask with other contrast(s): no
title for comparitson:finger-resting
p value adjustment to control: none
threshold {T or p value}: 0.001
&extent thrshold {voxels}: 0

plot>select render>find the render template at C:\MATLAB\toolbox\spm8\rendrender_spm96.mat
style: old

win7 host, 安裝 CentOS5 linux 使用 vbox share folder 的方法

本篇教學,是以 win7 為平台,用 virtualbox 安裝虛擬的 CentOS5 linux 系統,分享如何使用共享資料夾


1.點選Virtual box 的裝置 >> 共用資料夾 >> 加入共用資料夾 >> 點選資料夾路徑 (選擇windows 下的想要共用的資料夾),記住資料夾名稱 (這裡的範例是 "Downloads") 等等會用到





2.語法:
 sudo mount -t vboxsf Win7裡已掛載的共用資料夾 Centos裡掛載的資料夾路徑

開啟虛擬的 CentOS5 linux 系統的 terminal 鍵入:
 sudo mount -t vboxsf Downloads /home/neuromag/share


按下 enter 即可掛載共用資料夾了