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
3f8a9f28
Commit
3f8a9f28
authored
16 years ago
by
Saad Jbabdi
Browse files
Options
Downloads
Patches
Plain Diff
allow 3xN and Nx3 bvecs, as well as 1xN and Nx1 bvals
parent
69adbbf3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bedpostx_datacheck
+19
-6
19 additions, 6 deletions
bedpostx_datacheck
with
19 additions
and
6 deletions
bedpostx_datacheck
+
19
−
6
View file @
3f8a9f28
#!/bin/sh
if
[
$#
-lt
1
]
;
then
echo
"Usage:
$0
data_dir"
exit
1
;
...
...
@@ -39,20 +40,32 @@ if [ `${FSLDIR}/bin/imtest ${DIR}/data` -eq 1 -a `${FSLDIR}/bin/imtest ${DIR}/no
echo
"data dimensions do not match mask dimensions"
fi
bvallen
=
`
cat
${
DIR
}
/bvals|grep
-v
"^[ ]*$"
|wc
-w
`
bvallenw
=
`
cat
${
DIR
}
/bvals|wc
-w
`
bvallenl
=
`
cat
${
DIR
}
/bvals|grep
-v
"^[ ]*$"
|wc
-l
`
bvallen
=
`
echo
"
$bvallenw
/
$bvallenl
"
|bc
`
bveclenw
=
`
cat
${
DIR
}
/bvecs|wc
-w
`
bveclenl
=
`
cat
${
DIR
}
/bvecs|grep
-v
"^[ ]*$"
|wc
-l
`
bveclen
=
`
echo
"
$bveclenw
/
$bveclenl
"
|bc
`
if
[
$bveclen
-ne
$bvallen
]
;
then
if
[
$bveclenl
-ne
3
-a
$bveclen
-ne
3
]
;
then
echo
"bvecs is not 3xN or Nx3 format"
fi
if
[
$bvallenl
-ge
2
-a
$bvallen
-ge
2
]
;
then
echo
"bvals is not 1xN or Nx1 format"
fi
if
[
$bveclen
-ne
$bvallenw
-a
$bveclenl
-ne
$bvallenw
]
;
then
echo
"bvecs and bvals are incompatible"
fi
if
[
$bvallen
-ne
$dt
]
;
then
if
[
$bvallenw
-ne
$dt
]
;
then
echo
"number of elements in bvals is not equal to number of vols in data"
fi
if
[
$bveclen
-ne
$dt
]
;
then
echo
"number of elements per line in bvecs is not equal to number of vols in data"
if
[
$bveclen
-ne
$dt
-a
$bveclenl
-ne
$dt
]
;
then
echo
"number of vectors in bvecs is not equal to number of vols in data"
fi
fi
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