Skip to content

Commit 8bb0677

Browse files
authored
Merge pull request #41 from Inria-Visages/noddi
Noddi
2 parents c06a6b3 + 6f01376 commit 8bb0677

19 files changed

+1227
-101
lines changed

Anima/cmake/AnimaDependencies.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ else()
1111
endif()
1212

1313
# Boost
14-
find_package(Boost 1.40.0 REQUIRED)
14+
find_package(Boost 1.66.0 REQUIRED)
1515

1616
# TCLAP
1717
option(BUILD_TOOLS "Build command line executables" ON)

Anima/diffusion/mcm/animaMultiCompartmentModelCreator.cxx

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
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+
214244
void MultiCompartmentModelCreator::CreateDDICompartment(BaseCompartmentPointer &compartmentPointer, bool applyConstraints)
215245
{
216246
std::string error("DDI model not implemented in the public version of ANIMA");

Anima/diffusion/mcm/animaMultiCompartmentModelCreator.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ class ANIMAMCM_EXPORT MultiCompartmentModelCreator
7575
void CreateStickCompartment(BaseCompartmentPointer &compartmentPointer, bool applyConstraints);
7676
void CreateZeppelinCompartment(BaseCompartmentPointer &compartmentPointer, bool applyConstraints);
7777
void CreateTensorCompartment(BaseCompartmentPointer &compartmentPointer, bool applyConstraints);
78+
void CreateNODDICompartment(BaseCompartmentPointer &compartmentPointer, bool applyConstraints);
7879
virtual void CreateDDICompartment(BaseCompartmentPointer &compartmentPointer, bool applyConstraints);
7980

8081
CompartmentType m_CompartmentType;
@@ -93,7 +94,7 @@ class ANIMAMCM_EXPORT MultiCompartmentModelCreator
9394
bool m_UseCommonDiffusivities;
9495
bool m_UseCommonConcentrations;
9596
bool m_UseCommonExtraAxonalFractions;
96-
97+
9798
bool m_UserDefinedConcentrationBounds;
9899
double m_ConcentrationLowerBound;
99100
double m_ConcentrationUpperBound;

0 commit comments

Comments
 (0)