Abstract
An automated system for acquiring microscopic-resolution radiographic images of biological samples was developed. Mass-produced, low-cost, and easily automated components were used, such as Commercial-Off-The-Self CMOS image sensors (CIS), stepper motors, and control boards based on Arduino and RaspberryPi. System configuration, imaging protocols, and Image processing (filtering and stitching) were defined to obtain high-resolution images and for successful computational image reconstruction. Radiographic images were obtained for animal samples including the widely used animal models zebrafish (Danio rerio) and the fruit-fly (Drosophila melanogaster), as well as other small animal samples. The use of phosphotungstic acid (PTA) as a contrast agent was also studied. Radiographic images with resolutions of up to (7±0.6)μm were obtained, making this system comparable to commercial ones. This work constitutes a starting point for the development of more complex systems such as X-ray attenuation micro-tomography systems based on low-cost off-the-shelf technology. It will also bring the possibility to expand the studies that can be carried out with small animal models at many institutions (mostly those working on tight budgets), particularly those on the effects of ionizing radiation and absorption of heavy metal contaminants in animal tissues.
Introduction
Most of the current biomedical research is based on animal models, allowing researchers to obtain large volumes of data at a fast rate, and relatively low cost [1]. Zebrafish (Danio rerio) and fruit flies (Drosophila melanogaster) became some of the most widely used animal models for biomedical research because both of them can be grown in large numbers in rather small facilities, they have a fast reproductive cycle, they are cheap to maintain (compared to mammals), they don’t share diseases with humans, they have well-characterized genetics, and their simple organization makes them amenable to study [2, 3]. The fruit fly is ideal for the study of the development, genetics, and small neural circuits while the zebrafish is used for the same research topics at higher complexity (i.e. more complex neural networks), and being a vertebrate provides a closer resemblance to humans (comparable body distribution, organs, physiology, and social behavior).
While zebrafish and fruit flies are translucent during their early developmental stages, which makes possible the study by imaging during embryonic or larval stages, they become opaque as adults. Because of this, the investigation of inner organs and structures in adults is quite challenging. X-ray imaging and a handful of other methods were developed in the last century to study large animals, but they cannot be applied to small animals [4, 5]. The main limitation is that the spatial resolution of imaging systems, designed for humans or big objects, is not good enough to provide clear images of the tiny organs that researchers need to study. High-resolution systems were developed but they tend to be expensive enough to make them unaffordable to most research institutions around the world. The use of X-ray films can provide high-resolution images but it requires many steps, the use of toxic and polluting chemicals, and it is difficult to standardize without specific and expensive equipment.
Previous works by our group and others showed that commercial-off-the-shelf CMOS image sensors (CIS), originally designed to detect visible light, are capable of sensing other types of radiation including Gamma and X-rays [6–10]. CIS are mass-produced for consumer electronics, making them low-cost, easily available, and simple to use; providing many advantages when compared to integrated circuits specifically designed as radiation detectors and position-sensitive devices such as charge-coupled devices (CCD).
In this work a high-resolution X-Ray imaging system for small animals was developed using low-cost, off-the-shelf components, 3D-printed parts and CIS. The use of X-rays enabled us to obtain high-resolution images of animals independently of their developmental stage requiring almost little or no specimen processing or genetic manipulations. Besides we show that processing such as the addition of contrast agents can be performed rendering some structures and tissues visible. The use of CMOS sensors to capture X-rays that pass through the sample directly was compared to two other radiographic methods, traditional x-ray film and a Medipix sensor. Medipix sensors are photon counting devices composed by hybrid detectors with a semiconductor photon sensor layer bound to a CMOS processing electronics layer [11]. The use of CIS provides digital X-ray images avoiding the use of film and toxic chemicals while providing an excellent dynamic range and high spatial resolution comparable or even better than those of the Medipix. This work provides a proof of concept and a basic layout that can be reproduced by other research groups and tailored according to the specific needs of different research projects. The developed system can be used with or without modifications for studying other animals.
Methods
Canton-S D. melanogaster flies were reared and maintained on standard cornmeal/agar medium at 25°C and 60 percent humidity in a 12 hr:12 hr LD cycle unless stated. The flies used in this work were specimens previously used as controls for behavioral experiments and were kindly provided by Dr. Lorena Franco and Sabrina Riva.
Flies, pupae and larvae were stained in a similar way to fish; they were first fixed with a 4 percent paraformaldehyde solution for one hour, thoroughly rinsed with deionized water and then submerged in PTA solution overnight at room temperature. Specimens were then rinsed and transferred to the imaging setup.
The chip has an internal ADC and a two-wire serial interface bus that can be used to configure several features including gain, frame rate, frame size, white balance, etc. The readout electronics is composed of two boards: A Camera Module that contains a socket where the CIS is placed, and a Camera Shield that is employed to read the sensor and transfer the obtained images to a computer via USB [13]. The communication between the Camera Shield and the PC is done using a Python script that collects the image data produced by the sensor.
Results
The feasibility of acquiring radiographic images of small animals using a low-cost X-ray imaging system, built with off-the-shelf, mass-produced components was assessed (Fig. 1 A). The attenuation of X-rays passing through the animal samples resulted in dark areas contrasting with bright background areas in the digital images.

A) Scheme of the experimental setup employed for the image acquisition, the sample is placed over the surface of the CMOS sensor, and a x/y positioning system is employed to scan it. The X-ray beam has to cross the sample before reaching the sensor’s active volume. B) Flow chart of the image obtention process, once the sample is positioned the CIS is activated for the acquisition of n images which are subsequently averaged. The process is repeated to scan the complete sample. A stitching and filter algorithms are used to construct the final radiograph.
The spatial resolution of the system was assessed by measuring the X-ray transmission at the edges of a gold wire with a diameter of 17μm. The sample was positioned 2mm away from the sensor and 40cm from the X-ray source to capture the radiographic image of the wire (inset in figure 2), The main plot shows the X-ray intensity detected in the sensor along the horizontal direction in different pixel rows of the region of interest. Also, using the X-ray attenuation constants for gold and the exact wire thickness, it was possible to calculate the transmission of the wire and the signal of an ideal detector, presented as the red curve in Figure 2. It can be observed that due to the limited spatial resolution, the experimental plots show a smoother transition at the edges than the ideal curve.

Radiography of a gold wire of 17μm diameter employed for the spatial resolution measurement. Inset: Analysis of the region of interest marked with dashed lines. The scatter plots show the profile of different pixel rows present in the region. The red curve shows the theoretical X-ray transmission of the wire. The black curve represents the convolution between the theoretical X-ray transmission in the wire and a Gaussian distribution.
A model of this transition was proposed convoluting the ideal transmission of the wire with a gaussian curve which represents the non-ideal response of the system to a delta function (i.e. the image obtained from a very thin slit in an X-ray opaque layer in the same position as the wire). The width of the gaussian was adjusted to (3.5±0.3)μm to fit the experimental data, which means that a very thin slit will be observed as a gaussian signal with a diameter of twice this radius, i.e. (7±0.6) μm. This spatial resolution can be attributed to the size of the X-ray spot of the source, the pixel size, and the spread of charge in the sensor as described in detail in [7]
The CIS was designed to capture visible light with short exposure (integration) times. Because of its low efficiency when collecting X-ray photons, fewer events were collected than when illuminated with visible light resulting in low-quality, noisy images. Increasing exposure times led to poor image quality because of the events hitting the same pixels and thus saturating the sensor. Therefore, to obtain high quality and visually satisfying images, many short exposure frames were obtained at each position and were then averaged, denoised and inverted, as described in the Methods section. Image quality was assessed by estimating their contrast to noise ratio (CNR). CNR between two different areas (A and B) of an image was calculated as the ratio between the difference of the average signal of A and B and the standard deviation of the image noise (σ0).
At high CNR values different anatomical structures were more likely to be identified. Stacks of 500 images were enough to obtain a CNR of 17.1±1.3 for adult zebrafish. CNR significantly increased to 22.0±2.4 by applying a FFT low-pass filter. To aid in the positioning of the animals and to avoid unwanted movements during acquisition, the fish were placed inside standard 1 ml plastic micropipette tips, reducing the CNR to 9.4±0.7 because of the X-ray absorption by the plastic tube. Image denoising with FFT significantly increased the CNR to 11.7±1.3. In spite of the significant decrease of CNR values, image contrast was enough to clearly visualize internal fish structures. Shown in Figure 3 A, from left to right, are the images resulting from one acquisition of 4.5 ms, and the average over 10, 50, and 500 sequential acquisitions. Acquiring all 500 frames took an average of 30 s and, for samples larger than the sensor such as adult zebrafish, sampling the entire fish took close to 6 min (3 min./cm2) when acquiring with a 50 % overlap between adjacent images for effective stitching. Clearly, it would be very useful if the time and total radiation dose required to obtain good-quality images could be reduced, saving time, beam usage, and minimizing sensor damage. This can be achieved by improving the image quality with denoising techniques allowing to obtain images of similar quality using fewer than 500 frames. X-ray image denoising has been extensively studied (see [23] for a recent review). The main challenge is to smooth the random noise generated by a Poisson process with a low number of counts without losing relevant structures.
Different number of frames (each 4.5 ms) were averaged and then subjected to the six denoising methods. All the output images were compared to the average of 500 frames (used as ground truth). The similarity was evaluated using two indices: the Peak-Signal-to-Noise Ratio (PSNR) and the Structural Similarity index (SSIM). The first one depends on the ratio between the maximum value of the reference image and the mean square difference between the ground truth image and the noisy image [24]. As PSNR does not always match subjective evaluations of quality, we also measured SSIM, a product of the Pearson correlation between the denoised image and the ground truth image multiplied by terms that penalize deviation of the mean intensity and variance. In Figure 3 B we show some examples of the results obtained for 4 of the denoising methods (Poisson mode, NL-Means, Noise2Noise, and ROF) when applied to the image obtained from the average of 10 frames. Good quality images were obtained with as low as 10 and 50 frames as revealed by an increase in PSNR and SSIM (Fig. 3 C, and 3 D) thus reducing the acquisition time by a factor of 50 with respect to the reference case. When more than 100 frames were averaged, the improvements in PSNR and SSIM reached a plateau, suggesting that denoising procedures are particularly useful when fewer than 100 frames are acquired (Fig. 3 C, and 3 D). It was evident that under our experimental conditions, even the simplest denoising methods provided good behavior. In the range of 10 to 50 images, ROF and FFT are the ones with best performance and DNCNN the least effective one.

a) Head zebrafish images resulting from the average of 1, 10, 50, and 500 (N Im ) acquisitions of 4.5 ms. b) Results of 4 denoising methods (Poisson mode, NL-Means, Noise2Noise, and ROF) applied to the image with N Im = 10 shown in (a). Scale bars: 1 mm. Peak-Signal-to-Noise Ratio (PSNR) and the Structural Similarity (SSIM) indexes, c) and d) respectively.
After image processing and stitching, clear digital radiographic images of zebrafish evidencing skeletal structures, skin, and some internal organs were obtained (Fig. 4 A, 4 B, and 4 D). Because most tissues in biological samples do not attenuate X-rays, the images of non-stained zebrafish provide very little contrast and thus little morphological information except for skeletal structures. On the other hand, staining the specimens with contrast agents (containing high atomic number elements), improved visualization of those tissues where the reagent was absorbed (Fig. 4 C, 4 E, and 4 F). As previously reported for other systems and samples [25], PTA provided an excellent contrast, particularly in the eyes, digestive tract, gills, and some muscles (mostly those related to fin movements). To make some of the organs more evident the look-up tables (LUT) of some images were modified accordingly. This can aid in further manual or automatic segmentation of the images to identify specific anatomical structures. In this case the LUTs were adjusted to make the mineralized bones (Fig. 4 B, and 4 D) and gills more evident (Fig. 4 F).

Zebrafish X-Ray imaging. A zebrafish specimen imaged before and after PTA staining. In the absence of PTA the highest attenuation levels were produced by mineralized bones and intermediate levels were observed for muscles, skin (with scales) and some internal organs. After PTA incubation, attenuation increased for several internal tissues, notably for gills, brain, rectum, eyes, and fin-associated muscles. An attenuation increase was also observed for scales while bone attenuation decreased, making the skeletal structures less evident. a) Radiographic image of the unstained specimen obtained after stitching together 10 images covering the entire fish. b) Same image as a) with contrast and brightness modifications to aid visualization of skeletal structures. c) Radiographic Image of the same specimen after being stained with PTA. d) & e) Detail of the head portion of images b) & c). f) Same as e) with image curve levels modified to aid the visualization of gills, brain and eyes. Abbreviations: Ca = caudal, D = dorsal, Ro = rostral, V = ventral. Scale bars: 1 mm.
The images obtained with our CMOS-based system were compared with those obtained with commercial systems including a Medipix2 sensor, and an X-ray film. Figure 5 shows ventral radiographs of a zebrafish head stained with PTA acquired with the three methods and denoised by applying a 3 pixel low-pass FFT filter (to all images). The three methods rendered radiographs in which the fish were visible. The CIS provided the best image quality, followed by radiographic film that produced similar but grainier image. The Medipix generated poor quality images with lower resolution and dynamic range. These differences are evident in Figure 5, particularly in Fig 5b-d where the radiographic image of the right eye can be observed.

Ventral radiographies of the head of a zebrafish stained with PTA obtained with different detection methods. To compare different imaging methods, the images were obtained using a CMOS image sensor, an X-ray film, and a Medipix sensor as labeled. Scale bar: 5 mm. Figures b), c), and d) show magnified sections of the head containing the right eye, obtained with the CIS, radiographic film, and Medipix respectively. Scale bars: 1 mm.
Since our imaging system provided high-quality X-ray images of zebrafish we tested its performance with fruit flies, a much smaller and boneless animal-model. Through their life-cycle fruit flies undergo four different developmental stages: egg (embryo), larva, pupa, and adult. At each one of these stages the fruit fly looks remarkably different. The eggs are typically 0.5 mm long and white, the larvae are white, translucent and between 2 and 5 mm in size and the pupae are brown and opaque. The eggs and pupae do not move, the larvae moves and feeds actively, and the adults can fly. The larval stage can be subdivided in 3 sub-stages (L1, L2, and L3). Figure 6 a) shows specimens for L1, L2, L3, pupa, and a recently eclosed adult as observed under a regular visible light scope together with the X-ray images of the same specimens. PTA was used as a contrast agent since it proved to be fast and easy to use, and it previously provided excellent results in zebrafish. The X-ray imaging system provided clear images of all tested samples, particularly when used with PTA-stained specimens. Figure 6 b) depicts an image of a Wasp (Vespula germanica) obtained with a visible light scope (left) and a radiograph of its head (right). In Figure 6 c) it is possible to appreciate an image of a seahorse (Hippocampus patagonicus) and its radiography.

a) PTA stained Drosophila melanogaster flies at various developmental stages obtained with visible range imaging (left column) and X-Rays (right column). All specimens were imaged from their right side except for the pupa labeled as “P dorsal” which was imaged from its dorsal side. Specimens on the left and right columns were the same. Small alignment and position differences between the visible and X-ray images can be observed due to small movements introduced by transferring the specimens between both imaging systems. Abbreviations: Ca = caudal, D = dorsal, L1 =, first instar larvae, L2 and L3 = second and third instar larvae, NE = newly eclosed fly, P = pupa, P dorsal = dorsal view of a pupa, V = ventral, Ro = rostral. Scale bar: 1 mm. b) Wasp (Vespula germanica), left: image obtained with a visible light scope, right: radiograph of its head. Scale bar: 1.2 mm. c) Seahorse (Hippocampus patagonicus), left: Visible light image, right: X-ray image. Scale bar: 5 mm.
Remarkably, anatomical details of flies undergoing pupal development can be observed during the pupal stages (P and P dorsal). The internal anatomy of the fly larvae is also distinctly visible, with the darker areas corresponding to the digestive system. Notably, consistent regions exhibiting very high X-ray attenuation (depicted as white areas in the images) were observed in all imaged larvae. These areas included a small ventral spot in the anal division, resulting from the fusion of abdominal segments A8 and A9, in the L1 and L2 stages, which was not apparent in L3. Additionally, a larger area was located ventrally in the first abdominal segment (A1). It is important to emphasize that the primary focus of this study is not the identification of these high attenuation structures or the provision of a detailed sample anatomy description. However, these observations function as a proof of concept for the potential applicability of this imaging system in investigating small invertebrate specimens.
The feasibility of using low-cost, mass-produced components to obtain high-resolution X-ray images of small animal samples was proved in this work, providing the basis upon which other laboratories can build their customized imaging systems tailored to their specific necessities and budgets. As is, the system provides clear X-ray images of small animal samples with a resolution of (7±0.6)μm, and a CNR of 22.0±2.4. The specimens can be stained with contrast agents containing high Z elements if contrast enhancement is needed to study soft tissues and organs. Contrast enhancement of soft tissues was obtained with a solution containing W, but other contrast agents will probably be useful as well. A thorough analysis of contrast agents for X-ray imaging of soft tissues was published by [26]. As shown in this work, clear X-ray images can be obtained from zebrafish and fruit flies, two of the most widely used animal models for biomedical and evo-devo research. It can also be used to study the morphology of other animals, including worms and arthropods other than fruit flies. When used for samples larger than the sensor size, the sample must be moved to obtain an array of images from a grid covering the whole sample. Although a high-precision mechanical system is desirable to move the sample, it is optional because the image stitching process can correct most of the misalignments. Also, because the images are formed by the contrast between areas with different X-ray attenuation, no focusing is required. This allows for the use of very simple off-the-shelf, and low-cost components to build the entire system. The number of short exposure images that need to be acquired to obtain a final image with enough contrast to make it useful depends on many factors, mostly on the beam energy, photons flux, sensor detection efficiency (they will determine the background brightness and noise), and the X-ray attenuation properties of the sample (it will provide the “signal” intensity). In this work, we observed that for most animal samples, between 250 and 500 images with 4.5 ms exposure were enough to obtain final images with a CNR of 22.0±2.4. As a result, completing an adult zebrafish imaging session took less than five minutes and imaging ten fruit-fly larvae took about 40 s. These times can be drastically reduced by employing adequate denoising techniques. After assessing the results of a variety of image-denoising methods (NLM, FFT, ROF, N2N, and DNCNN) it was evident that all tested methods lead to significant improvements in PSNR and SSIM. The use of NLM, FFT, and ROF provided an acceleration of 10 to 50 meaning 50 frames could be used to obtain a similar image to the one obtained by averaging 500 frames. Further improvements can be made to the system and image processing methods to achieve shorter acquisition times: Higher flow X-ray sources can be used (increasing the system’s cost), the light cover (aluminum foil) can be made with lower X-ray attenuation materials or it could be completely removed if the room is dark enough, and the sensor can be cooled (at the expense of making the system much more complex).
Using Commercial-Off-The-Self CMOS image sensors, multi-spectral X-ray imaging, X-ray spectroscopy, and high-resolution neutron imaging of non-biological samples were recently achieved, indicating that they could be combined with the techniques described in this work for the study of animal samples [7–10]. Minor system modifications can be implemented to facilitate specimen rotation along its major axis, allowing for the acquisition of images suitable for CT reconstruction. To achieve 3D reconstructed images the sample must be rotated relative to both the X-ray source and the sensor, capturing images from various angles. Subsequent post-processing can be employed to derive the 3D reconstructed image. While various experimental approaches are feasible, a straightforward method involves scanning the entire sample and then rotating it by two degrees before scanning it again. Over 180 iterations, a sufficient number of images from diverse angles can be obtained and subsequent post-processing, including image stacking, denoising, and inverse Radon transformation can be used to generate a 3D reconstruction of the specimen. This can be accomplished using the same system employed in this study, with the inclusion of a single stepper motor for specimen rotation and the necessary adjustments to ensure sample stability during rotation.
Footnotes
Acknowledgments
This work was supported by CONICET (Argentina) under project PIP 11220210100114CO, ANPCyT (Argentina) under projects PICT 2018-2886, PICT 2020-1016, and by SIIP Universidad Nacional de Cuyo (Argentina) under project Cod. C022-T1. The authors would like to thank Dr. Lucas Mongiat and Sabrina Riva (Medical Physiscs Department, CAB, CNEA) for providing the dead zebrafish and fruit flies respectively. Also to Dr. Diego Luzzatto for providing the dead seahorse specimen, and to Dr. Julio Güimpel, Dr. Gladys Nieva, and the staff of the Departamento de Fisicoquímica y Control de Calidad, Complejo Tecnológico Pilcaniyeu, CNEA.
