From 33905ea7e0830813e8eee67a73b2b853cf52bf4c Mon Sep 17 00:00:00 2001
From: Christian Beckmann <c.beckmann@donders.ru.nl>
Date: Mon, 11 Aug 2008 21:45:29 +0000
Subject: [PATCH] added --vn to fsl_glm

---
 fsl_glm.cc | 8 +++++---
 meldata.cc | 5 +++++
 meldata.h  | 1 +
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/fsl_glm.cc b/fsl_glm.cc
index 64df3ba..d20d01d 100644
--- a/fsl_glm.cc
+++ b/fsl_glm.cc
@@ -53,7 +53,7 @@ using namespace std;
 		false, requires_argument);
 	Option<bool> perfvn(string("--vn"),FALSE,
 		string("        perfrom MELODIC variance-normalisation on data"),
-		false, requires_argument);
+		false, no_argument);
 	Option<int> help(string("-h,--help"), 0,
 		string("display this help text"),
 		false,no_argument);
@@ -156,6 +156,9 @@ int setup(){
 		
 		data = tmpdata.matrix(mask);
 		voxels = data.Ncols();
+		data = remmean(data,1);
+		if(perfvn.value())
+			vnscales = Melodic::varnorm(data);
 	}
 	else
 		data = read_ascii_matrix(fnin.value());	
@@ -176,8 +179,7 @@ int setup(){
 	meanR=mean(data,1);
 	data = remmean(data,1);
 	design = remmean(design,1);
-	if(perfvn.value())
-		vnscales = Melodic::varnorm(data);
+
 	if(fncontrasts.value()>""){//read contrast		
 		contrasts = read_ascii_matrix(fncontrasts.value());
 		if(!(contrasts.Ncols()==design.Ncols())){
diff --git a/meldata.cc b/meldata.cc
index 28bf727..e9beff5 100644
--- a/meldata.cc
+++ b/meldata.cc
@@ -885,6 +885,11 @@ namespace Melodic{
     unmixMatrix = pinv(mixMatrix);
   }
 
+  void MelodicData::reregress(){
+	if((numfiles > 1)){
+	   
+	}
+  }
   void MelodicData::status(const string &txt)
   {
     cout << "MelodicData Object " << txt << endl;
diff --git a/meldata.h b/meldata.h
index 5944013..37eb6d5 100644
--- a/meldata.h
+++ b/meldata.h
@@ -189,6 +189,7 @@ namespace Melodic{
       }
       
       void sort();
+	  void reregress();
 
       volumeinfo tempInfo;
       vector<Matrix> DWM, WM;
-- 
GitLab