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 @@
#include "miscmaths/f2z.h"
#include "paradigm.h"
#include "utils/tracer_plus.h"
#include "fslio/fslio.h"
using namespace Utilities;
using namespace MISCMATHS;
......@@ -208,14 +209,22 @@ namespace FILM {
ostrstream osc(strc,50);
osc << suffix << c_counter << '\0';
VolumeInfo tmpinfo;
// 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.unthreshold();
fstat.writeAsFloat(logger.getDir() + "/fstat" + strc);
// 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.unthreshold();
zstat.writeAsFloat(logger.getDir() + "/zfstat" + strc);
......@@ -231,32 +240,47 @@ namespace FILM {
ostrstream osc(strc,50);
osc << suffix << c_counter << '\0';
VolumeInfo tmpinfo;
// Write out neffs:
neff.setInfo(sigmaSquareds.getInfo());
tmpinfo = sigmaSquareds.getInfo();
neff.setInfo(tmpinfo);
neff.setPreThresholdPositions(sigmaSquareds.getPreThresholdPositions());
neff.unthreshold();
neff.writeAsFloat(logger.getDir() + "/neff" + strc);
// 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.unthreshold();
cb.writeAsFloat(logger.getDir() + "/cope" + strc);
// 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.unthreshold();
varcb.writeAsFloat(logger.getDir() + "/varcope" + strc);
// 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.unthreshold();
tstat.writeAsFloat(logger.getDir() + "/tstat" + strc);
// 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.unthreshold();
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