18 #ifndef __itkDiffusionModelGenerator_h 19 #define __itkDiffusionModelGenerator_h 21 #include "itkObject.h" 34 template<
class PreciseType =
double>
63 typedef SamplingSchemeQSpaceType::PointType
PointType;
67 itkSetObjectMacro(SamplingSchemeRSpace, SamplingSchemeRSpaceType);
68 itkGetObjectMacro(SamplingSchemeRSpace, SamplingSchemeRSpaceType);
70 itkSetMacro(ODFOrder,
int);
71 itkGetMacro(ODFOrder,
int);
73 itkGetMacro(DWISamples, VectorPointer);
74 itkGetMacro(ODFSamples, VectorPointer);
75 itkGetMacro(EAPSamples, VectorPointer);
77 virtual void Rotate (
const MatrixType& mat)
95 utlGlobalException(m_SamplingSchemeQSpace->GetNumberOfSamples()>0 && m_SamplingSchemeRSpace->GetNumberOfSamples()>0
96 && (std::fabs(m_SamplingSchemeQSpace->GetDeltaBig()- m_SamplingSchemeRSpace->GetDeltaBig())>1e-8 || std::fabs(m_SamplingSchemeQSpace->GetDeltaSmall()- m_SamplingSchemeRSpace->GetDeltaSmall())>1e-8)
97 ,
"inconsistent m_DeltaBig or m_DeltaSmall in m_SamplingSchemeQSpace and m_SamplingSchemeRSpace");
103 m_DWISamples(new VectorType()),
104 m_ODFSamples(new VectorType()),
105 m_EAPSamples(new VectorType())
108 m_SamplingSchemeQSpace = SamplingSchemeQSpaceType::New();
109 m_SamplingSchemeRSpace = SamplingSchemeRSpaceType::New();
118 Superclass::PrintSelf(os, indent);
119 if (m_SamplingSchemeQSpace->GetNumberOfSamples()>0)
121 os << indent <<
"m_SamplingSchemeQSpace = " << m_SamplingSchemeQSpace << std::endl;
124 if (m_SamplingSchemeRSpace->GetNumberOfSamples()>0)
126 os << indent <<
"m_SamplingSchemeRSpace = " << m_SamplingSchemeRSpace << std::endl;
135 typename LightObject::Pointer loPtr = Superclass::InternalClone();
137 typename Self::Pointer rval =
dynamic_cast<Self *
>(loPtr.GetPointer());
140 itkExceptionMacro(<<
"downcast to type " << this->GetNameOfClass()<<
" failed.");
143 rval->m_SamplingSchemeQSpace = m_SamplingSchemeQSpace;
144 rval->m_SamplingSchemeRSpace = m_SamplingSchemeRSpace;
145 rval->m_ODFOrder = m_ODFOrder;
147 rval->m_DWISamples = m_DWISamples;
148 rval->m_ODFSamples = m_ODFSamples;
149 rval->m_EAPSamples = m_EAPSamples;
167 void operator=(
const Self&);
virtual void ComputeODFSamples()
utl_shared_ptr< STDVectorType > STDVectorPointer
void PrintVnlVector(const vnl_vector< T > &vec, const std::string &str="", const char *separate=" ", std::ostream &os=std::cout)
generate ground truth DWI/EAP/ODF ets from a given model
#define PrintVar1(cond, var, os)
SamplingSchemeQSpaceType::PointType PointType
SamplingSchemeRSpaceType::Pointer SamplingSchemeRSpacePointer
utl_shared_ptr< MatrixType > MatrixPointer
void PrintSelf(std::ostream &os, Indent indent) const
VectorPointer m_ODFSamples
utl_shared_ptr< VectorType > VectorPointer
VectorPointer m_EAPSamples
SmartPointer< const Self > ConstPointer
#define utlGlobalException(cond, expout)
vnl_vector< double > VectorType
DiffusionModelGenerator()
virtual void ComputeEAPSamples()
this class describes sampling in a 3D space (Q space or R space).
this class describes sampling in Q space.
SmartPointer< Self > Pointer
LightObject::Pointer InternalClone() const
SamplingScheme3D< double > SamplingSchemeRSpaceType
SamplingSchemeQSpaceType::Pointer SamplingSchemeQSpacePointer
virtual ~DiffusionModelGenerator()
SamplingSchemeQSpacePointer m_SamplingSchemeQSpace
std::vector< double > STDVectorType
virtual void ComputeDWISamples()
SamplingSchemeQSpace< double > SamplingSchemeQSpaceType
vnl_matrix< double > MatrixType
VectorPointer m_DWISamples
SamplingSchemeRSpacePointer m_SamplingSchemeRSpace
SmartPointer< Self > Pointer
virtual void Rotate(const MatrixType &mat)
SmartPointer< Self > Pointer
virtual void VerifyInputParameters() const
DiffusionModelGenerator Self