OdDbBlockTableRecord::getGeomExtents() does not take into account layers visibility. Layers can be frozen in viewports and extents can be different in different viewports.
See AbstractViewPE.h
This protocol extension can be applied to OdDbViewport, OdDbViewportTableRecord, OdDbViewTableRecord.
See sample code in Kernel/Examples/Exports/RasterExport