11 #include "SHCoefficientsToGFACLP.h" 21 main (
int argc,
char const* argv[])
26 typedef double TScalarType;
28 typedef itk::Image<TScalarType,3> ImageType;
30 VectorImageType::Pointer shImage = VectorImageType::New();
34 FilterType::Pointer filter = FilterType::New();
38 filter->SetInput(shImage);
43 FilterType::Pointer shFilter = FilterType::New();
46 shFilter->SetInput(shImage);
47 shFilter->SetPower(_Power);
48 shFilter->SetSHRank(
utl::DimToRankSH(shImage->GetNumberOfComponentsPerPixel()));
52 VectorImageType::Pointer shPowerImage = shFilter->GetOutput();
53 filter->SetInput(shPowerImage);
57 ImageType::Pointer gfaImage = filter->GetOutput();
int main(int argc, char const *argv[])
Calculate GFA from SH coefficients.
helper functions specifically used in dmritool
void ReadVectorImage(const std::string &filename, SmartPointer< VectorImage< PixelType, 3 > > &image, const std::string &printInfo="Reading Image:")
bool SaveImage(const SmartPointer< ImageType > &image, const std::string &filename, const std::string &printInfo="Writing Image:")
int DimToRankSH(const int dimm)
In each vxoel, calculate gfa from SH coefficients.
itk::VectorImage< ScalarType, 3 > VectorImageType
In each vxoel, calculate gfa from SH coefficients Created "02-12-2014.
In each vxoel, the input VectorImage is a SH coefficient vector which represents a spherical function...