19 #ifndef __itkDiffusionModelEstimationImageFilter_hxx 20 #define __itkDiffusionModelEstimationImageFilter_hxx 27 template<
class TInputImage,
class TOutputImage >
34 m_SamplingSchemeQSpace = SamplingSchemeQSpaceType::New();
37 template<
class TInputImage,
class TOutputImage >
38 typename LightObject::Pointer
43 typename LightObject::Pointer loPtr = Superclass::InternalClone();
48 itkExceptionMacro(<<
"downcast to type " << this->GetNameOfClass()<<
" failed.");
51 rval->m_SamplingSchemeQSpace = m_SamplingSchemeQSpace->Clone();
54 rval->m_RegularizationWeight = m_RegularizationWeight;
55 rval->m_BasisMatrix = m_BasisMatrix;
62 template<
class TInputImage,
class TOutputImage >
69 this->VerifyMaskInformation();
71 utlGlobalException(m_SamplingSchemeQSpace->GetBVector()->size()==0 && m_SamplingSchemeQSpace->GetRadiusVector()->size()==0,
"no b values nor q values");
75 int dwiNumber = inputPtr->GetNumberOfComponentsPerPixel();
76 utlGlobalException(dwiNumber!=m_SamplingSchemeQSpace->GetNumberOfSamples(),
"the size of gradients and the size of DWIs are not the same");
77 utlGlobalException(m_SamplingSchemeQSpace->GetRadiusVector()->size()!=m_SamplingSchemeQSpace->GetNumberOfSamples(),
"the size of gradients and the size of b values are not the same");
80 template<
class TInputImage,
class TOutputImage >
85 Superclass::PrintSelf(os, indent);
88 os << indent <<
"m_SamplingSchemeQSpace = " << m_SamplingSchemeQSpace << std::endl;
base filter for estimation of diffusion models
#define PrintVar1(cond, var, os)
bool IsImageEmpty(const SmartPointer< ImageType > &image)
void PrintUtlMatrix(const NDArray< T, 2 > &mat, const std::string &str="", const char *separate=" ", std::ostream &os=std::cout)
DiffusionModelEstimationImageFilter()
SmartPointer< Self > Pointer
void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
LightObject::Pointer InternalClone() const ITK_OVERRIDE
#define utlGlobalException(cond, expout)
virtual void VerifyInputParameters() const
#define itkShowPositionThreadedLogger(cond)
void PrintUtlVector(const NDArray< T, 1 > &vec, const std::string &str="", const char *separate=" ", std::ostream &os=std::cout, bool showStats=true)
InputImageType::ConstPointer InputImageConstPointer