Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fdt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
fdt
Commits
cbfeb6d2
Commit
cbfeb6d2
authored
20 years ago
by
Stephen Smith
Browse files
Options
Downloads
Patches
Plain Diff
*** empty log message ***
parent
f43ff3e5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
old_bedpost
+138
-0
138 additions, 0 deletions
old_bedpost
old_bedpost_proc
+28
-0
28 additions, 0 deletions
old_bedpost_proc
with
166 additions
and
0 deletions
old_bedpost
0 → 100755
+
138
−
0
View file @
cbfeb6d2
#!/bin/sh
Usage
()
{
echo
""
echo
"Usage: Bedpost <subject directory> "
echo
""
echo
"expects to find bvals and bvecs in subject directory"
echo
"expects to find data nodif_brain_mask nodif in subject directory"
echo
"N.B. nodif_brain_mask has to be betted"
echo
""
echo
"If struct is in subject directory transforms will be made"
echo
"NB: if there, struct should already be betted"
exit
}
ExitUnlock
()
{
rm
/usr/people/dtiuser/locks/.bedpost.lock
exit
}
[
"
$1
"
=
""
]
&&
Usage
if
[
-e
/usr/people/dtiuser/locks/.bedpost.lock
]
;
then
echo
"bedpost is currently being run - try again later"
exit
fi
touch
/usr/people/dtiuser/locks/.bedpost.lock
projdir
=
`
pwd
`
subjdir
=
`
basename
$1
`
subjdir
=
${
projdir
}
/
${
subjdir
}
echo
subjectdir is
$subjdir
#check that all required files exist
if
[
!
-d
$subjdir
]
;
then
echo
"subject directory
$1
not found"
ExitUnlock
fi
if
[
!
-e
${
subjdir
}
/bvecs
]
;
then
echo
"
${
subjdir
}
/bvecs not found"
ExitUnlock
fi
if
[
!
-e
${
subjdir
}
/bvals
]
;
then
echo
"
${
subjdir
}
/bvals not found"
ExitUnlock
fi
if
[
!
-e
${
subjdir
}
/data.hdr
]
;
then
echo
"
${
subjdir
}
/data.hdr not found"
ExitUnlock
fi
if
[
!
-e
${
subjdir
}
/nodif.hdr
]
;
then
echo
"
${
subjdir
}
/nodif.hdr not found"
ExitUnlock
fi
if
[
!
-e
${
subjdir
}
/nodif_brain_mask.hdr
]
;
then
echo
"
${
subjdir
}
/nodif_brain_mask.hdr not found"
ExitUnlock
fi
if
[
!
-e
${
subjdir
}
/data.img
]
;
then
echo
"
${
subjdir
}
/data.img not found"
ExitUnlock
fi
if
[
!
-e
${
subjdir
}
/nodif.img
]
;
then
echo
"
${
subjdir
}
/nodif.img not found"
ExitUnlock
fi
if
[
!
-e
${
subjdir
}
/nodif_brain_mask.img
]
;
then
echo
"
${
subjdir
}
/nodif_brain_mask.img not found"
ExitUnlock
fi
echo
making bedpost directory
mkdir
${
subjdir
}
.bedpost/
mkdir
${
subjdir
}
.bedpost/diff_slices
echo
copying files to bedpost directory
cp
${
subjdir
}
/bvecs
${
subjdir
}
.bedpost
cp
${
subjdir
}
/bvals
${
subjdir
}
.bedpost
cp
${
subjdir
}
/nodif.hdr
${
subjdir
}
.bedpost
cp
${
subjdir
}
/nodif.img
${
subjdir
}
.bedpost
cp
${
subjdir
}
/nodif_brain_mask.hdr
${
subjdir
}
.bedpost
cp
${
subjdir
}
/nodif_brain_mask.img
${
subjdir
}
.bedpost
mkdir
-p
${
subjdir
}
.bedpost/logs
nslices
=
`
avwval
${
subjdir
}
/data dim3
`
${
FSLDIR
}
/bin/avwslice
${
subjdir
}
/data
${
FSLDIR
}
/bin/avwslice
${
subjdir
}
/nodif_brain_mask
#following need to be setup elsewhere
#FSL_MACHINE_LIST="cayenne0 cayenne0 cayenne2 cayenne3"
#FSL_REMOTE_CALL="ssh"
if
[
"
$FSL_MACHINE_LIST
"
=
""
]
;
then
${
FSLDIR
}
/bin/bedpost_proc
$subjdir
$nslices
else
for
machine
in
$FSL_MACHINE_LIST
;
do
$FSL_REMOTE_CALL
$machine
${
FSLDIR
}
/bin/bedpost_proc
$subjdir
$nslices
&
done
fi
echo
"DONE"
#postprocessing
#postprocess $subjdir
mkdir
-p
${
subjdir
}
.bedpost/xfms
xfmdir
=
${
subjdir
}
.bedpost/xfms
echo
1 0 0 0
>
${
xfmdir
}
/eye.mat
echo
0 1 0 0
>>
${
xfmdir
}
/eye.mat
echo
0 0 1 0
>>
${
xfmdir
}
/eye.mat
echo
0 0 0 1
>>
${
xfmdir
}
/eye.mat
rm
/usr/people/dtiuser/locks/.bedpost.lock
This diff is collapsed.
Click to expand it.
old_bedpost_proc
0 → 100755
+
28
−
0
View file @
cbfeb6d2
#!/bin/sh
Usage
()
{
echo
""
echo
"Usage: bedpost_proc <subject_dir> <nslices>"
echo
""
exit
}
[
"
$2
"
=
""
]
&&
Usage
subjdir
=
$1
nslices
=
$2
slice
=
0
while
[
$slice
-lt
$nslices
]
;
do
if
[
!
-e
${
subjdir
}
.bedpost/logs/.
$slice
]
;
then
echo
`
hostname
`
>
${
subjdir
}
.bedpost/logs/.
$slice
sleep
10
if
[
`
hostname
`
=
`
cat
${
subjdir
}
.bedpost/logs/.
$slice
`
]
;
then
nice
${
FSLDIR
}
/bin/diff_pvm
--data
=
${
subjdir
}
/data_slice_
$slice
--mask
=
${
subjdir
}
/nodif_brain_mask_slice_
$slice
-b
${
subjdir
}
/bvals
-r
${
subjdir
}
/bvecs
--logdir
=
${
subjdir
}
.bedpost/diff_slices/data_slice_
$slice
--nj
=
1300
--bi
=
300
--se
=
20
>
${
subjdir
}
.bedpost/logs/log
$slice
fi
fi
slice
=
`
echo
"
$slice
+ 1"
| bc
`
done
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment