The images taken by the Heliospheric Imager (HI) instruments, part of the SECCHI imaging package on board the pair of STEREO spacecraft, provide information on the radial and latitudinal evolution of the plasma transported by coronal mass ejections (CMEs). In this case study, a CME, appearing near 15 UT on 2007 November 15 in SECCHI coronagraph images, leads to the formation of two out-flowing density structures (DSs) in the heliosphere. The analysis of time-elongation maps constructed from images obtained by the HI instruments shows that these DSs were propagating along the Sun-Earth line. A direct comparison of HI images and in situ measurements taken near Earth could therefore be performed. These two DSs are separated by a cavity associated with little brightness variation or equivalently little electron density variation. In situ measurements made in the solar wind near Earth on 2007 November 20 show that this cavity corresponds to a magnetic cloud (MC). While the leading DS is related to the sheath in front of the MC, the second DS is located on the sunward side of the MC where high-speed solar wind from a coronal hole catches up and interacts with the MC. We conclude that HI observes the sub-structures of a merged interaction region (MIR), a region of the interplanetary medium where the total solar wind pressure is greatly enhanced by the interaction of an MC with the ambient solar wind. This MIR caused the largest geomagnetic storm in 2007.