ITKElastix icon indicating copy to clipboard operation
ITKElastix copied to clipboard

SWIG build warning for `itk::ElastixLogLevel`

Open tbirdso opened this issue 2 years ago • 3 comments

Observed build warning with ITK v5.4rc2:

itkElastixRegistrationMethod: warning(4): ITK type not wrapped, or currently not known: itk::ElastixLogLevel
itkTransformixFilter: warning(4): ITK type not wrapped, or currently not known: itk::ElastixLogLevel

https://github.com/InsightSoftwareConsortium/ITKElastix/actions/runs/6723314415/job/18273138069

tbirdso avatar Nov 01 '23 18:11 tbirdso

Thanks for reporting. @tbirdso itk::ElastixLogLevel is a strongly typed enum, defined here:

https://github.com/SuperElastix/elastix/blob/5f0940d2ec5498a6bc98f53c3eaa6a0a1ccd74b3/Core/Main/itkElastixLogLevel.h

SWIG does support strongly typed enumerations:

https://www.swig.org/Doc3.0/CPlusPlus11.html#CPlusPlus11_strongly_typed_enumerations

So it should be fine, I'm not sure how to solve this issue 🤷 Do you have a suggestion?

N-Dekker avatar Nov 08 '23 21:11 N-Dekker

Perhaps take a look at https://github.com/InsightSoftwareConsortium/ITK/blob/master/Documentation/docs/migration_guides/itk_5_migration_guide.md#strongly-typed-enumerations? Concretely, add itk_wrap_simple_class("itk::ElastixLogLevel") to wrapping somewhere.

dzenanz avatar Nov 09 '23 17:11 dzenanz

@N-Dekker @dzenanz Thanks for the suggestions! This is a low-priority issue that (to my knowledge) is not holding up any work for now. I will not be able to lead a resolution, @dzenanz 's suggestion sounds like the best path forward if someone else would like to take that on.

tbirdso avatar Nov 09 '23 17:11 tbirdso