Gerritsen’s The Shape of Night (Ballantine, Oct.) is a supernatural thriller in which a freelance writer encounters the ghost of a sea captain in the Maine house she’s renting.

What was your inspiration for The Shape of Night?

Number one was the question of what makes the perfect lover, in this case a ghostly one. It is the question of how you find somebody who knows your every need, your every desire, and who can keep your secrets and not betray them. But the other part that worked into it was what do you do with the idea of shame if you have done something really horrible sometime in your life. That memory of shame will just seep into every aspect of your conscious and your subconscious mind. I combined these two themes: the perfect lover and how shame can come out in ways you don’t actually expect.

How do you decide whether to write a series book or a standalone?

I don’t know. I’m writing the books I want to write as opposed to the books that everybody expects me to write. My son and I are working on another horror film together. I’m doing some screenwriting, and we are also working on a documentary about pigs, specifically the long history of humans and pigs. I have already started my next novel, which has to do with what happens to old spies, especially old women spies. It came to me because I live in this interesting little town in Maine called Camden; we found out that we have a lot of retired CIA employees here. And I thought, how interesting, you get these old retired spies. What do they talk about? What do they do? Do they ever get the call to go back?

Dr. Maura Isles is a main character in your long-running series; a doctor is a main character in The Shape of Night. You’re a physician. Do you feel the need to include physicians in your books?

I don’t feel the need to have doctors in all my books. But doctors make really convenient characters, especially in suspense, because they see a lot when there is drama, when there is murder, when there is injury. They make excellent characters, whether good or bad.

Do you see any similarities between your work as a physician and as an author?

No, not at all. You are not supposed to be too creative as a doctor. They are really, really different. On the other hand, the one thing that is similar is that you have to have empathy in both occupations. You can’t be a good doctor unless you have a feeling for your patient. As a writer, I don’t think you can be a good novelist unless you have a lot of empathy for human beings and what they go through.