Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
miscmaths
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
miscmaths
Commits
972df95b
Commit
972df95b
authored
17 years ago
by
Matthew Webster
Browse files
Options
Downloads
Patches
Plain Diff
All MJ changes for LR2
parent
e8809446
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
miscmaths.h
+21
-0
21 additions, 0 deletions
miscmaths.h
with
21 additions
and
0 deletions
miscmaths.h
+
21
−
0
View file @
972df95b
...
@@ -181,6 +181,27 @@ namespace MISCMATHS {
...
@@ -181,6 +181,27 @@ namespace MISCMATHS {
inline
ReturnMatrix
median
(
const
Matrix
&
in
){
return
quantile
(
in
,
2
);}
inline
ReturnMatrix
median
(
const
Matrix
&
in
){
return
quantile
(
in
,
2
);}
inline
ReturnMatrix
iqr
(
const
Matrix
&
in
){
Matrix
res
=
quantile
(
in
,
3
)
-
quantile
(
in
,
1
);
res
.
Release
();
return
res
;}
inline
ReturnMatrix
iqr
(
const
Matrix
&
in
){
Matrix
res
=
quantile
(
in
,
3
)
-
quantile
(
in
,
1
);
res
.
Release
();
return
res
;}
// the following give left-right order and voxel2mm coordinate conversions
// consistent with FSLView behaviour (NB: you cannot tell left-right from
// the vox2mm matrix!)
int
FslGetLeftRightOrder
(
int
sform_code
,
const
Matrix
&
sform_mat
,
int
qform_code
,
const
Matrix
&
qform_mat
);
short
FslGetVox2mmMatrix
(
Matrix
&
vox2mm
,
int
sform_code
,
const
Matrix
&
sform_mat
,
int
qform_code
,
const
Matrix
&
qform_mat
,
float
dx
,
float
dy
,
float
dz
);
Matrix
FslGetVox2VoxMatrix
(
const
Matrix
&
flirt_in2ref
,
int
sform_code_in
,
const
Matrix
&
sform_mat_in
,
int
qform_code_in
,
const
Matrix
&
qform_mat_in
,
float
dx_in
,
float
dy_in
,
float
dz_in
,
int
nx_in
,
int
ny_in
,
int
nz_in
,
int
sform_code_ref
,
const
Matrix
&
sform_mat_ref
,
int
qform_code_ref
,
const
Matrix
&
qform_mat_ref
,
float
dx_ref
,
float
dy_ref
,
float
dz_ref
,
int
nx_ref
,
int
ny_ref
,
int
nz_ref
);
mat44
newmat_to_mat44
(
const
Matrix
&
inmat
);
Matrix
mat44_to_newmat
(
mat44
inmat
);
void
cart2sph
(
const
ColumnVector
&
dir
,
float
&
th
,
float
&
ph
);
// cartesian to sperical polar coordinates
void
cart2sph
(
const
ColumnVector
&
dir
,
float
&
th
,
float
&
ph
);
// cartesian to sperical polar coordinates
void
cart2sph
(
const
Matrix
&
dir
,
ColumnVector
&
th
,
ColumnVector
&
ph
);
//ditto
void
cart2sph
(
const
Matrix
&
dir
,
ColumnVector
&
th
,
ColumnVector
&
ph
);
//ditto
void
cart2sph
(
const
vector
<
ColumnVector
>&
dir
,
ColumnVector
&
th
,
ColumnVector
&
ph
);
// same but in a vector
void
cart2sph
(
const
vector
<
ColumnVector
>&
dir
,
ColumnVector
&
th
,
ColumnVector
&
ph
);
// same but in a vector
...
...
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