Skip to content
Snippets Groups Projects
Commit 972df95b authored by Matthew Webster's avatar Matthew Webster
Browse files

All MJ changes for LR2

parent e8809446
No related branches found
No related tags found
No related merge requests found
...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment