Tailoring radiative properties with magnetic polaritons in deep gratings and slit arrays based on structural transformation