I have a 3D numpy array with 1's and 0's where the 1's represent a shape. I want to write a program in python that determines the largest cube that can be inscribed in the shape. I have seen this (Create largest volume inscribed 3D box that will fit within array of points) answer but it essentially recommends brute force, so I was wondering if there was any algorithm for this that is potentially faster?
Also, I need this algorithm so that I can determine the lowest resolution at which this shape can be made out. So, if there is not faster method to find the largest inscribed box, is there potentially another angle I could approach this resolution problem that is faster?