-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Add option to compute the Cramer-Rao Lower Bound. #620
Conversation
if (m_IsSpectralCT) | ||
{ | ||
rtk::ProjectionsDecompositionNegativeLogLikelihood::MeasuredDataType photon_counts; | ||
photon_counts.SetSize(forward.size()); | ||
photon_counts.SetData(forward.data_block()); | ||
cost->SetMeasuredData(photon_counts); | ||
cost->ComputeFischerMatrix(in); | ||
output1It.Set(cost->GetCramerRaoLowerBound()); | ||
} | ||
else | ||
{ | ||
output1It.Set( | ||
itk::VariableLengthVector<double>(cost->GetVariances(in).data_block(), this->m_NumberOfSpectralBins)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand this, it seems to disable the previous mode which was already for m_IsSpectralCT
true
. Was the behavior different before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function GetVariances
was not implemented for spectral CT. It was only returning meaningless results (see here). Furthermore, it was no possible to set the boolean m_ComputeVariances
to true with the rtkspectralforwardmodel
application.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok... Do you understand what it does for dual energy?
https://github.com/RTKConsortium/RTK/blob/master/include/rtkDualEnergyNegativeLogLikelihood.h#L126
I have a hard time understanding this code and the commit message does not help
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understood well, it is mentioned here that the variance of the integrated energy is assumed to be equal to the mean. Then, the function GetVariances is computing this:
which correspond to the mean signal measured by an energy integrating detector.
(This is my understanding but I'm not sure I'm right.)
Add option to obtain the Cramer-Rao Lower Bound (CRLB) when computing the photon counts using rtkSpectralForwardModelImageFilter. The CRLB corresponds to the lower bound of the variance of any unbiased estimator. Therefore, it could be used to estimate the variance that would be obtained after material decomposition.
fc2ca4b
to
6f0bfc2
Compare
The application was wrongfully removed by this commit (RTKConsortium@b1f0449#diff-22b5c767b274cb860bc3604b376958ddc1bc588a298153c14dcaf6d95db676b1L90)
6f0bfc2
to
45b0fa2
Compare
The last force-pushed improve the way the computation of the Cramer-Rao lower bound was implemented and add the computation of the variance also for spectral CT. |
Add option to obtain the Cramer-Rao Lower Bound (CRLB) when computing the photon counts using rtkSpectralForwardModelImageFilter. The CRLB corresponds to the lower bound of the variance of any unbiased estimator. Therefore, it could be used to estimate the variance that would be obtained after material decomposition.