Just clamp a big adjustable wrench over the derailleur where it attaches to the frame and gently bend it straight. With a 7-speed I can get it close enough to index by eyeball. On a 9-speed I have to use a gauge (bike shops have them, it's about a $15.00 or $20.00 job.)
Don't be tempted to unbolt the derailleur and try to straighten the hanger. You might ovalize the derailleur mounting hole.