DMRITool  v0.1.1-139-g860d86b4
Diffusion MRI Tool
ODFNormalization.cxx
Go to the documentation of this file.
1 
17 #include "utlITK.h"
18 
20 #include "ODFNormalizationCLP.h"
21 
23 
29 int
30 main (int argc, char const* argv[])
31 {
32  // GenerateCLP
33  PARSE_ARGS;
34 
35  typedef double FloatType;
36 
37  typedef itk::VectorImage<FloatType,3> InputImageType;
38  typedef itk::VectorImage<FloatType,3> OutputImageType;
39 
40  InputImageType::Pointer input = InputImageType::New();
41  itk::ReadImage(_InputFile, input);
42 
43 
45  FilterType::Pointer filter = FilterType::New();
46 
47  filter->SetInput(input);
48 
49  if (_Type=="SH")
50  filter->SetODFType(FilterType::FunctorType::SH);
51  else if (_Type=="SAMPLE")
52  filter->SetODFType(FilterType::FunctorType::SAMPLE);
53 
54  filter->Update();
55 
56  OutputImageType::Pointer output = filter->GetOutput();
57  itk::SaveImage(output, _OutputFile);
58 
59  return 0;
60 }
bool SaveImage(const SmartPointer< ImageType > &image, const std::string &filename, const std::string &printInfo="Writing Image:")
Definition: utlITK.h:157
bool ReadImage(const std::string &filename, SmartPointer< ImageType > &image, const std::string &printInfo="Reading Image:")
Definition: utlITK.h:110
Normalize the input ODF such that the output ODF has unit integral. The input ODF can be represented ...
int main(int argc, char const *argv[])
Normalize ODF represented by SH basis or uniform spherical samples.