15 #include "SHCoefficientsFitCLP.h" 22 main (
int argc,
char const* argv[])
29 typedef double PrecisionType;
30 typedef itk::VectorImage<PrecisionType, 3> ImageType;
34 ImageType::Pointer sfImage = ImageType::New();
35 itk::ReadImage<ImageType>(_InputFile, sfImage);
40 shFit.SetSHRank(_SHRank);
42 shFit.SetLambda(_Lambda);
43 shFit.SetOrientations(grad);
44 shFit.SetPower(_Power);
47 typename UnaryFunctorFilterType::Pointer filter = UnaryFunctorFilterType::New();
49 if (_MaskImageFile!=
"")
50 filter->SetMaskImage(_MaskImageFile);
51 filter->SetInput(sfImage);
52 filter->SetFunctor(shFit);
56 if (_NumberOfThreads>0)
57 filter->SetNumberOfThreads(_NumberOfThreads);
59 if (_ShowProgressArg.isSet())
60 filter->AddObserver( itk::ProgressEvent(), observer );
64 ImageType::Pointer shImage = filter->GetOutput();
65 itk::SaveImage<ImageType>(shImage, _OutputFile);
helper functions specifically used in dmritool
used for debug information. this->GetDebug()
fit SH coefficients from spherical function samples.
SmartPointer< Self > Pointer
#define utlGlobalException(cond, expout)
int main(int argc, char const *argv[])
fit spherical function samples using SH basis
Implements vector-valued generic operation on one image.