DMRITool  v0.1.1-139-g860d86b4
Diffusion MRI Tool
SamplingSchemeQSpaceRandomEstimation.cxx
Go to the documentation of this file.
1 
13 #include "utl.h"
16 
17 #include "SamplingSchemeQSpaceRandomEstimationCLP.h"
18 
23 int
24 main (int argc, char const* argv[])
25 {
26 
27  PARSE_ARGS;
28 
29  typedef itk::SamplingSchemeQSpace<double> SamplingType;
30  typedef SamplingType::Pointer SamplingPointer;
31 
32  utlGlobalException(_NumberOfSamples.size()==0, "should give the numbers of samples in shells");
33 
34  SamplingPointer scheme = SamplingType::New();
35  scheme->GenerateFromRandomPoints(_NumberOfSamples);
36 
38  WriterType::Pointer writer = WriterType::New();
39  writer->SetSampling(scheme);
40  writer->SetOrientationFile(_OutputOrientations);
41  writer->SaveSingleShellOn();
42  writer->SaveAllShellsInOneFileOff();
43  writer->Update();
44 
45  return 0;
46 }
47 
helper functions specifically used in dmritool
#define utlGlobalException(cond, expout)
Definition: utlCoreMacro.h:372
this class describes sampling in Q space.
int main(int argc, char const *argv[])
randome generator for single and multiple shell sampling scheme
write orientations and b values (single/multiple shells) into text files