System and method for treating a patient (10). The system includes a drape(12)configured to be positioned over a joint (16) of the patient (10). The drape(12)includes one or more sensors (52, 56) that are configured to provide signalsindicative of the orientation of the joint (16). A 3-D representation (60) ofthe joint (16)is registered to the joint (16), and the orientation of the representation(60) adjustedbased on the signals provided by the sensors (52, 56). The method of treatingthepatient includes generating the 3-D representation (60) and positioning thedrape(12) over the joint. The orientation of the 3-D representation (60) isadjusted basedon the signals provided by the drape (12), and an image (17) generated fromthe 3-Drepresentation (60). The image is displayed to provide a physician performinganinjection with feedback regarding the position of a needle (76) relative tothe patient(10).