You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Model construction moves from closed dispatch tables to open, module-level factories. Each of the camera, lidar and external distortion hierarchies gains a free <kind>_model_from_parameters() that dispatches on the parameter type, together with a register_<kind>_model hook so models defined outside NCore can participate. These replace the from_parameters / maybe_from_parameters static methods, which held an if/elif table over every concrete subclass, had to be edited to add a model, could not build an out-of-tree model, and were inherited by every subclass. The static methods remain as deprecated forwarders.
The three model base classes are now generic in their parameter type and declare get_parameters(), so a CameraModel, LidarModel or ExternalDistortionModel stays useful without narrowing to a concrete model first. The parameter type is covariant; plain
unparameterized annotations and isinstance checks are unaffected.
The abstract parameter bases carry the JSON (de)serialization interface, so parameters can be serialized through the abstract type. ExternalDistortionParameters is new: that hierarchy previously had an abstract model base but no abstract parameters base at all.
CameraModelParameters.transform returns Self consistently across the hierarchy. Two concrete overrides previously returned their own class with an unannotated self, which made them non-substitutable and collapsed the return type to the declaring class for generic callers.