Hysterosalpingography (HSG) is a specialized X-ray examination used to evaluate the shape of the uterine cavity and the patency of the fallopian tubes. It is an important diagnostic procedure in the assessment of female infertility and is commonly recommended for women who are experiencing difficulty becoming pregnant.