4 #include <itkVectorImage.h> 22 template <
class TPixelScalarType>
63 itkSetMacro(NumberOfT2Compartments,
unsigned int)
64 itkSetMacro(MyelinThreshold,
double)
65 itkSetMacro(LowerT2Bound,
double)
66 itkSetMacro(UpperT2Bound,
double)
67 itkSetMacro(EchoSpacing,
double)
68 itkSetMacro(RegularizationIntensity,
double)
70 void SetT1Map(InputImageType *map) {m_T1Map = map;}
73 itkSetMacro(NLEstimation,
bool)
77 itkSetMacro(PatchHalfSize,
unsigned int)
78 itkSetMacro(SearchNeighborhood,
unsigned int)
79 itkSetMacro(SearchStepSize,
unsigned int)
80 itkSetMacro(WeightThreshold,
double)
81 itkSetMacro(BetaParameter,
double)
82 itkSetMacro(MeanMinThreshold,
double)
83 itkSetMacro(VarMinThreshold,
double)
85 itkSetMacro(AverageSignalThreshold,
double)
93 itkSetMacro(T2ExcitationFlipAngle,
double)
94 itkSetMacro(B1MaximumOptimizerIterations,
unsigned int)
95 itkSetMacro(B1OptimizerStopCondition,
double)
96 itkSetMacro(B1OptimizerInitialStep,
double)
97 itkSetMacro(B1Tolerance,
double)
100 void SetT2FlipAngles(
double singleAngle,
unsigned int numAngles) {m_T2FlipAngles = std::vector <double> (numAngles,singleAngle);}
107 this->SetNumberOfRequiredOutputs(4);
109 for (
unsigned int i = 0;i < 4;++i)
110 this->SetNthOutput(i, this->MakeOutput(i));
112 m_AverageSignalThreshold = 0;
114 m_RegularizationIntensity = 1.08;
116 m_NumberOfT2Compartments = 40;
117 m_MyelinThreshold = 50;
119 m_UpperT2Bound = 2000;
121 m_NLEstimation =
false;
123 m_T2ExcitationFlipAngle = M_PI / 6;
124 m_B1Tolerance = 1.0e-4;
125 m_B1MaximumOptimizerIterations = 200;
126 m_B1OptimizerStopCondition = 1.0e-4;
127 m_B1OptimizerInitialStep = 10;
129 m_MeanMinThreshold = 0.95;
130 m_VarMinThreshold = 0.5;
131 m_WeightThreshold = 0.0;
132 m_BetaParameter = 1.0;
134 m_SearchStepSize = 3;
135 m_SearchNeighborhood = 6;
136 m_LocalNeighborhood = 1;
149 std::vector <double> &workDataWeights, std::vector <OutputVectorType> &workDataSamples);
157 void operator=(
const Self&);
159 unsigned int m_NumberOfT2Compartments;
160 double m_MyelinThreshold;
161 double m_LowerT2Bound;
162 double m_UpperT2Bound;
163 double m_AverageSignalThreshold;
174 std::vector <PatchSearcherType> m_NLPatchSearchers;
175 double m_MeanMinThreshold;
176 double m_VarMinThreshold;
177 double m_WeightThreshold;
178 double m_BetaParameter;
180 unsigned int m_PatchHalfSize;
181 unsigned int m_SearchStepSize;
182 unsigned int m_SearchNeighborhood;
183 unsigned int m_LocalNeighborhood;
189 std::vector <double> m_T2CompartmentValues;
190 double m_EchoSpacing;
191 double m_RegularizationIntensity;
192 std::vector <double> m_T2FlipAngles;
193 double m_T2ExcitationFlipAngle;
195 double m_B1Tolerance;
196 double m_B1OptimizerInitialStep;
197 double m_B1OptimizerStopCondition;
198 unsigned int m_B1MaximumOptimizerIterations;
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) ITK_OVERRIDE
OutputImageType::Pointer OutputImagePointer
itk::SmartPointer< Self > Pointer
MultiT2RelaxometryEstimationImageFilter()
void BeforeThreadedGenerateData() ITK_OVERRIDE
itk::SmartPointer< const Self > ConstPointer
itk::Image< TPixelScalarType, 3 > TOutputImage
void PrepareNLPatchSearchers()
VectorOutputImageType::Pointer VectorOutputImagePointer
void SetT2FlipAngles(std::vector< double > &flipAngles)
void ComputeTikhonovPrior(const IndexType &refIndex, OutputVectorType &refDistribution, PatchSearcherType &nlPatchSearcher, T2VectorType &priorDistribution, std::vector< double > &workDataWeights, std::vector< OutputVectorType > &workDataSamples)
VectorOutputImageType * GetT2OutputImage()
InputImageType * GetM0OutputImage()
void SetT1Map(InputImageType *map)
VectorOutputImageType::PixelType OutputVectorType
Superclass::OutputImageRegionType OutputImageRegionType
InputImageType::Pointer InputImagePointer
InputImageType * GetMWFOutputImage()
virtual ~MultiT2RelaxometryEstimationImageFilter()
Implements multi-peak T2 relaxometry estimation (with or without regularization)
NNLSOptimizerType::ParametersType T2VectorType
double ComputeTikhonovRegularizedSolution(anima::NNLSOptimizer *nnlsOpt, DataMatrixType &AMatrix, T2VectorType &signalValues, double lambdaSq, T2VectorType &priorDistribution, T2VectorType &t2OptimizedWeights)
void CheckComputationMask() ITK_OVERRIDE
InputImageType * GetCostOutputImage()
itk::Image< TPixelScalarType, 3 > TInputImage
MultiT2RelaxometryEstimationImageFilter Self
NNLSOptimizerType::MatrixType DataMatrixType
itk::VectorImage< TPixelScalarType, 3 > VectorOutputImageType
anima::MaskedImageToImageFilter< TInputImage, TOutputImage > Superclass
TOutputImage OutputImageType
Non negative least squares optimizer. Implements Lawson et al method, of squared problem is activated...
InputImageType::IndexType IndexType
Superclass::MaskImageType MaskImageType
void SetT2FlipAngles(double singleAngle, unsigned int numAngles)
NNLSOptimizerType::Pointer NNLSOptimizerPointer
TInputImage InputImageType
InputImageType * GetT1Map()
InputImageType * GetB1OutputImage()
Superclass::InputImageRegionType InputImageRegionType