Skip to content
Snippets Groups Projects
Commit fb8fc81b authored by Tim Behrens's avatar Tim Behrens
Browse files

*** empty log message ***

parent f71525ec
No related branches found
No related tags found
No related merge requests found
...@@ -202,7 +202,7 @@ class xfibresVoxelManager{ ...@@ -202,7 +202,7 @@ class xfibresVoxelManager{
Multifibre m_multifibre; Multifibre m_multifibre;
public: public:
xfibresVoxelManager(const ColumnVector& data,const ColumnVector& alpha, xfibresVoxelManager(const ColumnVector& data,const ColumnVector& alpha,
const ColumnVector& beta, const Matrix& b, const Matrix& Amat, const ColumnVector& beta, const Matrix& b,
Samples& samples,int voxelnumber): Samples& samples,int voxelnumber):
opts(xfibresOptions::getInstance()), opts(xfibresOptions::getInstance()),
m_samples(samples),m_voxelnumber(voxelnumber),m_data(data), m_samples(samples),m_voxelnumber(voxelnumber),m_data(data),
...@@ -327,7 +327,7 @@ int main(int argc, char *argv[]) ...@@ -327,7 +327,7 @@ int main(int argc, char *argv[])
Matrix datam, bvals,bvecs; Matrix datam, bvals,bvecs;
volume<char> mask; volume<float> mask;
bvals=read_ascii_matrix(opts.bvalsfile.value()); bvals=read_ascii_matrix(opts.bvalsfile.value());
bvecs=read_ascii_matrix(opts.bvecsfile.value()); bvecs=read_ascii_matrix(opts.bvecsfile.value());
...@@ -338,40 +338,22 @@ int main(int argc, char *argv[]) ...@@ -338,40 +338,22 @@ int main(int argc, char *argv[])
datam=data.matrix(mask); datam=data.matrix(mask);
} }
Samples samples(datam.Ncols());
//if(opts.debuglevel.value()==1) Matrix Amat;
//Tracer_Plus::setrunningstackon(); ColumnVector alpha, beta;
Amat=form_Amat(bvecs,bvals);
//if(opts.timingon.value()) cart2sph(bvecs,alpha,beta);
//Tracer_Plus::settimingon(); Samples samples(datam.Ncols());
// read data
//VolumeSeries data;
//data.read(opts.datafile.value());
// data.writeAsFloat(LogSingleton::getInstance().appendDir("data"));
// cout<<"done"<<endl;
// return 0;
//int ntpts = data.tsize();
//Matrix bvecs = read_ascii_matrix(opts.bvecsfile.value());
//Matrix bvals = read_ascii_matrix(opts.bvalsfile.value());
// mask:
//Volume mask;
///mask.read(opts.maskfile.value());
//mask.threshold(1e-16);
// threshold using mask: for(int vox=1;vox<=datam.Ncols();vox++){
//data.setPreThresholdPositions(mask.getPreThresholdPositions()); xfibresVoxelManager vm(datam.Column(vox),alpha,beta,bvals,samples,vox);
//data.thresholdSeries(); vm.initialise(Amat);
ColumnVector A,B,C; vm.runmcmc();
}
Matrix b,Amat; samples.save();
int n;
Multifibre(A,B,C,b,n);
} }
catch(Exception& e) catch(Exception& e)
{ {
......
...@@ -41,7 +41,7 @@ class xfibresOptions { ...@@ -41,7 +41,7 @@ class xfibresOptions {
Option<int> nburn; Option<int> nburn;
Option<int> sampleevery; Option<int> sampleevery;
Option<int> updateproposalevery; Option<int> updateproposalevery;
Option<float> seed; Option<int> seed;
void parse_command_line(int argc, char** argv, Log& logger); void parse_command_line(int argc, char** argv, Log& logger);
private: private:
...@@ -103,7 +103,7 @@ class xfibresOptions { ...@@ -103,7 +103,7 @@ class xfibresOptions {
updateproposalevery(string("--upe,--updateproposalevery"),40, updateproposalevery(string("--upe,--updateproposalevery"),40,
string("Num of jumps for each update to the proposal density std (MCMC) (default is 40)"), string("Num of jumps for each update to the proposal density std (MCMC) (default is 40)"),
false,requires_argument), false,requires_argument),
seed(string("--seed"),0.76986654,string("seed for pseudo random number generator"), seed(string("--seed"),8665904,string("seed for pseudo random number generator"),
false,requires_argument), false,requires_argument),
options("xfibres", "xfibres -k <filename>\n xfibres --verbose\n") options("xfibres", "xfibres -k <filename>\n xfibres --verbose\n")
{ {
......
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