23 #include "SamplingSchemeQSpaceIncrementalEstimationCLP.h" 30 main (
int argc,
char const* argv[])
36 typedef SamplingType::Pointer SamplingPointer;
38 EstimationType::Pointer estimator = EstimationType::New();
40 utlGlobalException(_NumberOfSamples.size()==0,
"should give the numbers of samples in shells");
41 EstimationType::IndexVectorType numbers(_NumberOfSamples.size());
42 for (
unsigned int i = 0; i < _NumberOfSamples.size(); i += 1 )
43 numbers[i] = _NumberOfSamples[i];
45 EstimationType::MatrixPointer fineOrientations(
new EstimationType::MatrixType());
47 estimator->SetDebug(_Debug);
48 estimator->SetNumbersInShell(numbers);
49 estimator->SetTessellationOrder(_Order);
50 if (_Criteria==
"DISTANCE")
51 estimator->SetCriteriaType(EstimationType::DISTANCE);
52 else if (_Criteria==
"ELECTROSTATIC")
53 estimator->SetCriteriaType(EstimationType::ELECTROSTATIC);
54 if(_FineOrientationsArg.isSet())
57 estimator->SetFineOrientations(fineOrientations);
59 if(_InitialOrientationsArg.isSet())
61 SamplingPointer initialSamples = SamplingType::New();
63 estimator->SetInitialOrientations(initialSamples);
65 estimator->SetElectrostaticOrder(_EnergyOrder);
66 estimator->SetWeightForSingleShell(_Weight);
70 estimator->UpdateOutputData();
72 std::cout <<
"Elapsed time : " << clock.GetTotal() << std::endl;
74 SamplingPointer output = estimator->GetOutputOrientations();
79 WriterType::Pointer writer = WriterType::New();
80 writer->SetSampling(output);
81 writer->SetOrientationFile(_OutputOrientations);
82 writer->SaveSingleShellOn();
83 writer->SaveAllShellsInOneFileOff();
helper functions specifically used in dmritool
incremental estimation of single/multi-shell orientations
int main(int argc, char const *argv[])
incrementatl estimation for single and multiple shell sampling scheme
#define utlGlobalException(cond, expout)
this class describes sampling in Q space.
write orientations and b values (single/multiple shells) into text files