This procedure is usually performed before and after injection of a smooth-muscle-relaxing medication into the penis, which normally should significantly increase the diameter of the penile arteries. The procedure itself is painless. Duplex ultrasonography is most useful in evaluating possible penile arterial disorders, but in those individuals considering surgery for problems with the arteries to the penis, a more invasive study, angiogram, is needed to identify the location of the damaged artery.
Erectile dysfunction can occur as a side effect of medication taken for another health condition. Common culprits are high blood pressure meds, antidepressants, some diuretics, beta-blockers, heart medication, cholesterol meds, antipsychotic drugs, hormone drugs, corticosteroids, chemotherapy, and medication for male pattern baldness, among others.
This is similar to magnetic resonance imaging. Magnetic resonance angiography uses magnetic fields and radio waves to provide detailed images of the blood vessels. Doctors may inject a "contrast agent" into the person's bloodstream that causes vascular tissues to stand out against other tissues. The contrast agent provides for enhanced information regarding blood supply and vascular anomalies.
If laboratory tests are performed, they would normally start with an evaluation of your hormone status (testosterone or male hormone), particularly if one of your symptoms is low sexual desire (low libido). Blood tests for testosterone should ideally be taken early in the morning because that's when levels are usually at their highest. It is recommended that if the first testosterone level is low to repeat it as testosterone levels can vary. If the testosterone level is low, other blood tests, such a luteinizing hormone and prolactin, can help determine if there is a problem with the pituitary gland.
The Massachusetts Male Aging Study (MMAS) documented an inverse correlation between ED risk and high-density lipoprotein (HDL) cholesterol levels but did not identify any effect from elevated total cholesterol levels.  Another study involving male subjects aged 45-54 years found a correlation with abnormal HDL cholesterol levels but also found a correlation with elevated total cholesterol levels. The MMAS included a preponderance of older men.
Nerves originating in the spinal cord and peripheral ganglia innervate the penis. There are autonomic (parasympathetic and sympathetic), and somatic separate and integrated pathways. The autonomic pathways neurons originate in the spinal cord and peripheral ganglia from the sympathetic and parasympathetic systems, respectively. They merge to form the cavernous nerves that travel alongside the prostate, enter the corpora cavernosa and corpus spongiosum to affect the neurovascular events required for tumescence and detumescence. The somatic nerves send sensory information from the penile skin, glans, and urethra via the dorsal penile nerve and pudendal nerve to the spinal cord. The somatic nerves also initiate contraction of the ischio- and bulbocavernosus muscles.
Cosgrove et al reported a higher rate of sexual dysfunction in veterans with posttraumatic stress disorder (PTSD) than in veterans who did not develop this problem.  The domains on the International Index of Erectile Function (IIEF) questionnaire that demonstrated the most change included overall sexual satisfaction and erectile function. [43, 44] Men with PTSD should be evaluated and treated if they have sexual dysfunction.
Erections are neurovascular events, meaning that nerves and blood vessels (arteries and veins) are involved in the process of an erection and all must work properly to develop a hard erection that lasts long enough. Erection begins with sexual stimulation. Sexual stimulation can be tactile (for example, by a partner touching the penis or by masturbation) or mental (for example, by having sexual fantasies, viewing porn). Sexual stimulation or sexual arousal causes the nerves going to the penis to release a chemical, nitric oxide. Nitric oxide increases the production of another chemical, cyclic GMP (cGMP), in the muscle of the corpora cavernosa. The cGMP causes the muscles of the corpora cavernosa to relax, and this allows more blood to flow into the penis. The incoming blood fills the corpora cavernosa, making the penis expand.
Treatment depends on the underlying cause. In general, exercise, particularly of the aerobic type, is effective for preventing ED during midlife. Exercise as a treatment is under investigation.:6, 18–19 For tobacco smokers, cessation often results in a significant improvement. Oral pharmacotherapy and vacuum erection devices are first-line treatments,:20, 24 followed by injections of drugs into the penis, as well as penile implants.:25–26 Vascular reconstructive surgeries are beneficial in certain groups.
Erythrocytosis has been noted in men on TRT, and should be monitored every 6–12 months depending upon the patients’ response to changes in haematocrit levels. For mild elevations, the dosage of testosterone can be decreased or the interval of using the medication can be increased. With the haematocrit greater than 50%, decisions to temporarily discontinue the medication or periodic phlebotomy may be indicated.38
Erectile dysfunation medications may not be suitable for you if you have been told not to have sex, not to engage in sexual activity/actions that widen your blood vessels, have low blood pressure (hypotension), have recently had a stroke, have unstable angina, have had a heart attack or have a history of non-arteritic anterior ischaemic optic neuropathy. Men with cardiovascular disease/anatomical issue with their penis/priapism/taking long-lasting alpha-blockers should use with caution and discuss with a doctor first. Do not mix with drugs/medications containing nitrates.
Under normal circumstances, when a man is sexually stimulated, his brain sends a message down the spinal cord and into the nerves of the penis. The nerve endings in the penis release chemical messengers, called neurotransmitters, that signal the corpora cavernosa (the two spongy rods of tissue that span the length of the penis) to relax and fill with blood. As they expand, the corpora cavernosa close off other veins that would normally drain blood from the penis. As the penis becomes engorged with blood, it enlarges and stiffens, causing an erection. Problems with blood vessels, nerves, or tissues of the penis can interfere with an erection.