The present teaching relates to methods, systems, and apparatus for X-ray imaging with a detector capable of resolving photon energy. In one example, an X-ray microscope is disclosed. The X-ray microscope comprises an X-ray source and a detector. The X-ray source is configured for irradiating X-ray to a sample. The detector is configured for: detecting X-ray photons from the irradiated X-ray, determining energy of each of the detected X-ray photons, and generating an image of the sample based on detected X-ray photons that have energies in a predetermined range.本教導涉及用於利用能夠分辨光子能量的檢測器的X射線成像的方法、系統和裝置。在一個示例中,公開X射線顯微鏡。該X射線顯微鏡包括X射線源和檢測器。該X射線源配置成用於對樣本輻照X射線。檢測器配置成用於:檢測來自輻照X射線的X射線光子、確定檢測的X射線光子中的每個的能量以及基於具有在預定範圍內的能量的檢測X射線光子產生樣本的圖像。