18 #ifndef __itkMeshFromDiscreteFiberODFImageFilter_h 19 #define __itkMeshFromDiscreteFiberODFImageFilter_h 35 template <
class TInputImage,
class TOutputMesh=vtkPolyData>
95 itkSetMacro(Radius,
double);
96 itkGetMacro(Radius,
double);
101 InputImageConstPointer inputPtr = this->GetInput();
102 unsigned int inputPixelDimension = inputPtr->GetNumberOfComponentsPerPixel();
106 (m_BasisMatrixGenerator->GetNumberOfBasis())(inputPixelDimension)
107 .msg(
"no m_BasisMatrixGenerator");
111 if (m_BasisMatrixGenerator->GetOutputType()==BasisMatrixGeneratorType::DWI)
113 m_BasisMatrixGenerator->GetSamplingSchemeQSpace()->SetOrientationsCartesian(this->m_Orientations);
114 STDVectorPointer bVec = m_BasisMatrixGenerator->GetSamplingSchemeQSpace()->GetBVector();
115 utlGlobalException(bVec->size()==0 && m_Radius<0,
"need to set m_Radius (b value) for DWI");
116 if (bVec->size()==0 && m_Radius>=0)
119 else if (m_BasisMatrixGenerator->GetOutputType()==BasisMatrixGeneratorType::EAP)
121 m_BasisMatrixGenerator->GetSamplingSchemeRSpace()->SetOrientationsCartesian(this->m_Orientations);
122 STDVectorPointer rVec = m_BasisMatrixGenerator->GetSamplingSchemeRSpace()->GetRadiusVector();
123 utlGlobalException(rVec->size()==0 && m_Radius<0,
"need to set m_Radius (r value) for EAP");
124 if (rVec->size()==0 && m_Radius>=0)
127 else if (m_BasisMatrixGenerator->GetOutputType()==BasisMatrixGeneratorType::ODF)
129 m_BasisMatrixGenerator->GetSamplingSchemeRSpace()->SetOrientationsCartesian(this->m_Orientations);
133 m_BasisMatrixGenerator->Flip(this->m_Flip[0], this->m_Flip[1], this->m_Flip[2]);
134 m_BasisMatrixGenerator->ComputeBasisMatrix();
135 this->m_BasisMatrix = m_BasisMatrixGenerator->GetBasisMatrix();
136 return this->m_BasisMatrix;
142 m_BasisMatrixGenerator = NULL;
150 Superclass::PrintSelf(os, indent);
151 if (m_BasisMatrixGenerator)
152 m_BasisMatrixGenerator->Print(std::cout<<
"m_BasisMatrixGenerator");
165 void operator=(
const Self&);
Superclass::OutputMeshScalarType OutputMeshScalarType
Compute mesh from discrete fiber ODF represented by a set of basis functions.
BasisMatrixGenerator< double > BasisMatrixGeneratorType
Superclass::STDVectorPointer STDVectorPointer
Superclass::OutputMeshPolyDataPointer OutputMeshPolyDataPointer
InputImageType::PointType InputImagePointType
InputImageType::SizeValueType InputImageSizeValueType
Superclass::OutputMeshPointsType OutputMeshPointsType
Superclass::VectorType VectorType
MeshFromDiscreteFiberODFImageFilter Self
void MatchBVectorAndGradientMatrix(const T &br, std::vector< T > &vec, const NDArray< T, 2 > &grad)
Superclass::OutputMeshRGBType OutputMeshRGBType
InputImageType::ConstPointer InputImageConstPointer
#define utlSAGlobalException(expr)
MatrixPointer ComputeBasisMatrix() ITK_OVERRIDE
Superclass::MaskImageType MaskImageType
BasisMatrixGeneratorType::Pointer BasisMatrixGeneratorPointer
SphereTessellatorType::BasicShapeType BasicShapeType
InputImageType::SpacingType InputImageSpacingType
Superclass::OutputMeshCellArrayType OutputMeshCellArrayType
Superclass::VectorPointer VectorPointer
MeshFromContinuousSphericalFunctionImageFilter< TInputImage, TOutputMesh > Superclass
Superclass::STDVectorType STDVectorType
TOutputMesh OutputMeshPolyDataType
Superclass::OutputMeshRGBType OutputMeshRGBType
#define utlGlobalException(cond, expout)
InputImageType::RegionType InputImageRegionType
Superclass::OutputMeshScalarType OutputMeshScalarType
InputImageType::IndexType InputImageIndexType
SmartPointer< Self > Pointer
~MeshFromDiscreteFiberODFImageFilter()
Superclass::OutputMeshPolyDataPointer OutputMeshPolyDataPointer
SmartPointer< Self > Pointer
SphereTessellator< double > SphereTessellatorType
SphereTessellatorType::Pointer SphereTessellatorPointer
Superclass::STDVectorType STDVectorType
InputImageType::Pointer InputImagePointer
Superclass::VectorType VectorType
Superclass::MatrixType MatrixType
TInputImage InputImageType
Compute mesh from continuous spherical function linearly represented by a set of bases.
Image< double, 3 > MaskImageType
Superclass::MatrixPointer MatrixPointer
#define utlShowPosition(cond)
Superclass::STDVectorPointer STDVectorPointer
Superclass::VectorPointer VectorPointer
MeshFromDiscreteFiberODFImageFilter()
InputImageType::PixelType InputImagePixelType
InputImageType::SizeType InputImageSizeType
SmartPointer< Self > Pointer
Superclass::OutputMeshCellArrayType OutputMeshCellArrayType
SmartPointer< const Self > ConstPointer
Tesselates a sphere via subdivision of tetrahedron, octahedron, or icosahedron.
void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
Superclass::MatrixType MatrixType
Superclass::MatrixPointer MatrixPointer
Superclass::OutputMeshPointsType OutputMeshPointsType
BasisMatrixGeneratorPointer m_BasisMatrixGenerator