High-sensitivity high-resolution X-ray imaging with soft-sintered metal halide perovskites

To realize the potential of artificial intelligence in medical imaging, improvements in imaging capabilities are required, as well as advances in computing power and algorithms. Hybrid inorganic–organic metal halide perovskites, such as methylammonium lead triiodide (MAPbI3), offer strong X-ray absorption, high carrier mobilities (µ) and long carrier lifetimes (τ), and they are promising materials for use in X-ray imaging. However, their incorporation into pixelated sensing arrays remains challenging. Here we show that X-ray flat-panel detector arrays based on microcrystalline MAPbI3 can be created using a two-step manufacturing process. Our approach is based on the mechanical soft sintering of a freestanding absorber layer and the subsequent integration of this layer on a pixelated backplane. Freestanding microcrystalline MAPbI3 wafers exhibit a sensitivity of 9,300 µC Gyair–1 cm–2 with a μτ product of 4 × 10–4 cm2 V–1, and the resulting X-ray imaging detector, which has 508 pixels per inch, combines a high spatial resolution of 6 line pairs per millimetre with a low detection limit of 0.22 nGyair per frame. X-ray flat-panel detector arrays with high spatial resolution and sensitivity can be created using a two-step manufacturing process that separates the fabrication of microcrystalline methylammonium lead triiodide absorber wafers from their integration on pixelated backplanes.

T he use of artificial intelligence (AI) in medical imaging is steadily growing [1][2][3] . Currently, task-specific AI applications are able to match and occasionally exceed human intelligence, and it has been predicted that AI will surpass the skills of a radiologist in the next 50 years 4 . The development of such technology requires advances in computing power and algorithms, but also advances in curation and imaging capabilities. X-ray detectors with increased resolution can, in particular, provide improved medical images that further enhance the benefits of AI technologies 5 . X-ray detectors can be divided into two main classes: [6][7][8] indirect-conversion detectors and direct-conversion detectors. Indirect converters exhibit high sensitivity but suffer from low spatial resolution 9 . Direct converters can capture high-resolution images (up to 10-15 line pairs per millimetre (lp mm −1 )) but at a relatively high applied electric field (1-10 V μm −1 ) and relatively low sensitivity [10][11][12][13][14] . The requirement is an X-ray detector that combines high resolution (to enhance AI performance) with high sensitivity (to reduce patient X-ray dose).
Hybrid inorganic-organic perovskites, such as methylammonium lead iodide (CH 3 NH 3 PbI 3 , abbreviated as MAPbI 3 ), offer high electron and hole diffusion lengths due to their high charge carrier mobilities (µ) and long carrier lifetimes (τ), and have demonstrated promising characteristics for use as direct X-ray converters [15][16][17][18][19][20][21] . For example, polycrystalline and single-crystalline hybrid inorganic-organic perovskites have exhibited a μτ product of 2.0 × 10 -4 and 1.2 × 10 -2 cm 2 V −1 , respectively, which are in the same range as polycrystalline cadmium zinc telluride (CZT) 13,[15][16][17][18][19][20][21] . The high X-ray absorption coefficient of MAPbI 3 over large parts of the energy spectrum used in healthcare also makes it an ideal candidate for use in next-generation imaging systems. However, the integration of direct X-ray converter layers onto a pixelated electrode substrate (often referred to as a backplane), which converts the generated X-ray signal of each pixel into a two-dimensional digital image, can be challenging from a manufacturing perspective. Thus, while X-ray detection with direct-conversion perovskites has been demonstrated, the integration of perovskite detecting layers with pixelated backplanes has only received limited attention 17,22 .
In this Article, we report a two-step manufacturing process to create X-ray flat-panel detectors that combine high spatial resolution and high sensitivity. Our approach separates the fabrication of an X-ray absorber layer (which is made of microcrystalline MAPbI 3 ) with a thickness of several hundreds of micrometres from integration onto the backplane. The integration is subsequently performed at room temperature, and thus, backplane limitations regarding the temperature budget are not a factor. Our approach also allows for the independent optimization of the MAPbI 3 absorber formation.

X-ray imager architecture
The layer stack of the imaging X-ray detector is shown in Fig. 1a. The glass-based backplane is a self-aligned dual-gate indium gallium zinc oxide thin-film transistor array, which is described and characterized elsewhere 23,24 . The range of applicable voltages on the backplane is limited due the missing high-voltage protection of the pixels. Bottom electrodes are made of a molybdenum-chromium alloy. On top of the backplane, a grid structure made of an approximately 10-µm-thick photoresist is used as a mechanical anchoring structure for the thick absorber layer. Without this grid, the mechanical adhesion between MAPbI 3 and backplane was found to be poor, indicated by the release of the wafer after a few days. However, with the grid, no spontaneous detachment can be seen in several months. Pull tests revealed a tensile strength of 100 mN mm −2 . The grid is High-sensitivity high-resolution X-ray imaging with soft-sintered metal halide perovskites Sarah Deumel 1,2 ✉ , Albert van Breemen 3 , Gerwin Gelinck 3,4 , Bart Peeters 3 , Joris Maas 3 , Roy Verbeek 3 , Santhosh Shanmugam 3 , Hylke Akkerman 3 , Eric Meulenkamp 3 , Judith E. Huerdler 1 , Manognya Acharya 1 , Marisé García-Batlle 5 , Osbel Almora 5 , Antonio Guerrero 5 , Germà Garcia-Belmonte 5 , Wolfgang Heiss 2 , Oliver Schmidt 1 and Sandro F. Tedde 1 ✉ To realize the potential of artificial intelligence in medical imaging, improvements in imaging capabilities are required, as well as advances in computing power and algorithms. Hybrid inorganic-organic metal halide perovskites, such as methylammonium lead triiodide (MAPbI 3 ), offer strong X-ray absorption, high carrier mobilities (µ) and long carrier lifetimes (τ), and they are promising materials for use in X-ray imaging. However, their incorporation into pixelated sensing arrays remains challenging. Here we show that X-ray flat-panel detector arrays based on microcrystalline MAPbI 3 can be created using a two-step manufacturing process. Our approach is based on the mechanical soft sintering of a freestanding absorber layer and the subsequent integration of this layer on a pixelated backplane. Freestanding microcrystalline MAPbI 3 wafers exhibit a sensitivity of 9,300 µC Gy air -1 cm -2 with a μτ product of 4 × 10 -4 cm 2 V -1 , and the resulting X-ray imaging detector, which has 508 pixels per inch, combines a high spatial resolution of 6 line pairs per millimetre with a low detection limit of 0.22 nGy air per frame.
filled with liquid MAPbI 3 that acts-after its recrystallization-as an adhesion promoter for the attachment of the X-ray absorber, which consists of a 230-µm-thick MAPbI 3 layer; this thickness was chosen with respect to the limited applicable bias voltage at the imager. As the cathode, a chromium (Cr) layer is deposited on top of MAPbI 3 . The active area of the imager is encapsulated with a barrier foil to avoid environmental influences, as shown in Fig. 1b.
This direct-conversion X-ray detector can capture objects with a very high resolution of 6 lp mm −1 (Fig. 1c) and shows an unprecedented low detection limit of 0.22 nGy air per frame at an applied electrical field of 0.03 V µm −1 . The resolution capability was tested by X-ray imaging a phantom having structures made of three lines at different spacings of 5.0, 5.5 and 6.0 lp mm −1 . The detection limit is calculated taking-for each frame-the average signal of pixels from a region of interest (ROI) for a 1-s-long exposure at different doses and considering a signal-to-noise ratio (SNR) of >3, as shown in Fig. 1d 25 . The beam quality was generated using an X-ray source with an anode bias of 70 peak kilovoltage (kVp), and filtering the resulting radiation with 21 mm aluminium (Al) and additional attenuation with 1 mm Pb (Supplementary Information provides details about the X-ray setup). The signal is presented in the least significant bit (LSB), the smallest possible unit of the analogue-to-digital converter in the ROIC, which-in the used settings-is equivalent to 48 electrons.
The dose per frame was varied between 0.33 and 20.61 nGy air , and the SNR was determined from the resulting height (H) of the pulses and variance of the background noise (h) according to the following equation: SNR = 2H/h ≥ 3 (ref. 25 ). The SNR is inversely proportional to the dose (Fig. 1d, inset) and can be linearly fitted, which leads to a dose of 0.22 nGy air per frame at SNR = 3. This is due to the impressive stability of the mean value of the ROI in the range of 0-2 LSB in the observed period. Electrical stability is reached after 90 min of biasing of the imager at an electrical field of 0.03 V µm −1 , which is the time required to achieve an almost ionic equilibrium state ( Supplementary Fig. 1a). With a frame rate of 28.6 frames per second, the detection limit is 6.3 nGy air s −1 , which is 20% lower compared with the best reported detection limit of perovskites: Wei and co-workers made a 1-mm-thick single crystal of methylammonium lead tribromide (MAPbBr 3 ) alloyed with Cl, achieving the lowest detectable dose rate of 7.6 nGy air s −1 for a photon energy of 8 keV (ref. 26 ). Previously reported limits for MAPbI 3 are even higher: 19.1 µGy air s −1 for single-crystal MAPbI 3 (ref. 19 ). With A-site cation variation, Huang et al. could reduce the detection limit to 16.9 nGy air s −1 (ref. 20 ).

Two-step manufacturing process
The manufacturing process of our perovskite X-ray detector consists of two phases: the first focuses on the production of the X-ray absorber layer. We chose a mechanical soft-sintering process, which is described in detail in ref. 18 . The used microcrystalline MAPbI 3 powder is commercially available, where the grain size varies between 0.1 and 100.0 µm, whereas 85% of the measured sizes are  Fig. 2a,b). For the investigation of the structural properties of the powder, an X-ray diffraction measurement has been performed ( Supplementary Fig. 2c). The mean diffraction peaks at 14.1°, 23.4°, 24.5°, 28.1° and 28.4° are related to the lattice planes (110), (211), (202), (004) and (220), respectively, and fit well with the values of the tetragonal phase with the I4cm space group of MAPbI 3 found in the literature 27,28 . To form a freestanding stable wafer, the powder was compacted for 30 min at room temperature using a hydraulic press with a pressure of 75.5 MPa. The compactness of these wafers with a resulting thickness of 230 µm is 88% of the theoretical limit calculated from the simulated lattice parameters 27,28 and is in good agreement with the density versus pressure curve shown in Supplementary Fig. 2 (generated as the calibration plot).
The second manufacturing phase is shown in Supplementary  Fig. 4. First, a photoresist grid with 10 µm height is build up on the backplane by photolithography. A top view of the regular grid structure with a pixel pitch of 50 µm and fill factor of 58% is shown in the scanning electron microscopy (SEM) image in Fig. 2a. The total active area of the X-ray detector is 3.2 × 2.4 cm 2 . Figure 2b shows a micrograph of the grid structure, in which the bottom electrode array can be seen as bright areas. In the second step, the grid on the backplane is filled with MAPbI 3 powder and then liquefied under a methylamine atmosphere. More details on this reaction can be found elsewhere [29][30][31] . In the timescale of seconds, the previously prepared MAPbI 3 wafer is placed on the liquid phase. Fixation occurs after the liquefied MAPbI 3 recrystallizes due to the evaporation of excessive methylamine during the annealing step at 50 °C, acting as an adhesion promoter between the wafer and backplane, as shown in Fig. 2c.
To investigate the recrystallized grains, SEM cross-section images were obtained, as shown in Fig. 2d-f. During the bonding process, the liquification of the MAPbI 3 wafer due to methylamine vapours is not excluded, but it will be very limited since the thickness of the recrystallized layer slightly exceeds the grid height. The bottom part of the MAPbI 3 wafer bonded to an indium tin oxide glass with grid structures at the glass interface is shown in Fig. 2d. The surface of the cross section is rough because of the breaking mechanism of the wafer and glass. Morphology differences between the recrystallized and soft-sintered perovskite can be identified. A closer look inside the soft-sintered absorber is shown in Fig. 2e. The grain size varies between 0.5 and 5.0 µm and some pores are visible between the powder grains, which are attributed to mechanical soft sintering. In contrast, recrystallized MAPbI 3 has fewer pores between the grains (Fig. 2f), which has a smaller size of up to 2 µm. The sensitivity and thus the charge transport properties of methylamine-treated MAPbI 3 wafer show no notable change compared with a non-treated one. Nevertheless, additional defect states may have been introduced by changing the grain size [32][33][34] .
A great advantage of the presented manufacturing process of the X-ray imager is the possibility to execute quality control of the MAPbI 3 wafer before attachment to the backplane. In fact, freestanding wafers can be X-rayed themselves, and the homogeneity of X-ray absorption can be controlled using a commercially available flat-panel detector (Supplementary Fig. 5a-c).

characterization of freestanding wafers
For a better understanding of the imaging X-ray detector properties, a closer look at the compact wafer is required. Therefore, we have performed impedance measurements on a single device made of a soft-sintered MAPbI 3 wafer with platinum (Pt) and Cr electrodes ( Supplementary Fig. 6a,b). A schematic of the wafer stack is shown in Supplementary Fig. 11a. According to the resulting geometrical capacitance and sample dimensions, the dielectric constant of the wafer is ε = 75. This is in good agreement with previously reported values [35][36][37] . For dark current measurements, a 977-µm-thick, 86% dense wafer has been used.
The Cr electrode was grounded during the measurements, and the applied voltage was in the range of −200 to +200 V, corresponding to an electrical field of ±0.2 V µm −1 . The electrical field was at first decreased from 0 to −0.200 V µm −1 in steps of 0.001 V µm −1 ; thereafter, it was increased from 0 to +0.2 V µm −1 . In the current density versus electrical field (J-E) plot (Fig. 3a), the dark current density reaches the maximum value of 8.40 × 10 -4 mA cm −2 for negative fields, the so-called reverse bias direction, and 1.98 × 10 -3 mA cm −2 for positive (forward) bias. This leads to a dark resistivity of ~2.4 × 10 9 Ω cm, which is in the same order of magnitude to the values reported in ref. 38 . This small rectifying behaviour could be caused by the used electrodes and their different work functions of ϕ m,Cr = 4.5 eV and ϕ m,Pt = 5.7 eV (ref. 39 ) or ions and their associated vacancies 32 .
The response of the wafer to 2-s-long irradiation with the RQA5 (according to the IEC 61267:2005 standard) X-ray spectrum and a dose rate of 213 µGy air s −1 at different bias voltages was captured with a Keithley 2400 source meter. This results in the maximum value of 9,300 μC Gy air −1 cm −2 for the sensitivity of our wafer at an electrical field of 0.17 V µm −1 (Fig. 3b). Fitting the data by the Hecht equation 10 (red curve in Supplementary Fig. 11b) results in a µτ product of approximately 4 × 10 -4 cm 2 V −1 . A comparison with previously reported perovskite materials shows that the measured sensitivity is in good agreement with printed MAPbI 3 samples 17 , 3.5 times higher than the soft-sintered MAPbI 3 wafers 18 and over 100 times better than single-crystal MAPbBr 3 (ref. 16 ).
Another important figure of merit in comparing X-ray detectors with different thicknesses and materials is the electron-hole pair (EHP) generation energy W ± . W ± is the amount of absorbed radiation energy needed to create a single free EHP (Supplementary Information provides more information) 40,41 . In Fig. 3c, the values of W ± are plotted as a function of the applied bias for two dose rates. W ± decreases with an approximately hyperbolic (f(x) = 1/x) behaviour with increasing electrical field and approaches the empirical limit of W ± = 3E G ≈ 4.5 eV (E G is the bandgap), which is known as the Klein rule 40 . W ± values (on a linear scale) for a total of six different dose rates are shown in Supplementary Fig. 12a. Within the measurement accuracy, W ± is independent of the dose rate for electrical fields higher than 0.05 V µm −1 , indicating an almost full extraction of the generated charges.
To investigate the dependencies of W ± with the X-ray photon energy, we performed a series of X-ray response measurements with different photon spectra obtained by varying the anode voltages on the X-ray tube. The simulated X-ray photon spectra are shown in Supplementary Fig. 12b. With the help of these photon energy densities, the absorbed energy for the MAPbI 3 wafer can be determined: for an anode voltage of 50 kVp, the wafer absorbed 98.63% of the emitted X-ray spectrum. The absorbed energy decreases to 71.33% for increasing anode voltages up to 120 kVp (Supplementary Table 1). The wafer was irradiated for 1 s each time with a dose of 40 µGy air under an  40 . In the double logarithmic representation (inset), the hyperbolic behaviour of W ± is visible. d, EHp creation energy versus exposed X-ray spectrum. The MApbI 3 wafer was exposed with a dose of 40 µGy air in the RQA5 spectrum and an applied electrical field of 0.043 V µm −1 . The X-ray tube voltage was varied from 50 to 120 kVp (black points) and back to 50 kVp thereafter (red dots).
applied electrical field of 0.043 V µm −1 . For a better statistical evaluation and excluding possible degradation factors, the anode voltage was initially increased from 50 to 120 kVp and then decreased from 120 to 50 kVp. The corresponding X-ray pulses show an increasing pulse height with higher anode voltages with the maximum value at around 100 kVp (Supplementary Fig. 12c). The increase is proportional to the photon energy fluence of the X-ray tube. The resulting average W ± values are 5.99 ± 0.20 eV (Fig. 3d), that is, W ± is independent of the X-ray photon energy. This is of great importance since X-ray photons with a lower energy carry higher diagnostic information. Furthermore, no degradation caused by irradiation has been observed after a cumulative dose of 11 Gy air (Supplementary Fig.   13). Similar to MAPbI 3 , the theoretical limit of W ± in amorphous selenium (a-Se) ranges between 5 and 6 eV. In practice, however, values of 40-50 eV at an electrical field of 10 V µm −1 are achieved 42 . In addition, a-Se shows decreasing W ± for increasing X-ray photon energy 42 . All the results presented here with MAPbI 3 wafer devices show the great potential of this material class for X-ray detector application.

characterization of X-ray detectors
With the knowledge of freestanding wafer measurements, we were able to manufacture a pixelated MAPbI 3 X-ray imaging detector with outstanding performance. X-ray characterization was performed by varying the dose range over five orders of magnitude initially using the RQA5 spectrum and adding different filters later. For the corresponding photon energy densities, see Supplementary Fig. 14a. The level of absorption of these three spectra for different thicknesses of MAPbI 3 is shown in Supplementary Fig. 14b. With the effective thickness of our wafer (red dashed line), we obtained theoretical absorption values of 50%, 46% and 36% for the RQA5, RQA5 with 15 mm Al filter and RQA5 + 1 mm Pb spectra, respectively. For the investigation of the imager response to 1-s-long X-ray pulses, video sequences were taken with an integration time of 35 ms per frame. Frame sequences were acquired in the rolling shutter mode without synchronization between the X-ray source and X-ray detector. The offset-corrected signals under the maximum applicable electrical field of 0.03 V µm −1 using the RQA5 spectrum with doses ranging from 44 to 8,390 nGy air per frame are presented in Fig. 4a. The pulses show good time response, as indicated by the steep increase and decrease. To evaluate the linearity of the imager responses for a wider dose range, we used the RQA5 spectrum in combination with additional 15 mm Al filtration. This detector is impressive, with good linearity over a dose range of three orders of magnitude ( Fig. 4b and Supplementary Fig. 15a). Supplementary  Fig. 15b shows a close-to-ideal dose dependence (slope, 0.99).
Image lag describes the amount of charge that was carried over from the previous to the next image frame 21 . In Supplementary  Fig. 15c, image lags for different doses after 1 frame (35 ms), 5 frames (175 ms) and 10 frames (350 ms) are shown. In comparison to a-Se and amorphous silicon, MAPbI 3 shows higher lag: lags of around 1.2% for amorphous silicon and 0.7% for a-Se are detected after 330 ms (refs. 43,44 ). The image lag of MAPbI 3 after 1 frame is similar to polycrystalline CZT and better for higher frames 14 . Since the applied electrical field (0.03 V µm −1 ) on our detector is rather low, we expect a much lower image lag for higher electric fields. The sensitivity varies between 1,010 and 1,060 μC Gy air −1 cm −2 ( Supplementary  Fig. 16a). A comparison with previously reported detector materials shows that the measured sensitivity is four times higher than CZT (refs. 12,13 ) and up to 60 times better than a-Se (ref. 10 ).
Another key parameter for the imager performance is the modulation transfer function (MTF), that is, the spatial resolution or relative response as a function of the spatial frequency 44 . The MTF plot (Fig. 4c) shows that for the measurement range used here, the MTF is independent of the X-ray dose. For comparing with another X-ray imaging detector mostly used for radiography application, an indirect-conversion complementary metal-oxide-semiconductor detector (Xineos-2222HS, Teledyne DALSA) was chosen. The associated MTF (Fig. 4c, red curve) is obviously worse than that of the MAPbI 3 detector. A further comparison of the two detectors is shown in Fig. 4d. The image made by the indirect-conversion detector is blurred, and none of the resolution phantoms can be resolved. In contrast, 5.0 lp mm −1 can be resolved using our MAPbI 3 detector.
To prove the good resolution, part of a hearing aid and a coronary stent (diameter, 2 mm; length, 15 mm; rectangular mesh cross section, 100 µm x 200 µm ( Supplementary Fig. 17)) were X-rayed with an exposure of 4.17 µGy air per frame in the RQA5 spectrum. The photograph of the objects is shown in Fig. 4e. The resulting X-ray images offer a detailed view of the structures examined; even the mesh of the stent (Fig. 4f, right) is clearly visible. These results show the outstanding potential of the MAPbI 3 imaging detector fabricated by our two-step manufacturing process for use in the medical field.

conclusions
We have reported a two-step manufacturing process for MAPbI 3 X-ray flat-panel detectors based on the mechanical sintering of a freestanding absorber layer and integration of this layer on a pixelated backplane. A photoresist grid functions as a mechanical anchor and recrystallized MAPbI 3 acts as the adhesion promoter for the soft-sintered thick MAPbI 3 absorber layer. We used our approach to create a pixelated X-ray detector with a resolution of 6 lp mm −1 , sensitivity of 1,060 μC Gy air −1 cm −2 and detection limit of 0.22 nGy air per frame at an applied electrical field of 0.03 V µm −1 . The EHP creation energy W ± of 12.4 eV is still higher than the empirical limit of 4.5 eV given by the Klein rule 40 , but we have shown-via measurements on freestanding wafers-that a W ± value of 5.99 eV should be achievable when applying an electrical field higher than 0.05 V µm −1 . These freestanding wafers were produced with the same soft-sintering approach as the X-ray detector and confirmed the electrical transport properties of MAPbI 3 . A value of 9,300 μC Gy air −1 cm −2 could be achieved for sensitivity and 4 × 10 -4 cm 2 V −1 for the µτ product. We also showed that the W ± value of our freestanding MAPbI 3 devices is independent of the X-ray photon energy. Hence, the freestanding compact MAPbI 3 wafer has a very high potential for stable and excellent detection over the whole energy range of X-ray applications.
We have illustrated that this technology can be scaled to large detection areas via integration on a 508 pixels per inch backplane with 640 × 480 pixels. To further improve the performance (sensitivity and dynamic behaviour) of the pixelated MAPbI 3 detector to the level shown for freestanding wafers, the backplane must be tailored to accommodate a higher electric field. Additional interlayer engineering of the detector stack is required to further reduce the dark current. The development of such X-ray detectors with high resolution and sensitivity can-we believe-speed up the translation of AI to routine clinical practice in X-ray imaging applications and help improve healthcare outcomes. In the short term, applications in the field of general radiography, fluoroscopy, angiography and neurology could benefit from improved resolution, which today is an option only in mammography. Moreover, mammography will benefit from improved sensitivities, which are typical for indirect-conversion detectors. Improved sensitivities can also lead to lower X-ray doses but with similar or improved image quality. Currently, these different applications rely on different technologies-our MAPbI 3 X-ray imaging detector could potentially provide a single technology for all of them.

Methods
Device manufacturing. For this paper, two different devices were used.
For the first device, freestanding CH 3 NH 3 PbI 3 (MAPbI 3 ) wafers with a diameter of 15 mm and thickness between 880 and 1,000 μm have been produced using commercially available MAPbI 3 powder (Xi'an Polymer Light Technology). The powder was sieved with a 50 μm mesh. The powder was filled into a height-adjustable powder container and a cylinder of stainless steel with a polished surface was placed above this. The hydraulic press (PerkinElmer) can apply up to 9 t, which corresponds to a pressure of 495 MPa for the wafers. The soft sintering of the wafers was done at a pressure of 110 MPa (2 t), applied for 30 min at a temperature of 70 °C. On the two-wafer surfaces, electrodes with an area of 1 cm 2 were deposited via physical vapour deposition. For that purpose, 100 nm Cr on one side and 100 nm Pt on the other side were sputtered.
The second device is the X-ray image sensor having the following parts. The backplane consists of a indium gallium zinc oxide thin-film transistor (TFT) array comprising 640 × 480 pixels with a pixel pitch of 50 µm and a resolution of 508 pixels per inch. The negative photoresist grid, with a height of 10 µm, comprised a mixture of SU-8 50 (Kayaku Advanced Materials and distributed by micro resist technology) and cyclopentanone (Sigma-Aldrich) (5:1); it was deposited on the backplane by spin coating at 3,000 rounds per minute and structured by optical lithography. MAPbI 3 powder was filled into the grid-like structure and liquefied under a methylamine gas (Sigma-Aldrich) atmosphere. Fabrication of the absorber layer was performed using a slightly modified procedure presented in ref. 1 . The wafer was pressed at 9 t (75.5 MPa) and at room temperature for 30 min. On top of this wafer, an 80-nm-thick Cr electrode and 100 nm gold (Au) were sputtered. The manufactured wafer was placed on the liquid MAPbI 3 and fixed after its recrystallization. To ensure good evaporation of excess methylamine gas, the sample was placed on a heating plate at 50 °C for 30 min. The stacked layers were encapsulated by laminating a high barrier film (TESA 61572) to avoid degradation due to external stimuli.
Image readout and processing for pixelated X-ray detector. Images from the 480 × 640 pixels TFT panel were read by a commercially available ROIC (AD71124, Analog Devices). The signal at the input was simultaneously integrated, amplified, low-pass filtered and converted from analogue to digital with a 16-bit converter. The integrator feedback capacitance C f was 0.125 pF and the integration time was 35 ms. The readout occurred by the rolling shutter principle, and the X-ray tube and detector were not synchronized. The acquiring frame rate was ~28.6 frames per second. To eliminate fixed pattern noise (offset compensation), an offset map was generated by averaging 100 dark images, which was subtracted from the images. The mean value and standard deviation were deduced from the ROI (Supplementary Fig. 18). The standard deviation in the ROI represents the electronic noise in LSB (~11 LSB). Noise in the image sensor in terms of electrons (considering 48 electrons per LSB) is 535 electrons. X-ray recordings from objects were offset and compensated by subtracting the offset map and flat-field corrected by calculating the gain factor of each pixel for a flat-field image. The MTF is determined by the slanted-edge method 45 . First, an object with a sharp tungsten edge is placed on the X-ray detector and the edge profile is derived from the resulting X-ray image. The line-spread function is derived by differentiating the edge profile. The Fourier transform of the line-spread function defines the MTF.
Electrical characterization of freestanding wafers. The current density measurement was performed with a Keithley 2400 source meter sampling at 10 Hz that was connected to the sample holder filled with argon gas. The MAPbI 3 wafers are measured in an inert atmosphere and therefore protected from moisture and light. For measurement during X-ray exposure, the sample holder is placed in an Al box underneath a MEGALIX Cat Plus 125/40/90 (Siemens Healthineers AG) X-ray source with a tungsten anode. The distance between the sample and X-ray source is 120 cm. The X-ray dose was varied by changing the tube current by over two orders of magnitude, measured with a PTW Diados T11003-001896 dosimeter and adjusted with correction factors provided in its datasheet for anode voltages other than 70 kVp. For more details, see Supplementary Information.

SEM.
To obtain high-resolution SEM images of the MAPbI 3 perovskite layers, a Schottky field-emission SEM (JEOL JSM-7610F) was used at an acceleration voltage of 15 kV. For the cross-sectional image, the glass of the imager was scratched with a diamond pen and then broken by hand. SEM images of the grid photoresist were obtained by an FEI Quanta 3D FEG microscope, using a 5 kV electron beam and a secondary electron detector.
X-ray diffraction measurement. The structural analysis of the MAPbI 3 powder consists of XRD measurements performed by classical ex situ Bragg-Brentano geometry using a Panalytical X'pert powder diffractometer with filtered Cu Kα radiation and an X'Celerator solid-state strip detector.

Data availability
The datasets analysed in this study are available from the corresponding authors upon reasonable request.