Snapshot molecular imaging using coded energy-sensitive detection