18 #ifndef __itkBasisMatrixGenerator_hxx 19 #define __itkBasisMatrixGenerator_hxx 26 template<
typename TElement>
37 m_SamplingSchemeQSpace = SamplingSchemeQSpaceType::New();
38 m_SamplingSchemeRSpace = SamplingSchemeQSpaceType::New();
41 template<
typename TElement>
42 typename LightObject::Pointer
47 typename LightObject::Pointer loPtr = Superclass::InternalClone();
52 itkExceptionMacro(<<
"downcast to type " << this->GetNameOfClass()<<
" failed.");
55 rval->m_ODFOrder = m_ODFOrder;
56 rval->m_OutputType = m_OutputType;
59 rval->m_QBasisMatrixForDWI = m_QBasisMatrixForDWI;
61 rval->m_RBasisMatrixForEAP = m_RBasisMatrixForEAP;
62 rval->m_RBasisMatrixForODF = m_RBasisMatrixForODF;
64 rval->m_SamplingSchemeQSpace = m_SamplingSchemeQSpace;
65 rval->m_SamplingSchemeRSpace = m_SamplingSchemeRSpace;
70 template<
typename TElement>
75 Superclass::PrintSelf(os, indent);
76 PrintVar2(
true, m_MD0, m_ODFOrder, os<<indent);
77 PrintEnum3(
true, m_OutputType, DWI, EAP, ODF, os <<indent);
79 os << indent <<
"m_SamplingSchemeQSpace: " << m_SamplingSchemeQSpace << std::endl;
82 os << indent <<
"m_SamplingSchemeRSpace: " << m_SamplingSchemeRSpace << std::endl;
87 template<
typename TElement>
92 if (m_OutputType==DWI)
94 MatrixPointer qOrientations = m_SamplingSchemeQSpace->GetOrientationsCartesian();
97 utlGlobalException(bVector->size()==0 && qVector->size()==0,
"no qVector nor bVector for DWI output");
99 utlSAGlobalException(qVector->size()>0 && qVector->size()!=qOrientations->Rows())(qVector->size())(qOrientations->Rows()).msg(
"sizes are different");
100 utlSAGlobalException(bVector->size()>0 && bVector->size()!=qOrientations->Rows())(bVector->size())(qOrientations->Rows()).msg(
"sizes are different");
104 MatrixPointer rOrientations = m_SamplingSchemeRSpace->GetOrientationsCartesian();
106 utlGlobalException(rOrientations->Rows()==0,
"no rOrientations for ODF or EAP output");
107 utlGlobalException(m_OutputType==EAP && rVector->size()==0,
"no m_RVector for EAP output");
108 utlSAGlobalException(rVector->size()>0 && rVector->size()!=rOrientations->Rows())(rVector->size())(rOrientations->Rows()).msg(
"sizes are different");
void PrintUtlMatrix(const NDArray< T, 2 > &mat, const std::string &str="", const char *separate=" ", std::ostream &os=std::cout)
LightObject::Pointer InternalClone() const ITK_OVERRIDE
#define utlSAGlobalException(expr)
utl_shared_ptr< STDVectorType > STDVectorPointer
utl_shared_ptr< MatrixType > MatrixPointer
#define utlGlobalException(cond, expout)
SmartPointer< Self > Pointer
void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
virtual void VerifyInputParameters() const
#define utlShowPosition(cond)
#define PrintEnum3(cond, var, val1, val2, val3, os)
#define PrintVar2(cond, var1, var2, os)