Skip to content

ENH: Migrate example itkGrayscaleFunctionDilateImageFilter #374

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jadh4v
Copy link
Member

@jadh4v jadh4v commented May 20, 2022

Migrate the itkGrayscaleFunctionDilateImageFilter.cxx example from ITK/Examples/Filtering to ITKSphinxExamples/src/Filtering/MathematicalMorphology/DilateAGrayscaleImage. New baseline output image added as OutputBaseline.png as it didn't exist in ITK before.

Input Output/Baseline
cthead1 Output

The baseline output image for testing was added to Girder (data.kitware.com) in a personal public folder here:
https://data.kitware.com/#item/6287b8184acac99f42cf8abb

Partially addresses #371

@jadh4v
Copy link
Member Author

jadh4v commented May 20, 2022

This is in draft mode, I want to add an equivalent python code as well.

@github-actions github-actions bot added area:Documentation Issues affecting the Documentation module area:Filtering Issues affecting the Filtering module language:C++ Changes to C++ examples type:Data Changes to example data (usually displayed images) type:Enhancement Improvement of existing methods or implementation type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots labels May 20, 2022
@jadh4v
Copy link
Member Author

jadh4v commented May 20, 2022

This is in draft mode, I want to add an equivalent python code as well.

Python Wrapping for module BinaryBallStructuringElement is missing. After a discussion with @tbirdso , I have decided to add the python example as a separate PR which can be merged and released later.

@jadh4v jadh4v marked this pull request as ready for review May 20, 2022 17:10
Copy link
Contributor

@tbirdso tbirdso left a comment

Choose a reason for hiding this comment

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

Looking great, thank you @jadh4v !

@tbirdso
Copy link
Contributor

tbirdso commented May 20, 2022

@jadh4v Would you be willing to add the wrappings for BinaryBallStructuringElement to ITK? A file named BinaryBallStructuringElement.wrap would need to be added to this folder with contents similar to line 2 in https://github.com/InsightSoftwareConsortium/ITK/blob/23da3dfa79152648f3d38050ee147df47f41ce0a/Modules/Filtering/MathematicalMorphology/wrapping/itkFlatStructuringElement.wrap#L2.

@tbirdso
Copy link
Contributor

tbirdso commented May 20, 2022

@jadh4v Please run clang-format on Code.cxx to fix Lint CI

@jadh4v jadh4v force-pushed the ENH-add-example-itkGrayscaleFunctionDilateImageFilter branch from afed4d5 to db06348 Compare May 20, 2022 18:53
@github-actions github-actions bot added the language:Python Changes to Python examples label May 20, 2022
@jadh4v jadh4v force-pushed the ENH-add-example-itkGrayscaleFunctionDilateImageFilter branch from db06348 to 50964ff Compare May 20, 2022 19:05
@jadh4v
Copy link
Member Author

jadh4v commented May 20, 2022

@jadh4v Please run clang-format on Code.cxx to fix Lint CI

Done. Also added the python code and added it to documentation.

@jadh4v jadh4v force-pushed the ENH-add-example-itkGrayscaleFunctionDilateImageFilter branch from 458dca4 to e02d467 Compare May 20, 2022 20:52
@jadh4v
Copy link
Member Author

jadh4v commented May 20, 2022

@tbirdso please re-run the pipeline now. I fixed the linting for python too.

@tbirdso
Copy link
Contributor

tbirdso commented May 22, 2022

@jadh4v Two documentation warnings via CDash:

ITKEx-build/src/Filtering/MathematicalMorphology/DilateUsingFunctionalGrayscale/Documentation.rst:4: WARNING: Title underline too short.

Resolution: Extend the title underline in DilateUsingFunctionalGrayscale/Documentation.rst to at least the width of the title string

checking consistency... /.../bld/ITKEx-build/src/Filtering/MathematicalMorphology/DilateUsingFunctionalGrayscale/Documentation.rst: WARNING: document isn't included in any toctree

Resolution: Please add a reference to DilateUsingFunctionalGrayscale/Documentation.rst in https://github.com/InsightSoftwareConsortium/ITKSphinxExamples/blob/master/src/Filtering/MathematicalMorphology/index.rst.

@thewtex
Copy link
Member

thewtex commented May 23, 2022

Hi @jadh4v , Could you please rebase on master -- there were package improvements unrelated to your patch that may be causing issues in CI.

@jadh4v jadh4v force-pushed the ENH-add-example-itkGrayscaleFunctionDilateImageFilter branch from e02d467 to e857cb6 Compare May 23, 2022 17:16
* Migrate the itkGrayscaleFunctionDilateImageFilter.cxx example from
`ITK/Examples/Filtering` to
`ITKSphinxExamples/src/Filtering/MathematicalMorphology/DilateAGrayscaleImage`.

* Add new baseline output image as `OutputBaseline.png`.

* Add an equivalent python implementation of the example.
@jadh4v
Copy link
Member Author

jadh4v commented Jan 23, 2025

I am going to resurrect this PR and see if we can merge this soon.

@jadh4v jadh4v force-pushed the ENH-add-example-itkGrayscaleFunctionDilateImageFilter branch from e857cb6 to 5067bf1 Compare January 23, 2025 15:50
@github-actions github-actions bot removed the type:Data Changes to example data (usually displayed images) label Jan 23, 2025
@github-actions github-actions bot added the type:Data Changes to example data (usually displayed images) label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Documentation Issues affecting the Documentation module area:Filtering Issues affecting the Filtering module language:C++ Changes to C++ examples language:Python Changes to Python examples type:Data Changes to example data (usually displayed images) type:Enhancement Improvement of existing methods or implementation type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants