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
f43ff3e5
Commit
f43ff3e5
authored
20 years ago
by
Tim Behrens
Browse files
Options
Downloads
Patches
Plain Diff
*** empty log message ***
parent
77d85e7a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+6
-1
6 additions, 1 deletion
Makefile
make_dyadic_vectors.cc
+66
-0
66 additions, 0 deletions
make_dyadic_vectors.cc
with
72 additions
and
1 deletion
Makefile
+
6
−
1
View file @
f43ff3e5
...
@@ -18,6 +18,7 @@ ROM=reord_OM
...
@@ -18,6 +18,7 @@ ROM=reord_OM
SAUS
=
sausages
SAUS
=
sausages
DIFF_PVM
=
diff_pvm
DIFF_PVM
=
diff_pvm
RV
=
replacevols
RV
=
replacevols
MDV
=
make_dyadic_vectors
DTIFITOBJS
=
dtifit.o dtifitOptions.o
DTIFITOBJS
=
dtifit.o dtifitOptions.o
PTOBJS
=
probtrack.o probtrackOptions.o pt_alltracts.o pt_matrix.o pt_seeds_to_targets.o pt_simple.o pt_twomasks.o pt_matrix_mesh.o
PTOBJS
=
probtrack.o probtrackOptions.o pt_alltracts.o pt_matrix.o pt_seeds_to_targets.o pt_simple.o pt_twomasks.o pt_matrix_mesh.o
...
@@ -28,9 +29,10 @@ ROMOBJS=reord_OM.o
...
@@ -28,9 +29,10 @@ ROMOBJS=reord_OM.o
SAUSOBJS
=
sausages.o
SAUSOBJS
=
sausages.o
DIFF_PVMOBJS
=
diff_pvm.o diff_pvmoptions.o
DIFF_PVMOBJS
=
diff_pvm.o diff_pvmoptions.o
RVOBJS
=
replacevols.o
RVOBJS
=
replacevols.o
MDVOBJS
=
make_dyadic_vectors.o
SCRIPTS
=
eddy_correct
SCRIPTS
=
eddy_correct
XFILES
=
dtifit probtrack find_the_biggest medianfilter diff_pvm
XFILES
=
dtifit probtrack find_the_biggest medianfilter diff_pvm
make_dyadic_vectors
RUNTCLS
=
Fdt
RUNTCLS
=
Fdt
all
:
${XFILES} reord_OM sausages
all
:
${XFILES} reord_OM sausages
...
@@ -62,6 +64,9 @@ ${DIFF_PVM}: ${DIFF_PVMOBJS}
...
@@ -62,6 +64,9 @@ ${DIFF_PVM}: ${DIFF_PVMOBJS}
${RV}
:
${RVOBJS}
${RV}
:
${RVOBJS}
${
CXX
}
${
CXXFLAGS
}
${
LDFLAGS
}
-o
$@
${
RVOBJS
}
${
DLIBS
}
${
CXX
}
${
CXXFLAGS
}
${
LDFLAGS
}
-o
$@
${
RVOBJS
}
${
DLIBS
}
${MDV}
:
${MDVOBJS}
${
CXX
}
${
CXXFLAGS
}
${
LDFLAGS
}
-o
$@
${
MDVOBJS
}
${
DLIBS
}
...
...
This diff is collapsed.
Click to expand it.
make_dyadic_vectors.cc
0 → 100644
+
66
−
0
View file @
f43ff3e5
#include
<iostream>
#include
<fstream>
#include
"newimage/newimageall.h"
#include
<vector>
using
namespace
std
;
using
namespace
NEWIMAGE
;
int
main
(
int
argc
,
char
**
argv
){
if
(
argc
<
4
){
cerr
<<
"usage: make_dyadic_vectors <theta_vol> <phi_vol> <output>"
<<
endl
;
exit
(
0
);
}
volume4D
<
float
>
ths
,
phs
;
volumeinfo
tempinfo
;
read_volume4D
(
ths
,
argv
[
1
],
tempinfo
);
read_volume4D
(
phs
,
argv
[
2
]);
volume4D
<
float
>
dyadic_vecs
(
ths
.
xsize
(),
ths
.
ysize
(),
ths
.
zsize
(),
3
);
dyadic_vecs
=
0
;
SymmetricMatrix
dyad
(
3
);
dyad
=
0
;
ColumnVector
dir
(
3
);
DiagonalMatrix
dyad_D
;
//eigenvalues
Matrix
dyad_V
;
//eigenvectors
for
(
int
k
=
ths
.
minz
();
k
<=
ths
.
maxz
();
k
++
){
for
(
int
j
=
ths
.
miny
();
j
<=
ths
.
maxy
();
j
++
){
for
(
int
i
=
ths
.
minx
();
i
<=
ths
.
maxx
();
i
++
){
dyad
=
0
;
for
(
int
s
=
ths
.
mint
();
s
<=
ths
.
maxt
();
s
++
){
float
th
=
ths
(
i
,
j
,
k
,
s
);
float
ph
=
phs
(
i
,
j
,
k
,
s
);
dir
(
1
)
=
sin
(
th
)
*
cos
(
ph
);
dir
(
2
)
=
sin
(
th
)
*
sin
(
ph
);
dir
(
3
)
=
cos
(
th
);
dyad
<<
dyad
+
dir
*
dir
.
t
();
}
EigenValues
(
dyad
,
dyad_D
,
dyad_V
);
int
maxeig
;
if
(
dyad_D
(
1
)
>
dyad_D
(
2
)){
if
(
dyad_D
(
1
)
>
dyad_D
(
3
))
maxeig
=
1
;
else
maxeig
=
3
;
}
else
{
if
(
dyad_D
(
2
)
>
dyad_D
(
3
))
maxeig
=
2
;
else
maxeig
=
3
;
}
dyadic_vecs
(
i
,
j
,
k
,
0
)
=
dyad_V
(
1
,
maxeig
);
dyadic_vecs
(
i
,
j
,
k
,
1
)
=
dyad_V
(
2
,
maxeig
);
dyadic_vecs
(
i
,
j
,
k
,
2
)
=
dyad_V
(
3
,
maxeig
);
}
}
}
save_volume4D
(
dyadic_vecs
,
argv
[
3
],
tempinfo
);
}
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