Skip to content
Snippets Groups Projects
Commit 59760c69 authored by Mark Jenkinson's avatar Mark Jenkinson
Browse files

Working version with intents - hopefully

parent 0f827b2c
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "miscmaths/f2z.h" #include "miscmaths/f2z.h"
#include "paradigm.h" #include "paradigm.h"
#include "utils/tracer_plus.h" #include "utils/tracer_plus.h"
#include "fslio/fslio.h"
using namespace Utilities; using namespace Utilities;
using namespace MISCMATHS; using namespace MISCMATHS;
...@@ -208,14 +209,22 @@ namespace FILM { ...@@ -208,14 +209,22 @@ namespace FILM {
ostrstream osc(strc,50); ostrstream osc(strc,50);
osc << suffix << c_counter << '\0'; osc << suffix << c_counter << '\0';
VolumeInfo tmpinfo;
// Write out tstat: // Write out tstat:
fstat.setInfo(sigmaSquareds.getInfo()); tmpinfo = sigmaSquareds.getInfo();
tmpinfo.intent_code = NIFTI_INTENT_FTEST;
tmpinfo.intent_p1 = 0.0;
fstat.setInfo(tmpinfo);
fstat.setPreThresholdPositions(sigmaSquareds.getPreThresholdPositions()); fstat.setPreThresholdPositions(sigmaSquareds.getPreThresholdPositions());
fstat.unthreshold(); fstat.unthreshold();
fstat.writeAsFloat(logger.getDir() + "/fstat" + strc); fstat.writeAsFloat(logger.getDir() + "/fstat" + strc);
// Write out zstat: // Write out zstat:
zstat.setInfo(sigmaSquareds.getInfo()); tmpinfo = sigmaSquareds.getInfo();
tmpinfo.intent_code = NIFTI_INTENT_ZSCORE;
tmpinfo.intent_p1 = 0.0;
zstat.setInfo(tmpinfo);
zstat.setPreThresholdPositions(sigmaSquareds.getPreThresholdPositions()); zstat.setPreThresholdPositions(sigmaSquareds.getPreThresholdPositions());
zstat.unthreshold(); zstat.unthreshold();
zstat.writeAsFloat(logger.getDir() + "/zfstat" + strc); zstat.writeAsFloat(logger.getDir() + "/zfstat" + strc);
...@@ -231,32 +240,47 @@ namespace FILM { ...@@ -231,32 +240,47 @@ namespace FILM {
ostrstream osc(strc,50); ostrstream osc(strc,50);
osc << suffix << c_counter << '\0'; osc << suffix << c_counter << '\0';
VolumeInfo tmpinfo;
// Write out neffs: // Write out neffs:
neff.setInfo(sigmaSquareds.getInfo()); tmpinfo = sigmaSquareds.getInfo();
neff.setInfo(tmpinfo);
neff.setPreThresholdPositions(sigmaSquareds.getPreThresholdPositions()); neff.setPreThresholdPositions(sigmaSquareds.getPreThresholdPositions());
neff.unthreshold(); neff.unthreshold();
neff.writeAsFloat(logger.getDir() + "/neff" + strc); neff.writeAsFloat(logger.getDir() + "/neff" + strc);
// Write out cope: // Write out cope:
cb.setInfo(sigmaSquareds.getInfo()); tmpinfo = sigmaSquareds.getInfo();
tmpinfo.intent_code = NIFTI_INTENT_CORREL;
tmpinfo.intent_p1 = 0.0;
cb.setInfo(tmpinfo);
cb.setPreThresholdPositions(sigmaSquareds.getPreThresholdPositions()); cb.setPreThresholdPositions(sigmaSquareds.getPreThresholdPositions());
cb.unthreshold(); cb.unthreshold();
cb.writeAsFloat(logger.getDir() + "/cope" + strc); cb.writeAsFloat(logger.getDir() + "/cope" + strc);
// Write out varcope: // Write out varcope:
varcb.setInfo(sigmaSquareds.getInfo()); tmpinfo = sigmaSquareds.getInfo();
tmpinfo.intent_code = NIFTI_INTENT_CHISQ;
tmpinfo.intent_p1 = 0.0;
varcb.setInfo(tmpinfo);
varcb.setPreThresholdPositions(sigmaSquareds.getPreThresholdPositions()); varcb.setPreThresholdPositions(sigmaSquareds.getPreThresholdPositions());
varcb.unthreshold(); varcb.unthreshold();
varcb.writeAsFloat(logger.getDir() + "/varcope" + strc); varcb.writeAsFloat(logger.getDir() + "/varcope" + strc);
// Write out tstat: // Write out tstat:
tstat.setInfo(sigmaSquareds.getInfo()); tmpinfo = sigmaSquareds.getInfo();
tmpinfo.intent_code = NIFTI_INTENT_TTEST;
tmpinfo.intent_p1 = 0.0;
tstat.setInfo(tmpinfo);
tstat.setPreThresholdPositions(sigmaSquareds.getPreThresholdPositions()); tstat.setPreThresholdPositions(sigmaSquareds.getPreThresholdPositions());
tstat.unthreshold(); tstat.unthreshold();
tstat.writeAsFloat(logger.getDir() + "/tstat" + strc); tstat.writeAsFloat(logger.getDir() + "/tstat" + strc);
// Write out zstat: // Write out zstat:
zstat.setInfo(sigmaSquareds.getInfo()); tmpinfo = sigmaSquareds.getInfo();
tmpinfo.intent_code = NIFTI_INTENT_ZSCORE;
tmpinfo.intent_p1 = 0.0;
zstat.setInfo(tmpinfo);
zstat.setPreThresholdPositions(sigmaSquareds.getPreThresholdPositions()); zstat.setPreThresholdPositions(sigmaSquareds.getPreThresholdPositions());
zstat.unthreshold(); zstat.unthreshold();
zstat.writeAsFloat(logger.getDir() + "/zstat" + strc); zstat.writeAsFloat(logger.getDir() + "/zstat" + strc);
......
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