11 #include "SHCoefficientsPowerCLP.h" 22 main (
int argc,
char const* argv[])
29 typedef double PrecisionType;
30 typedef itk::VectorImage<PrecisionType, 3> ImageType;
33 FilterType::Pointer filter = FilterType::New();
35 ImageType::Pointer shImage = ImageType::New();
36 itk::ReadImage<ImageType>(_InputFile, shImage);
38 filter->SetInput(shImage);
39 filter->SetPower(_Power);
40 filter->SetSHRank(_SHRank>0 ? _SHRank :
utl::DimToRankSH(shImage->GetNumberOfComponentsPerPixel()));
43 if (_ShowProgressArg.isSet())
44 filter->AddObserver( itk::ProgressEvent(), observer );
47 if (_NumberOfThreads>0)
48 filter->SetNumberOfThreads(_NumberOfThreads);
52 ImageType::Pointer shPowerImage = filter->GetOutput();
53 itk::SaveImage<ImageType>(shPowerImage, _OutputFile);
int main(int argc, char const *argv[])
In each voxel, calculate a power function of a given spherical function. Both input function and outp...
helper functions specifically used in dmritool
int DimToRankSH(const int dimm)
SmartPointer< Self > Pointer
#define utlGlobalException(cond, expout)
In each vxoel, the input VectorImage is a SH coefficient vector which represents a spherical function...