19 #ifndef rtkProjectionsDecompositionNegativeLogLikelihood_h 20 #define rtkProjectionsDecompositionNegativeLogLikelihood_h 78 long double measure = 0;
85 itkExceptionMacro(<<
"Not implemented");
101 diag[mat] = 1. /
m_Fischer.GetInverse()[mat][mat];
129 virtual vnl_vector<double>
132 vnl_vector<double> attenuationFactors;
144 vnl_vector<double> vnlLineIntegrals;
149 vnlLineIntegrals[m] = lineIntegrals[m];
157 attenuationFactors[energy] = std::exp(-attenuationFactors[energy]);
171 MeanAttenuationInBin.Fill(0);
177 double accumulate = 0;
178 double accumulateWeights = 0;
184 accumulateWeights += this->m_IncidentSpectrum[0][energy];
186 MeanAttenuationInBin[mat][bin] = accumulate / accumulateWeights;
193 initialGuess[mat] = 1e10;
199 if (initialGuess[mat] > requiredLength)
200 initialGuess[mat] = requiredLength;
213 vnl_vector<double> ones, nonAttenuated;
229 return logTransforms;
232 virtual vnl_vector<double>
235 vnl_vector<double> meaninglessResult;
237 meaninglessResult.fill(0.);
238 return (meaninglessResult);
251 itkGetMacro(NumberOfEnergies,
unsigned int);
254 itkGetMacro(NumberOfMaterials,
unsigned int);
260 itkGetMacro(NumberOfSpectralBins,
unsigned int);
virtual vnl_vector< double > ForwardModel(const ParametersType &lineIntegrals) const
MaterialAttenuationsType m_MaterialAttenuations
unsigned int m_NumberOfEnergies
unsigned int m_NumberOfSpectralBins
void GetAttenuationFactors(const ParametersType &lineIntegrals, vnl_vector< double > &attenuationFactors) const
itk::VariableLengthVector< int > ThresholdsType
virtual void Initialize()
MeasuredDataType m_MeasuredData
ThresholdsType m_Thresholds
void GetDerivative(const ParametersType &, DerivativeType &) const override
~ProjectionsDecompositionNegativeLogLikelihood() override=default
itk::VariableLengthVector< double > BinwiseLogTransform() const
IncidentSpectrumType m_IncidentSpectrum
vnl_matrix< float > IncidentSpectrumType
#define itkSetMacro(name, type)
itk::VariableSizeMatrix< float > m_Fischer
virtual itk::VariableLengthVector< float > GetInverseCramerRaoLowerBound()
virtual itk::VariableLengthVector< float > GetFischerMatrix()
MeasureType GetValue(const ParametersType &) const override
Superclass::ParametersType ParametersType
itk::VariableLengthVector< double > GuessInitialization() const
vnl_matrix< double > MaterialAttenuationsType
DetectorResponseType m_DetectorResponse
Array< ParametersValueType > DerivativeType
unsigned int GetNumberOfParameters() const override
virtual void ComputeFischerMatrix(const ParametersType &)
ProjectionsDecompositionNegativeLogLikelihood()
Superclass::MeasureType MeasureType
unsigned int m_NumberOfMaterials
vnl_matrix< double > m_IncidentSpectrumAndDetectorResponseProduct
itk::VariableLengthVector< double > MeasuredDataType
virtual vnl_vector< double > GetVariances(const ParametersType &) const
vnl_matrix< double > DetectorResponseType