Cuboid UV?

In Edit Mesh Modifiers you have Cast (Cuboid) that permits to deform an object to a cuboid form. I want to do the same with an UV. Is there any way or script to do this?