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: set division threshold for SART #333

Merged
merged 1 commit into from
Apr 15, 2020

Conversation

acoussat
Copy link
Collaborator

My attempt at fixing #151. From what I understood of the problem, this should suffice, but I might be missing something. I guess the modifications are automatically propagated to the Python wrappings.
One remark though: the current implementation allows setting a negative threshold. Is that a problem? ITK seems to allow this behavior.

Copy link
Collaborator

@SimonRit SimonRit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done, I had no idea it was that simple. Please address my comments and we're done.

applications/rtksart/rtksart.cxx Outdated Show resolved Hide resolved
* noisy and/or simulated data.
*/
void
SetDivisionThreshold(ProjectionPixelType threshold);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use ITK macros itkSetMacro itkGetMacro for set and get (which is missing).

void
SARTConeBeamReconstructionFilter<TVolumeImage, TProjectionImage>::SetDivisionThreshold(ProjectionPixelType threshold)
{
m_DivideProjectionFilter->SetThreshold(threshold);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand now why you haven't used ITK macros. I used to do similar things and RTK is full of such strategies. I now think it's not good because if you change the threshold value, the filter is not modified and the filter won't update if you call Update() again. My suggestion: create a m_DivisionThreshold filter parameter, Set Get it with the ITK macros and pass it to the filter in the GenerateOutputInformation. That's the most readable solution I believe.

@acoussat
Copy link
Collaborator Author

Updated my commit. Hope everything is correct now!

@SimonRit SimonRit merged commit 260ff48 into RTKConsortium:master Apr 15, 2020
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