Synchrotron radiation imaging: The experiments were performed at the biomedical beamline (ID-17) of the European Synchrotron Radiation Facility (ESRF, Grenoble, France). Briefly, X-rays produced by a multipole wiggler were monochromatized using a double bent Laue Si (111) monochromator 34, selecting a photon energy of 40 keV. Monochromatic radiation impinged on the sample 146 m from the source and was detected by a fast Complementary metal–oxide–semiconductor (CMOS) PCO Edge 5.5 camera (PCO AG, Kelheim, Germany) coupled to a 250 µm thick Cerium-doped Lutetium Aluminum Garnet (LuAG:Ce) scintillator and optics yielding an isotropic pixel size of 6 µm2. The field of view of the camera was reduced to 15.4 ⋅ 1.2 mm2 to achieve a frame rate of 500 fps, as a compromise between field of view and temporal resolution. The sample to detector distance was set to 4m to utilize propagation-based phase contrast imaging 35.
Animal preparation: The care of animals and the experimental procedures were in accordance with the Directive 2010/63/EU of the European Parliament on the protection of animals used for scientific purposes, complied with the ARRIVE guidelines 36 and were approved by the ESRF Ethical Committee on Animal Experimentation (Comité d'éthique en expérimentation animale; ETHAX #113) and the French Ministry of Higher Education and Research under the number: 2017071816174477. The study was performed on 3 female OFA rats (Ratus Norvegicus, Wt: 253.7±7.2 g). Anesthesia was induced by intra-peritoneal injection of 1.5 to 2 ml kg-1 body weight of a solution containing Ketamine (40 mg ml-1) and Xylazine (20 mg ml-1). The animal was tracheostomized and a 14 G polyethylene catheter (Venflon; Becton Dickinson, Le Pont-de-Claix, France) was inserted and secured with a gas-tight seal. A 26 G polyethylene catheter (Neoflon; Becton Dickinson, Helsingborg, Sweden) was inserted in the jugular vein. After surgery, the animal was immobilized in the vertical position in a custom-made plastic holder and placed on a remote-controlled rotation stage in the experimental hutch for imaging. Anesthesia was maintained during the duration of the experiment with 1% inhaled isoflurane (Isoflurane Belamont, Piramal Critical Care). The animals were mechanically ventilated with a tidal volume of 8 ml kg-1, FiO2 = 0.5; PEEP = 6 cmH2O. After verifying adequate depth of anesthesia (heart rate stability, inhibition of response to limb stimulation), muscle relaxation was induced by Atracurium injection (4 mg kg-1) to avoid motion and suppress spontaneous breathing. The electrocardiogram (ECG), airway pressure and air flow were continuously sampled at 10 kHz and recorded using a Powerlab 16/35 data acquisition device (DAQ, Adinstruments, Dunedin, New Zealand) (Figure S1).
Image acquisition protocol
The image acquisition protocol was described in detail in a previous publication5. It was based on the synchronization between the heartbeat and the mechanical ventilation, which ensured a periodic lung parenchymal motion, as required by dynamic CT acquisitions. Briefly, the ECG signal was processed in real-time with a peak detector, which generated a square signal of predefined length and duty cycle when a R wave was detected, at the time instant ti. The square signal was transmitted to the mechanical ventilator controller, to trigger an assisted breath. The R wave detection was disabled for the whole duration of the square signal. In the specific experiment discussed here, the square signal duration was and the heartbeat period was s, implying heartbeats per respiratory cycle. A full tomographic scan consisted of a set of 250000 projections acquired over 180 degrees during a single sample half-rotation. A constant angular velocity, ° s-1 was set to include approximately 700 respiratory cycles per scan.
Image reconstruction: The image processing workflow is shown in Supplemental Figure S2. A retrospective gating methodology 37 was used to reconstruct 4-Dimensional (3D + time) CT images. In this approach each projection: \(P(\alpha , {t}^{\text{*}})\), is characterized by an angle, \(\alpha =\omega (t-{t}_{0})\), and a time: \({t}^{\text{*}}=t-{t}_{j {n}_{ECG}}\), where \({t}_{j {n}_{ECG}}\) is the time at which j-th respiratory cycle was started:

The projections corresponding to the same time interval were sorted in 3D image stacks discretizing \({t}^{\text{*}}\) with a \({\Delta }t=10\)ms time resolution. Tomographic reconstruction was performed with a Filtered Back Projection algorithm using PyHST238 software, after application of Paganin’s single material phase retrieval algorithm 39. Since the ECG signal is not perfectly periodic, the projections were not equally spaced. Hence, 78 3D-CTs were finally reconstructed.
Image segmentation
The same segmentation process was used for blood vessels air airspaces. The Otsu's algorithm allows for a first partitioning of air and non-air voxels 40, starting from the image histogram. To classify the former voxels as proximal, intermediate and terminal, an iterative process was carried out. At each step of a 3D erosion process, the number of removed voxels was stored in a list. Assuming the primary bronchi are not far from cylinders, it is expected that a large subset of the values in this list is piecewise linear with respect to the index. Thus, the identification of the linear parts in this list using linear regression and RMSE, allows to classify the central parts of the bronchi, starting from the largest, to the smallest ones. Voxels are then dilated to end the classification of these proximal parts. Intermediate structures are subsequently identified by means of dilation, erosion and hole filling using voxels from the primary structures. All the selected voxels which were not classified as proximal or intermediate were classified as terminal structures, with a similar approach as the ones described previously in the literature 41,42. Using this method, terminal airways as well as the proximal and intermediate blood vessels were identified. Occasionally, additional manual editing was performed as necessary by adding markers on the image and carrying out a watershed.
Image registration
A non-rigid registration algorithm was used in order to deform the segmented airspace or vascular volumes in a pairwise fashion, between each time step and the immediately previous one. The registration algorithm applies a B-spline grid to represent the original segmented greyscale volume. It was initially proposed by Klein et al. 43 and is published within the Python Image Registration Toolkit (PIRT) 44. A Sum of Squared Differences (SSD) similarity metric was applied, as well as a Laplacian regularization term. The registration algorithm was applied in a pairwise fashion, between each time step and the immediately previous one. This displacement field,, was then converted to a Lagrangian displacement field representing the deformation between each image with the first one, through the following recursive process

This two-step computation of the displacement field allowed to minimize registration errors. An error value was defined, as:

Which was used to assess the quality of the registration.
We investigated whether completely deflated airspaces were inflated upon inspiration, a phenomenon referred to as “recruitment”. To this end, we used skeletonization, a process that reduces binary objects to 1-pixel wide representations, in order to extract the airspace topology. This was performed with the Skeletonize_3D toolkit (https://scikit-image.org) 45. Skeletons were produced for the segmented airspace volume at each time instant,
. The skeleton of the first time instant was deformed according the Lagrangian displacement field,
46 Each pair of skeletons,
and
were compared by computing 2 distances, which were the distance between the skeleton and the segmented volume boundary:

and the distance between the two skeletons:

Recruited structures could then be eventually segmented by selecting initial seeds or voxels where \({d}_{\text{s}}>{d}_{{\Omega }}\). However, in this experiment, no recruited airspaces were detected.
Computation of volume and surface change
The divergence theorem was applied to compute the volume change

with \({\Omega }\) the segmented voxels at the first time point in the respiratory cycle. To overcome the limitations of traditional Jacobian computations 47, a high order Mean Least Squares (MLS) kernel-based convolution was applied 48, which grants linear consistency:

Where W is the kernel convolution, and L is the MLS matrix which corrects the kernel compact support truncation:

It should be noted that the convolution above considers only the segmented voxels. For the surface change computation, a similar expression was used, also based on the divergence theorem:

With h the mean Gaussian curvature, redefined as a volumetric field 49.
From the magnitudes involved in the expressions above, the only one depending on time is the displacement vector field, u, obtained from the registration. All other magnitudes were computed in the initial time instant.