Skip to content

BUG: Add itk::GaussianOperator debug methods#3432

Merged
tbirdso merged 2 commits intoInsightSoftwareConsortium:masterfrom
tbirdso:add-gaussian-operator-debug
May 17, 2022
Merged

BUG: Add itk::GaussianOperator debug methods#3432
tbirdso merged 2 commits intoInsightSoftwareConsortium:masterfrom
tbirdso:add-gaussian-operator-debug

Conversation

@tbirdso
Copy link
Contributor

@tbirdso tbirdso commented May 17, 2022

Resolves #3430 by mimicking itk::Object debug interface methods so that itkDebugMacro implements valid debug code in itk::GaussianOperator.

itk::GaussianOperator inherits from the base itk::Neighborhood which is a lightweight object not inheriting from itk::Object or itk::LightObject. itk::GaussianOperator is more complex than other neighborhoods in that it takes in several user parameters and dynamically generates a discrete ND kernel function. In order to preserve the lightweight design of other itk::Neighborhood derivative classes while providing insight into the more complex inner workings of itk::GaussianOperator, it is reasonable to re-implement the itk::Object debug interface at the itk::GaussianOperator level.

Depends on #3431 hotfix.

PR Checklist

Refer to the ITK Software Guide for
further development details if necessary.

Hotfix for failing Linux/macOS builds where itkDebugMacro is not
supported in `itk::GaussianOperator`.
@tbirdso tbirdso requested a review from Leengit May 17, 2022 14:53
@github-actions github-actions bot added area:Core Issues affecting the Core module type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances labels May 17, 2022
@tbirdso
Copy link
Contributor Author

tbirdso commented May 17, 2022

@Leengit if you have time would you please try building this branch? CI checks passed in #3423 which originally introduced the error, so it seems like a different build system is needed to verify. I am working on verifying whether master fails without the hotfix on my Linux system, if so I will use my local system to verify as well.

@Leengit
Copy link
Contributor

Leengit commented May 17, 2022

@tbirdso I am building and will let you know.

@Leengit
Copy link
Contributor

Leengit commented May 17, 2022

@tbirdso It builds to completion on my setup:
Linux 5.13.0-41-generic #46~20.04.1-Ubuntu SMP Wed Apr 20 13:16:21 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
ninja 1.10.0

@tbirdso tbirdso force-pushed the add-gaussian-operator-debug branch from 4f4da40 to 6fae53b Compare May 17, 2022 15:38
@tbirdso
Copy link
Contributor Author

tbirdso commented May 17, 2022

@Leengit Great to hear! I am not able to reproduce the original error on my local Linux setup, so we will have to go with your system's ability to reproduce.

Addresses InsightSoftwareConsortium#3430 where `itkDebugMacro` fails in `itk::GaussianOperator`
because it does not inherit from `itk::Object` and therefore does not
implicitly define `GetDebug`.
@tbirdso tbirdso force-pushed the add-gaussian-operator-debug branch from 6fae53b to 5c44b7f Compare May 17, 2022 15:47
Copy link
Contributor

@Leengit Leengit left a comment

Choose a reason for hiding this comment

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

Thank you.

@tbirdso tbirdso marked this pull request as ready for review May 17, 2022 16:34
@tbirdso tbirdso merged commit 180c2b4 into InsightSoftwareConsortium:master May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Core Issues affecting the Core module type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances

Projects

None yet

Development

Successfully merging this pull request may close these issues.

itkDebugMacro errors in itk::GaussianOperator

3 participants