Skip to content
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

Merged
merged 3 commits into from
Sep 30, 2024

Conversation

arobert01
Copy link
Collaborator

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.

Comment on lines 474 to 521
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));
}
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator

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

Copy link
Collaborator Author

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:

$$\int_0^\infty E S_{eff}(E)exp(-\sum_{\alpha=1}^{M=2} f_\alpha A_\alpha)dE$$

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.
@arobert01
Copy link
Collaborator Author

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.

@SimonRit SimonRit merged commit 526ca7c into RTKConsortium:master Sep 30, 2024
30 of 56 checks passed
@arobert01 arobert01 deleted the cramer-rao branch October 24, 2024 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants