I've run across an issue trying to use ImageCodec::SetDimensions() in Python 3.9 on Ubuntu 20.04:
>>> import gdcm >>> codec = gdcm.JPEG2000Codec() >>> codec.SetDimensions((64, 64, 1)) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/.../GDCM/build/bin/gdcmswig.py", line 14277, in SetDimensions return _gdcmswig.ImageCodec_SetDimensions(self, *args) TypeError: Wrong number or type of arguments for overloaded function 'ImageCodec_SetDimensions'. Possible C/C++ prototypes are: gdcm::ImageCodec::SetDimensions(unsigned int const [3]) gdcm::ImageCodec::SetDimensions(std::vector< unsigned int,std::allocator< unsigned int > > const &)
I think this is due SWIG not being able to resolve the ambiguity and I have a hackjob solution (see attached diff). I'm sure there's a better way to fix it, but I don't have enough experience with SWIG to do so.
fixed in 20e4ce7a6
thanks