19 #ifndef rtkProjectionsDecompositionNegativeLogLikelihood_h 20 #define rtkProjectionsDecompositionNegativeLogLikelihood_h 49 #ifdef itkOverrideGetNameOfClassMacro 82 long double measure = 0;
89 itkExceptionMacro(<<
"Not implemented");
105 diag[mat] = 1. /
m_Fischer.GetInverse()[mat][mat];
119 diag[mat] =
m_Fischer.GetInverse()[mat][mat];
147 virtual vnl_vector<double>
150 vnl_vector<double> attenuationFactors;
162 vnl_vector<double> vnlLineIntegrals;
167 vnlLineIntegrals[m] = lineIntegrals[m];
175 attenuationFactors[energy] = std::exp(-attenuationFactors[energy]);
189 MeanAttenuationInBin.Fill(0);
195 double accumulate = 0;
196 double accumulateWeights = 0;
202 accumulateWeights += this->m_IncidentSpectrum[0][energy];
204 MeanAttenuationInBin[mat][bin] = accumulate / accumulateWeights;
211 initialGuess[mat] = 1e10;
217 if (initialGuess[mat] > requiredLength)
218 initialGuess[mat] = requiredLength;
231 vnl_vector<double> ones, nonAttenuated;
247 return logTransforms;
250 virtual vnl_vector<double>
253 vnl_vector<double> meaninglessResult;
255 meaninglessResult.fill(0.);
256 return (meaninglessResult);
269 itkGetMacro(NumberOfEnergies,
unsigned int);
272 itkGetMacro(NumberOfMaterials,
unsigned int);
278 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
virtual itk::VariableLengthVector< float > GetCramerRaoLowerBound()
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