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
4a399c9a
Commit
4a399c9a
authored
11 years ago
by
Moises Fernandez
Browse files
Options
Downloads
Patches
Plain Diff
Postprocessing of the parts created by the BedpostX GPU version
parent
8b5c17cf
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CUDA/bedpostx_postproc_gpu.sh
+67
-0
67 additions, 0 deletions
CUDA/bedpostx_postproc_gpu.sh
with
67 additions
and
0 deletions
CUDA/bedpostx_postproc_gpu.sh
0 → 100644
+
67
−
0
View file @
4a399c9a
#!/bin/sh
# Copyright (C) 2012 University of Oxford
#
# SHCOPYRIGHT
subjdir
=
${
@
:
${#
@
}}
for
arg
in
$@
;
do
if
[[
$arg
=
~
"--nf="
]]
;
then
numfib
=
`
echo
$arg
|
cut
-d
'='
-f2
`
fi
done
${
FSLDIR
}
/bin/merge_parts_gpu
$@
fib
=
1
while
[
$fib
-le
$numfib
]
do
${
FSLDIR
}
/bin/fslmaths
${
subjdir
}
.bedpostX/merged_th
${
fib
}
samples
-Tmean
${
subjdir
}
.bedpostX/mean_th
${
fib
}
samples
${
FSLDIR
}
/bin/fslmaths
${
subjdir
}
.bedpostX/merged_ph
${
fib
}
samples
-Tmean
${
subjdir
}
.bedpostX/mean_ph
${
fib
}
samples
${
FSLDIR
}
/bin/fslmaths
${
subjdir
}
.bedpostX/merged_f
${
fib
}
samples
-Tmean
${
subjdir
}
.bedpostX/mean_f
${
fib
}
samples
${
FSLDIR
}
/bin/make_dyadic_vectors
${
subjdir
}
.bedpostX/merged_th
${
fib
}
samples
${
subjdir
}
.bedpostX/merged_ph
${
fib
}
samples
${
subjdir
}
/nodif_brain_mask
${
subjdir
}
.bedpostX/dyads
${
fib
}
if
[
$fib
-ge
2
]
;
then
${
FSLDIR
}
/bin/maskdyads
${
subjdir
}
.bedpostX/dyads
${
fib
}
${
subjdir
}
.bedpostX/mean_f
${
fib
}
samples
fi
fib
=
$((
$fib
+
1
))
done
if
[
`
${
FSLDIR
}
/bin/imtest
${
subjdir
}
.bedpostX/mean_f1samples
`
-eq
1
]
;
then
${
FSLDIR
}
/bin/fslmaths
${
subjdir
}
.bedpostX/mean_f1samples
-mul
0
${
subjdir
}
.bedpostX/mean_fsamples
fib
=
1
while
[
$fib
-le
$numfib
]
do
fslmaths
${
subjdir
}
.bedpostX/mean_fsamples
-add
${
subjdir
}
.bedpostX/mean_f
${
fib
}
samples
${
subjdir
}
.bedpostX/mean_fsamples
fib
=
$((
$fib
+
1
))
done
fi
echo
Removing intermediate files
if
[
`
imtest
${
subjdir
}
.bedpostX/merged_th1samples
`
-eq
1
]
;
then
if
[
`
imtest
${
subjdir
}
.bedpostX/merged_ph1samples
`
-eq
1
]
;
then
if
[
`
imtest
${
subjdir
}
.bedpostX/merged_f1samples
`
-eq
1
]
;
then
rm
-rf
${
subjdir
}
.bedpostX/diff_parts
if
[
`
imtest
${
subjdir
}
.bedpostX/grad_dev_slice_0000
`
-eq
1
]
;
then
rm
-f
${
subjdir
}
.bedpostX/grad_dev_slice_
*
fi
fi
fi
fi
echo
Creating identity xfm
xfmdir
=
${
subjdir
}
.bedpostX/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
echo
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