Many studies have shown that ultrasound is the most accurate way to diagnose the kind of cyst you describe, known as a popliteal cyst. This test shows an empty chamber in the places where the sound waves make no echo.
Don't be surprised if your doctor orders additional tests. Frequently, this type of cyst is the result of previous damage or trauma to the joint. It may be necessary to use other imaging studies to see these other injuries. This is important when planning surgery and other treatment.