A computer-implemented method for visualizing a guidewire in a roadmap image comprising: generating a background mask as a function of at least one background image, by temporally averaging the image data of the at least one background image, wherein the at least one background image includes a blood vessel of interest, wherein no contrast agent or guidewire is present in the blood vessel; generating a contrast mask as a function of at least one contrast image, by finding the most positive pixel value for each of the pixel locations over the at least one contrast image, wherein the at least one contrast image includes a contrast agent within the blood vessel of interest; receiving a guidewire image , wherein the guidewire image includes a guidewire within the blood vessel of interest; linearizing the background mask, the contrast mask and the guidewire image, wherein the linearizing comprises applying a logarithmic function, a polynomial function or a linear-logarithm function, whereby in the linear-logarithm function a linear function is used on smaller signal and logarithm function is used on larger signal; generating a roadmap image as a function of the linearized background mask, the linearized contrast mask, the linearized guidewire image, and a weighting factor, wherein the weighting factor is determined as a function of a patient parameter, and wherein the roadmap image includes the blood vessel of interest, and the guidewire; and outputting the roadmap image to a display, wherein generating the roadmap image comprises: subtracting the linearized background mask from the linearized contrast mask; and subtracting the linearized background mask from the linearized guidewire image. generating a background mask as a function of at least one background image, by temporally averaging the image data of the at least one background image, wherein the at least one background image includes a blood vessel of interest, wherein no contrast agent or guidewire is present in the blood vessel; generating a contrast mask as a function of at least one contrast image, by finding the most positive pixel value for each of the pixel locations over the at least one contrast image, wherein the at least one contrast image includes a contrast agent within the blood vessel of interest; receiving a guidewire image , wherein the guidewire image includes a guidewire within the blood vessel of interest; linearizing the background mask, the contrast mask and the guidewire image, wherein the linearizing comprises applying a logarithmic function, a polynomial function or a linear-logarithm function, whereby in the linear-logarithm function a linear function is used on smaller signal and logarithm function is used on larger signal; generating a roadmap image as a function of the linearized background mask, the linearized contrast mask, the linearized guidewire image, and a weighting factor, wherein the weighting factor is determined as a function of a patient parameter, and wherein the roadmap image includes the blood vessel of interest, and the guidewire; and outputting the roadmap image to a display, wherein generating the roadmap image comprises: subtracting the linearized background mask from the linearized contrast mask; and subtracting the linearized background mask from the linearized guidewire image. subtracting the linearized background mask from the linearized contrast mask; and subtracting the linearized background mask from the linearized guidewire image. <EOS>