How to obtain the bounding box

How do I make a Region of Interest image with a bounding box like the one in the third image? both images are in Nifti format.
ni