18 #include "MeanDiffusivityEstimatorCLP.h" 33 main (
int argc,
char const* argv[])
38 typedef double PrecisionType;
40 typedef itk::Image<PrecisionType, 3> ImageType;
45 GHOTFilterType::Pointer ghot = GHOTFilterType::New();
46 typedef GHOTFilterType::MaskImageType MaskImageType;
47 MaskImageType::Pointer maskImage;
48 if (_MaskFileArg.isSet())
51 ghot->SetMaskImage(maskImage);
54 DWIReaderType::Pointer reader = DWIReaderType::New();
56 reader->SetConfigurationFile(_InputFile);
57 if (_MaskFileArg.isSet())
58 reader->SetMaskImage(maskImage);
61 ghot->SetInput(reader->GetOutput());
62 ghot->SetSamplingSchemeQSpace(reader->GetSamplingSchemeQSpace());
63 ghot->SetSHRank(_SHRank);
64 ghot->SetRadialRank(_RadialRank);
65 if (_NumberOfThreads>0)
66 ghot->SetNumberOfThreads( _NumberOfThreads );
68 if (_ShowProgressArg.isSet())
69 ghot->AddObserver( itk::ProgressEvent(), observer );
70 if (_DebugArg.isSet())
72 std::cout <<
"Estimate MD using GHOT model" << std::endl << std::flush;
74 std::cout <<
"DONE" << std::endl << std::flush;
81 MDFromGHOTFilterType::Pointer mdFromGHOT = MDFromGHOTFilterType::New();
82 mdFromGHOT->SetInput(ghot->GetOutput());
83 mdFromGHOT->SetTau(ghot->GetSamplingSchemeQSpace()->GetTau());
84 mdFromGHOT->SetScale(ghot->GetBasisScale());
86 ImageType::Pointer md = mdFromGHOT->GetOutput();
estimate the coefficients in GHOT model, which is used for md image estimation
helper functions specifically used in dmritool
bool SaveImage(const SmartPointer< ImageType > &image, const std::string &filename, const std::string &printInfo="Writing Image:")
SmartPointer< Self > Pointer
bool ReadImage(const std::string &filename, SmartPointer< ImageType > &image, const std::string &printInfo="Reading Image:")
int main(int argc, char const *argv[])
estimate mean diffusivity in each voxel
Compute mean diffusivity from GHOT coefficients.
Load gradient file, b values and DWI files (with optional index file)
itk::VectorImage< ScalarType, 3 > VectorImageType