Changing icon of a mounted disk image
The, e.g., osxfuse-2.8.2.dmg disk image file uses a hidden .icns file named .VolumeIcon.icns in the root of the volume and has the Custom Icon attribute set, probably using /usr/bin/SetFile. E.g.: SetFile -a C /Volumes/FUSE\ for\ OS\ X

You can also change the icon of the mounted disk image from its Info sheet. Place the wanted icon on the Clipboard then select the disk image on the Desktop and press Command-I then click the icon in the upper-left corner of the Info sheet and paste the wanted image there.