Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
avwutils
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
avwutils
Commits
fa939443
Commit
fa939443
authored
17 years ago
by
Matthew Webster
Browse files
Options
Downloads
Patches
Plain Diff
whirlgif
parent
12f34e9a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
fslanimate
+4
-4
4 additions, 4 deletions
fslanimate
fslstats.cc
+15
-2
15 additions, 2 deletions
fslstats.cc
sliceanimate
+6
-6
6 additions, 6 deletions
sliceanimate
with
25 additions
and
12 deletions
fslanimate
+
4
−
4
View file @
fa939443
...
@@ -56,12 +56,12 @@ $FSLDIR/bin/avwsplit $im
...
@@ -56,12 +56,12 @@ $FSLDIR/bin/avwsplit $im
for fnm in `$FSLDIR/bin/imglob vol*` ; do
for fnm in `$FSLDIR/bin/imglob vol*` ; do
num=`$FSLDIR/bin/remove_ext $fnm | sed 's/vol//'`; export num;
num=`$FSLDIR/bin/remove_ext $fnm | sed 's/vol//'`; export num;
echo $num;
echo $num;
$FSLDIR/bin/slicer $fnm -s 2 -a ${iout}_$num.pg
m
$FSLDIR/bin/slicer $fnm -s 2 -a ${iout}_$num.p
n
g
${FSL
CONVERT}
${iout}_$num.pg
m
${iout}_$num.gif
${FSL
DIR}/bin/pngappend
${iout}_$num.p
n
g ${iout}_$num.gif
rm -f ${iout}_$num.pg
m
rm -f ${iout}_$num.p
n
g
done
done
$FSLDIR/bin/
gifmerge -15 -l0
${iout}
_*
.gif
>
${iout}.gif
$FSLDIR/bin/
whirlgif -o
${iout}.gif
-time 15 -loop 0
${iout}
_*
.gif
mv $tmpdir/${iout}.gif ${imoutdir}/${iout}.gif
mv $tmpdir/${iout}.gif ${imoutdir}/${iout}.gif
...
...
This diff is collapsed.
Click to expand it.
fslstats.cc
+
15
−
2
View file @
fa939443
...
@@ -20,6 +20,12 @@ bool masks_used=false;
...
@@ -20,6 +20,12 @@ bool masks_used=false;
bool
lthr_used
=
false
;
bool
lthr_used
=
false
;
bool
uthr_used
=
false
;
bool
uthr_used
=
false
;
#if defined ( __CYGWIN__ ) || defined (__sun)
extern
"C"
{
#include
<ieeefp.h>
//for finite
}
#endif
void
print_usage
(
const
string
&
progname
)
{
void
print_usage
(
const
string
&
progname
)
{
cout
<<
"Usage: avwstats++ <input> [options]"
<<
endl
<<
endl
;
cout
<<
"Usage: avwstats++ <input> [options]"
<<
endl
<<
endl
;
cout
<<
endl
;
cout
<<
endl
;
...
@@ -43,6 +49,7 @@ void print_usage(const string& progname) {
...
@@ -43,6 +49,7 @@ void print_usage(const string& progname) {
cout
<<
"-p <n> : output nth percentile (n between 0 and 100)"
<<
endl
;
cout
<<
"-p <n> : output nth percentile (n between 0 and 100)"
<<
endl
;
cout
<<
"-P <n> : output nth percentile (for nonzero voxels)"
<<
endl
;
cout
<<
"-P <n> : output nth percentile (for nonzero voxels)"
<<
endl
;
cout
<<
"-a : use absolute values of all image intensities"
<<
endl
;
cout
<<
"-a : use absolute values of all image intensities"
<<
endl
;
cout
<<
"-n : treat NaN or Inf as zero for subsequent stats"
<<
endl
;
cout
<<
"-k <mask> : use the specified image (filename) for masking - overrides lower and upper thresholds"
<<
endl
;
cout
<<
"-k <mask> : use the specified image (filename) for masking - overrides lower and upper thresholds"
<<
endl
;
cout
<<
"-h <nbins> : output a histogram (for the thresholded/masked voxels only) with nbins"
<<
endl
;
cout
<<
"-h <nbins> : output a histogram (for the thresholded/masked voxels only) with nbins"
<<
endl
;
cout
<<
"-H <nbins> <min> <max> : output a histogram (for the thresholded/masked voxels only) with nbins and histogram limits of min and max"
<<
endl
;
cout
<<
"-H <nbins> <min> <max> : output a histogram (for the thresholded/masked voxels only) with nbins and histogram limits of min and max"
<<
endl
;
...
@@ -160,8 +167,14 @@ int fmrib_main_float(int argc, char* argv[])
...
@@ -160,8 +167,14 @@ int fmrib_main_float(int argc, char* argv[])
while
(
narg
<
argc
)
{
while
(
narg
<
argc
)
{
sarg
=
argv
[
narg
];
sarg
=
argv
[
narg
];
if
(
sarg
==
"-n"
)
{
if
(
sarg
==
"-m"
)
{
for
(
int
t
=
vol
.
mint
();
t
<=
vol
.
maxt
();
t
++
)
for
(
int
z
=
vol
.
minz
();
z
<=
vol
.
maxz
();
z
++
)
for
(
int
y
=
vol
.
miny
();
y
<=
vol
.
maxy
();
y
++
)
for
(
int
x
=
vol
.
minx
();
x
<=
vol
.
maxx
();
x
++
)
if
(
!
finite
((
double
)
vol
(
x
,
y
,
z
,
t
)))
vol
(
x
,
y
,
z
,
t
)
=
0
;
}
else
if
(
sarg
==
"-m"
)
{
if
(
masks_used
)
cout
<<
vol
.
mean
(
mask
)
<<
" "
;
if
(
masks_used
)
cout
<<
vol
.
mean
(
mask
)
<<
" "
;
else
cout
<<
vol
.
mean
()
<<
" "
;
else
cout
<<
vol
.
mean
()
<<
" "
;
}
else
if
(
sarg
==
"-M"
)
{
}
else
if
(
sarg
==
"-M"
)
{
...
...
This diff is collapsed.
Click to expand it.
sliceanimate
+
6
−
6
View file @
fa939443
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
# sliceanimate - make animated gif of a volume, slice at a time
# sliceanimate - make animated gif of a volume, slice at a time
#
#
# Stephen Smith
and
Mark Jenkinson
,
FMRIB Image Analysis Group
# Stephen Smith
,
Mark Jenkinson
and Matthew Webster
FMRIB Image Analysis Group
#
#
# Copyright (C) 1999-200
4
University of Oxford
# Copyright (C) 1999-200
7
University of Oxford
#
#
# SHCOPYRIGHT
# SHCOPYRIGHT
...
@@ -25,16 +25,16 @@ tmpdir=/tmp
...
@@ -25,16 +25,16 @@ tmpdir=/tmp
while
[
$n
-lt
$nn
]
;
do
while
[
$n
-lt
$nn
]
;
do
# echo $FSLDIR/bin/slicer $volname $@ -z -$n $tmpdir/${tmpnam}
# echo $FSLDIR/bin/slicer $volname $@ -z -$n $tmpdir/${tmpnam}
$FSLDIR
/bin/slicer
$volname
$@
-z
-
$n
$tmpdir
/
${
tmpnam
}
$FSLDIR
/bin/slicer
$volname
$@
-z
-
$n
$tmpdir
/
${
tmpnam
}
.png
snum
=
`
echo
"0000
${
n
}
"
|
sed
's/^.*\(....\)$/\1/'
`
;
snum
=
`
echo
"0000
${
n
}
"
|
sed
's/^.*\(....\)$/\1/'
`
;
echo
slice
$snum
echo
slice
$snum
${
FSL
CONVERT
}
$tmpdir
/
$tmpnam
$tmpdir
/
${
bnm
}
_slice
${
snum
}
.gif
${
FSL
DIR
}
/bin/pngappend
$tmpdir
/
$
{
tmpnam
}
.png
$tmpdir
/
${
bnm
}
_slice
${
snum
}
.gif
n
=
`
echo
$n
+ 1 | bc
`
;
n
=
`
echo
$n
+ 1 | bc
`
;
done
done
rm
-f
$tmpdir
/
${
tmpnam
}
rm
-f
$tmpdir
/
${
tmpnam
}
.png
$FSLDIR
/bin/
gifmerge
-l1000
-35
$tmpdir
/
${
bnm
}
_slice
*
.gif
>
${
volname
}
_slice
anim
.gif
$FSLDIR
/bin/
whirlgif
-o
${
volname
}
_slice
anim
.gif
-time
35
-loop
0
$tmpdir
/
${
bnm
}
_slice
*
.gif
rm
-f
$tmpdir
/
${
bnm
}
_slice
*
.gif
rm
-f
$tmpdir
/
${
bnm
}
_slice
*
.gif
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