Skip to content
Snippets Groups Projects
Commit 51e05352 authored by Mark Woolrich's avatar Mark Woolrich
Browse files

*** empty log message ***

parent 59760c69
No related branches found
No related tags found
No related merge requests found
...@@ -211,7 +211,7 @@ namespace FILM { ...@@ -211,7 +211,7 @@ namespace FILM {
VolumeInfo tmpinfo; VolumeInfo tmpinfo;
// Write out tstat: // Write out fstat:
tmpinfo = sigmaSquareds.getInfo(); tmpinfo = sigmaSquareds.getInfo();
tmpinfo.intent_code = NIFTI_INTENT_FTEST; tmpinfo.intent_code = NIFTI_INTENT_FTEST;
tmpinfo.intent_p1 = 0.0; tmpinfo.intent_p1 = 0.0;
...@@ -244,6 +244,7 @@ namespace FILM { ...@@ -244,6 +244,7 @@ namespace FILM {
// Write out neffs: // Write out neffs:
tmpinfo = sigmaSquareds.getInfo(); tmpinfo = sigmaSquareds.getInfo();
tmpinfo.intent_code = NIFTI_INTENT_NONE;
neff.setInfo(tmpinfo); neff.setInfo(tmpinfo);
neff.setPreThresholdPositions(sigmaSquareds.getPreThresholdPositions()); neff.setPreThresholdPositions(sigmaSquareds.getPreThresholdPositions());
neff.unthreshold(); neff.unthreshold();
...@@ -251,7 +252,7 @@ namespace FILM { ...@@ -251,7 +252,7 @@ namespace FILM {
// Write out cope: // Write out cope:
tmpinfo = sigmaSquareds.getInfo(); tmpinfo = sigmaSquareds.getInfo();
tmpinfo.intent_code = NIFTI_INTENT_CORREL; tmpinfo.intent_code = NIFTI_INTENT_ESTIMATE;
tmpinfo.intent_p1 = 0.0; tmpinfo.intent_p1 = 0.0;
cb.setInfo(tmpinfo); cb.setInfo(tmpinfo);
cb.setPreThresholdPositions(sigmaSquareds.getPreThresholdPositions()); cb.setPreThresholdPositions(sigmaSquareds.getPreThresholdPositions());
...@@ -260,7 +261,7 @@ namespace FILM { ...@@ -260,7 +261,7 @@ namespace FILM {
// Write out varcope: // Write out varcope:
tmpinfo = sigmaSquareds.getInfo(); tmpinfo = sigmaSquareds.getInfo();
tmpinfo.intent_code = NIFTI_INTENT_CHISQ; tmpinfo.intent_code = NIFTI_INTENT_ESTIMATE;
tmpinfo.intent_p1 = 0.0; tmpinfo.intent_p1 = 0.0;
varcb.setInfo(tmpinfo); varcb.setInfo(tmpinfo);
varcb.setPreThresholdPositions(sigmaSquareds.getPreThresholdPositions()); varcb.setPreThresholdPositions(sigmaSquareds.getPreThresholdPositions());
......
...@@ -214,6 +214,7 @@ int main(int argc, char *argv[]) ...@@ -214,6 +214,7 @@ int main(int argc, char *argv[])
threshac = threshac.Rows(1,cutoff); threshac = threshac.Rows(1,cutoff);
VolumeInfo volinfo = x.getInfo(); VolumeInfo volinfo = x.getInfo();
volinfo.v = cutoff; volinfo.v = cutoff;
volinfo.intent_code = NIFTI_INTENT_ESTIMATE;
threshac.unthresholdSeries(volinfo,x.getPreThresholdPositions()); threshac.unthresholdSeries(volinfo,x.getPreThresholdPositions());
threshac.writeAsFloat(logger.getDir() + "/threshac1"); threshac.writeAsFloat(logger.getDir() + "/threshac1");
threshac.thresholdSeries(); threshac.thresholdSeries();
......
...@@ -129,7 +129,10 @@ int main(int argc,char *argv[]) ...@@ -129,7 +129,10 @@ int main(int argc,char *argv[])
Volume zs(numTS); Volume zs(numTS);
F2z::ComputeFStats(fs, globalopts.dof1, globalopts.dof2, zs); F2z::ComputeFStats(fs, globalopts.dof1, globalopts.dof2, zs);
zs.setInfo(fs.getInfo()); VolumeInfo volinfo = fs.getInfo();
volinfo.intent_code = NIFTI_INTENT_ZSCORE;
volinfo.intent_p1 = 0.0;
zs.setInfo(volinfo);
zs.writeAsFloat(globalopts.zscoresfname.c_str()); zs.writeAsFloat(globalopts.zscoresfname.c_str());
} }
catch(Exception p_excp) catch(Exception p_excp)
......
...@@ -47,16 +47,19 @@ namespace FILM { ...@@ -47,16 +47,19 @@ namespace FILM {
SetCorrection(inv_xx, ind); SetCorrection(inv_xx, ind);
} }
void GlimGls::Save(const VolumeInfo& volinfo, const ColumnVector& prethreshpos) void GlimGls::Save(const VolumeInfo& pvolinfo, const ColumnVector& prethreshpos)
{ {
// Need to save b, sigmaSquareds, corrections and dof // Need to save b, sigmaSquareds, corrections and dof
Log& logger = LogSingleton::getInstance(); Log& logger = LogSingleton::getInstance();
VolumeInfo volinfo = pvolinfo;
// b: // b:
Volume peVol; Volume peVol;
for(int i = 1; i <= numParams; i++) for(int i = 1; i <= numParams; i++)
{ {
peVol = b.Row(i).AsColumn(); peVol = b.Row(i).AsColumn();
volinfo.intent_code = NIFTI_INTENT_ESTIMATE;
peVol.setInfo(volinfo); peVol.setInfo(volinfo);
peVol.setPreThresholdPositions(prethreshpos); peVol.setPreThresholdPositions(prethreshpos);
peVol.unthreshold(); peVol.unthreshold();
...@@ -70,6 +73,7 @@ namespace FILM { ...@@ -70,6 +73,7 @@ namespace FILM {
} }
// sigmaSquareds: // sigmaSquareds:
volinfo.intent_code = NIFTI_INTENT_ESTIMATE;
sigmaSquareds.setInfo(volinfo); sigmaSquareds.setInfo(volinfo);
sigmaSquareds.setPreThresholdPositions(prethreshpos); sigmaSquareds.setPreThresholdPositions(prethreshpos);
sigmaSquareds.unthreshold(); sigmaSquareds.unthreshold();
...@@ -83,6 +87,7 @@ namespace FILM { ...@@ -83,6 +87,7 @@ namespace FILM {
// corrections (are the pes correlation matrix (x.t()*x).i() reshapen to a vector): // corrections (are the pes correlation matrix (x.t()*x).i() reshapen to a vector):
VolumeInfo newvolinfo = volinfo; VolumeInfo newvolinfo = volinfo;
newvolinfo.v = numParams*numParams; newvolinfo.v = numParams*numParams;
newvolinfo.intent_code = NIFTI_INTENT_NONE;
corrections.setInfo(newvolinfo); corrections.setInfo(newvolinfo);
corrections.setPreThresholdPositions(prethreshpos); corrections.setPreThresholdPositions(prethreshpos);
corrections.unthresholdSeries(); corrections.unthresholdSeries();
......
...@@ -132,7 +132,9 @@ int main(int argc,char *argv[]) ...@@ -132,7 +132,9 @@ int main(int argc,char *argv[])
Volume ps(numTS); Volume ps(numTS);
T2z::ComputePs(vars, cbs, globalopts.dof, ps); T2z::ComputePs(vars, cbs, globalopts.dof, ps);
ps.setInfo(vars.getInfo()); VolumeInfo volinfo = vars.getInfo();
volinfo.intent_code = NIFTI_INTENT_LOGPVAL;
ps.setInfo(volinfo);
ps.writeAsFloat(globalopts.logpfname.c_str()); ps.writeAsFloat(globalopts.logpfname.c_str());
} }
catch(Exception p_excp) catch(Exception p_excp)
......
...@@ -130,9 +130,13 @@ int main(int argc,char *argv[]) ...@@ -130,9 +130,13 @@ int main(int argc,char *argv[])
Volume zs(numTS); Volume zs(numTS);
T2z::ComputeZStats(vars, cbs, globalopts.dof, zs); T2z::ComputeZStats(vars, cbs, globalopts.dof, zs);
zs.setInfo(vars.getInfo()); VolumeInfo volinfo = vars.getInfo();
volinfo.intent_code = NIFTI_INTENT_ZSCORE;
volinfo.intent_p1 = 0.0;
zs.setInfo(volinfo);
zs.writeAsFloat(globalopts.zscoresfname.c_str()); zs.writeAsFloat(globalopts.zscoresfname.c_str());
} }
catch(Exception p_excp) catch(Exception p_excp)
{ {
......
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