diff --git a/changelogs/diplib_next.md b/changelogs/diplib_next.md index 9aa22911..a3437ca4 100644 --- a/changelogs/diplib_next.md +++ b/changelogs/diplib_next.md @@ -70,7 +70,9 @@ None, but see bugfixes to *DIPlib*. ### Bug fixes -None, but see bugfixes to *DIPlib*. +- `dip.ChainCode.Length()` had a parameter `boundaryPixels` added in *DIPlib* 3.3.0, but the Python bindings + did not know about its default value. + (See also bugfixes to *DIPlib*.) ### Build and installation changes diff --git a/pydip/src/measurement.cpp b/pydip/src/measurement.cpp index 0c42a758..8d65f4f9 100644 --- a/pydip/src/measurement.cpp +++ b/pydip/src/measurement.cpp @@ -474,7 +474,7 @@ void init_measurement( py::module& m ) { chain.def_readonly( "is8connected", &dip::ChainCode::is8connected ); chain.def( "ConvertTo8Connected", &dip::ChainCode::ConvertTo8Connected ); chain.def( "Empty", &dip::ChainCode::Empty ); - chain.def( "Length", &dip::ChainCode::Length ); + chain.def( "Length", &dip::ChainCode::Length, "boundaryPixels"_a = dip::S::EXCLUDE ); chain.def( "Feret", &dip::ChainCode::Feret, "angleStep"_a = 5.0 / 180.0 * dip::pi ); chain.def( "BendingEnergy", &dip::ChainCode::BendingEnergy ); chain.def( "BoundingBox", []( dip::ChainCode const& self ) {