An inquest has opened into the death of a man who died after being struck by a train last month.