Yes very easy you just need the stock factory image and a software to flash the image to your phone to like Oden.
I have rooted my phone, bricked it, and restored it to stock but be sure to reset the flash counter with triangle away! :)
I also have an sgs4 and have restored it to stock, I got...