The tomographic examination consists of X-rays with X-rays emitted parallel to the image plane of the examined object. As a result of this action, a three-dimensional image is created, which is used to assemble a set of their two-dimensional counterparts (called radiographs), which are recorded at different angles to the adopted coordinate system [
12]. Thanks to the high resolution, it is possible to accurately reproduce the complex surfaces of the tested object. This allows for the presentation of internal discontinuities both in two and three dimensions, which allows their exact location and determination of the size [
13]. The radiation emitted by the source passes through the object and weakens, and its intensity is converted into grayscale contrast. The weakening of the X-ray beam was characterized using Beer’s law [
12].
The volume of the tested object is divided into the so-called voxels, single spatial cells in which the degree of radiation absorption is constant. Each of these voxels can be assigned the diameter of the object divided by the number of pixels. Tomographic images are created in very high resolutions. This is because it is not uncommon for even several thousand two-dimensional photos to be juxtaposed to create a spatial whole. Of course, there are no ideal methods and it is no different in the case of computed tomography. This method is not suitable for testing materials characterized by high density or large wall thicknesses [
14,
15]. The first of these methods is similar to the system of receptors in the organ of vision, the eyes. The second one, however, has a significant advantage over it, it is simpler and much more convenient, the consequence of which is the fact that it is much more widespread than its hexagonal counterpart. Most of the currently used graphic formats are based on the latter of the described grids. One of the most important parameters of any image is its resolution. It is a compromise measure of the ability to recognize image details [
15]. The greater the resolution of an image, the greater the level of detail it represents. Note, however, that a linear increase in resolution results in a square increase in file size. It is also worth mentioning the available color palettes. The measure of their complexity is the number of bits used to remember the state of a single pixel (BPP). The family of algorithms that allow you to perform operations on images is very diverse. It includes, among others, various types of element transformations (scaling, translations, and rotation), pixel brightness transformations (binarization), quality improvement (filtering and artifact removal) and isolation of certain fragments to facilitate the detection of searched objects. In some cases, performing the above-mentioned actions achieves the desired goal, but usually they are part of a larger set of operations and are included in the pre-processing stage.
One of the methods of casting analysis is scanning the examined fragment with X-rays. This method is classified as non-invasive, i.e., the analyzed fragment is not damaged during the test. In practice, it often happens that a selected fragment has previously been specially cut out of the entire casting, which can already be considered an invasive effect on the casting. Nevertheless, this analysis allows for a much more precise dimension of examining the casting fragment, which is not available when examining the photos with a microscope. For this reason, it is an increasingly common form of verification of casting properties. A classic tomograph X-ray examines an object on a 2D scale. A popular solution for capturing radiation is a detector located behind the scanned object. Its task is to measure the intensity of radiation and transmit it as electrical signals. The density of the tested material is of great importance because the higher its value, the less radiation reaches the data-collecting unit, in this case a detector. This means that the material absorbed the radiation that penetrated it. As a result, the material in the photos obtained have a lighter color. Casting defects, e.g., cracks, hardly absorb radiation. For this reason, they are much more visible in X-rays than in places without defects. The cracks in the photos are darker because the increased radiation that they have not absorbed reaches the detector. However, a single X-ray image is not sufficient as it does not provide information on the exact dimensions of the defects (e.g., volume and depth). It is impossible to determine whether the observed defect is located, for example, more to the left or to the right. Additionally, a photo of the casting taken in only one axis may not detect some imperfections. This problem is solved by X-ray computed tomography by taking multiple images of the cast from different angles. The main goal is to create a 3D model of the sample using the photos taken. This approach is most common in medicine. The radiation source and the detector are located in the round part of the device on the movable ring. The lamp together with the detectors takes a photo of the object and then moves a certain distance. In this way, pictures of the object are obtained from different perspectives, which makes it possible to accurately locate possible defects. For the purposes of the article, a tomograph from the Łukasiewicz Research Network-Krakow Institute of Technology, Krakow, Poland (former Foundry Research Institute in Kraków) was used. It consists of an X-ray tube, a detector, a rotating table, and a computer with software enabling the visualization. Tomographs may differ depending on the generation by a different way of realizing the movable lamp-detector system and the arrangement of detectors, but they work in the same way. X-ray computed tomography allows obtaining information about the internal structure of the examined object without interfering with its interior. Unlike a CT scanner used in medicine, in industrial scans the radiation source and detectors are stationary. The test cast is placed on the rotating bottom. First, two-dimensional images of the sample are captured. The radiation generated by the lamp is partially absorbed by the object and then integrated by a detector which converts it into a digital image. The tomograph takes pictures of the sample, and after each of them the element is rotated by a set number of degrees. The three-dimensional image is numerically reproduced from the two-dimensional images. Three-dimensional images, as opposed to two-dimensional ones, provide additional information about the examined object, e.g., they enable the visualization of internal discontinuities of the material. X-ray beam attenuation measurements that fit in each of the voxels are needed to create the image. The measurements are converted into a grayscale contrast that can be seen in 2D images. The direct relation between the local gray level and the degree of light attenuation allows the reconstruction of the mass distribution in the analyzed volume. The obtained image is characterized by very high resolution, which enables precise research and analysis of the structure features of heterogeneous microstructures of materials. The tested object can be displayed in the form of a cross-section, there is also visualization of internal discontinuities, cracks, porosity, and the exact location of the defect. Additionally, it is possible to investigate the distance, volume, and differences in pore density. An example view of the sample and the microstructure of the tested material are shown in
Figure 1.