Get the latest from TODAY
Cobie Smulders says posing topless helped her open up about her battle with ovarian cancer.
The 34-year-old former "How I Met Your Mother" star penned a candid essay in Lenny Letter, revealing that her May 2015 cover shoot for Women's Health magazine inspired her to think about what her body had endured just a few years before.
"I was standing in front of a camera lens holding my breasts, all while trying to appear not sexy but confident, not flirtatious but gleamingly positive," wrote Smulders, who was diagnosed with ovarian cancer at 25, during the third season of "HIMYM."
"It all made me start thinking about this body that I’m in. And what it has been through. And suddenly this bizarre invitation became an opportunity to share some insight from my experience of being diagnosed with, receiving treatment for, and eventually learning to cure my cancer."
Smulders, who portrays Marvel Comics superhero Maria Hill in the "Avengers" films, posed for the photo just six weeks after giving birth to her second daughter.
Though the actress, who's married to former "Saturday Night Live" star Taran Killam, was making television audiences laugh each week, behind the scenes cancer had taken "total mental, physical, and emotional" hold of her.
"Just when your ovaries should be brimming with youthful follicles, cancerous cells overtook mine, threatening to end my fertility and potentially my life," she wrote.
She frantically tried meditation, acupuncture, yoga and anything else that might help heal her body. After two terrifying years and "multple surgeries," Smulders got a clean bill of health.
"Thankfully, gratefully, cancer did not get the best of me," wrote Smulders. "The best of me now lives on in my two little women, baby girls I was lucky enough to be able to make with my own body."
But that fateful cover shoot made the actress realize it's her "duty" to talk to other women about ovarian cancer.
"(I)t feels so empowering to open up this dialogue and learn from each other," she wrote.
Read Smulders' full essay at Lenny Letter.