Find bounding box dimensions either within or surrounding arbitrary containers