def contrast(self, vector):
        """Compute images of contrast and contrast variance.
        """
        # Compute the overall contrast across models
        c = self.glm[0].contrast(vector)
        for g in self.glm[1:]:
            c += g.contrast(vector)

        def affect_inmask(dest, src, xyz):
            if xyz is None:
                dest = src
            else:
                dest[xyz] = src
            return dest

        con = np.zeros(self.spatial_shape)
        con_img = Image(affect_inmask(con, c.effect, self.xyz), self.affine)
        vcon = np.zeros(self.spatial_shape)
        vcon_img = Image(affect_inmask(vcon, c.variance, self.xyz),
                         self.affine)
        z = np.zeros(self.spatial_shape)
        z_img = Image(affect_inmask(z, c.zscore(), self.xyz), self.affine)
        dof = c.dof
        return con_img, vcon_img, z_img, dof