DMRITool  v0.1.1-139-g860d86b4
Diffusion MRI Tool
itkDiscreteBasisMatrixGenerator.hxx
Go to the documentation of this file.
1 
18 #ifndef __itkDiscreteBasisMatrixGenerator_hxx
19 #define __itkDiscreteBasisMatrixGenerator_hxx
20 
22 
23 namespace itk
24 {
25 
26 template<typename TElement>
29  m_BasisOrientations(new MatrixType())
30 {
31  m_UseIsotropicTerm = false;
32 }
33 
34 template<typename TElement>
35 typename LightObject::Pointer
38 {
39  utlShowPosition(this->GetDebug());
40  typename LightObject::Pointer loPtr = Superclass::InternalClone();
41 
42  typename Self::Pointer rval = dynamic_cast<Self *>(loPtr.GetPointer());
43  if(rval.IsNull())
44  {
45  itkExceptionMacro(<< "downcast to type " << this->GetNameOfClass()<< " failed.");
46  }
47  rval->m_UseIsotropicTerm = m_UseIsotropicTerm;
48  rval->m_BasisOrientations = m_BasisOrientations;
49  return loPtr;
50 }
51 
52 template<typename TElement>
53 void
55 ::PrintSelf(std::ostream& os, Indent indent) const
56 {
57  Superclass::PrintSelf(os, indent);
58  PrintVar1(true, m_UseIsotropicTerm, os<<indent);
59 
60  utl::PrintUtlMatrix(*m_BasisOrientations, "m_BasisOrientations", " ", os<<indent);
61 }
62 
63 template<typename TElement>
64 void
67 {
68  Superclass::VerifyInputParameters();
69  utlGlobalException(m_BasisOrientations->Rows()==0, "no m_BasisOrientations");
70 }
71 
72 }
73 
74 
75 #endif
76 
77 
78 
#define PrintVar1(cond, var, os)
Definition: utlCoreMacro.h:447
void PrintUtlMatrix(const NDArray< T, 2 > &mat, const std::string &str="", const char *separate=" ", std::ostream &os=std::cout)
virtual void VerifyInputParameters() const ITK_OVERRIDE
#define utlGlobalException(cond, expout)
Definition: utlCoreMacro.h:372
LightObject::Pointer InternalClone() const ITK_OVERRIDE
#define utlShowPosition(cond)
Definition: utlCoreMacro.h:554
void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE