22
33#include < animaFreeWaterCompartment.h>
44#include < animaIsotropicRestrictedWaterCompartment.h>
5+ #include < animaNODDICompartment.h>
56#include < animaStationaryWaterCompartment.h>
67#include < animaStickCompartment.h>
78#include < animaTensorCompartment.h>
@@ -132,6 +133,10 @@ MultiCompartmentModelCreator::MCMPointer MultiCompartmentModelCreator::GetNewMul
132133 case Tensor:
133134 this ->CreateTensorCompartment (tmpPointer,applyCommonConstraints);
134135 break ;
136+
137+ case NODDI:
138+ this ->CreateNODDICompartment (tmpPointer,applyCommonConstraints);
139+ break ;
135140
136141 case DDI:
137142 this ->CreateDDICompartment (tmpPointer,applyCommonConstraints);
@@ -161,7 +166,7 @@ void MultiCompartmentModelCreator::CreateStickCompartment(BaseCompartmentPointer
161166
162167 stickComp->SetAxialDiffusivity (m_AxialDiffusivity);
163168 stickComp->SetRadialDiffusivity1 ((m_RadialDiffusivity1 + m_RadialDiffusivity2) / 2.0 );
164-
169+
165170 if (applyConstraints)
166171 {
167172 if (m_UseCommonDiffusivities)
@@ -180,7 +185,6 @@ void MultiCompartmentModelCreator::CreateZeppelinCompartment(BaseCompartmentPoin
180185
181186 zepComp->SetAxialDiffusivity (m_AxialDiffusivity);
182187 zepComp->SetRadialDiffusivity1 ((m_RadialDiffusivity1 + m_RadialDiffusivity2) / 2.0 );
183- zepComp->SetRadialDiffusivity2 (m_RadialDiffusivity2);
184188
185189 if (applyConstraints)
186190 {
@@ -211,6 +215,32 @@ void MultiCompartmentModelCreator::CreateTensorCompartment(BaseCompartmentPointe
211215 compartmentPointer = tensComp;
212216}
213217
218+ void MultiCompartmentModelCreator::CreateNODDICompartment (BaseCompartmentPointer &compartmentPointer, bool applyConstraints)
219+ {
220+ typedef anima::NODDICompartment NODDIType;
221+
222+ NODDIType::Pointer noddiComp = NODDIType::New ();
223+ noddiComp->SetEstimateAxialDiffusivity (!m_UseConstrainedDiffusivity);
224+
225+ noddiComp->SetOrientationConcentration (m_OrientationConcentration);
226+ noddiComp->SetExtraAxonalFraction (m_ExtraAxonalFraction);
227+ noddiComp->SetAxialDiffusivity (m_AxialDiffusivity);
228+
229+ if (applyConstraints)
230+ {
231+ if (m_UseCommonDiffusivities)
232+ noddiComp->SetEstimateAxialDiffusivity (false );
233+
234+ if (this ->GetUseCommonConcentrations ())
235+ noddiComp->SetEstimateOrientationConcentration (false );
236+
237+ if (this ->GetUseCommonExtraAxonalFractions ())
238+ noddiComp->SetEstimateExtraAxonalFraction (false );
239+ }
240+
241+ compartmentPointer = noddiComp;
242+ }
243+
214244void MultiCompartmentModelCreator::CreateDDICompartment (BaseCompartmentPointer &compartmentPointer, bool applyConstraints)
215245{
216246 std::string error (" DDI model not implemented in the public version of ANIMA" );
0 commit comments