DICOM is the native file format for CT scans. It turns scan data from raw files into information that software can parse and use, while its headers preserve metadata needed to interpret the scan. section 12.3 section 12.4.1
For machine-learning work, the practical goal is usually not to manipulate DICOM bytes directly. A parser or library can load the data into a structured voxel array, leaving the project focused on the medical information rather than its low-level representation. section 12.3
DICOM-related data handling connects several coordinate and representation layers:
- The CT scan becomes a three-dimensional voxel array with addressable indices. section 12.3
- The patient coordinate system uses millimeters and defines positive X as patient-left, Y as posterior, and Z as toward the head; this orientation is abbreviated LPS. section 12.4.1
- Metadata in the DICOM header relates patient coordinates to array indices, allowing anatomy locations to be mapped into the scan. section 12.4.1
Loading scan data through a library
A SimpleITK-based loader reads an image file and converts it into a NumPy array. The resulting object can expose 3D nodule-density data without requiring the application to implement a DICOM parser. section 12.3
Figure 12.4 Loading a CT scan produces a voxel array and a transformation from patient coordinates to array indices. This process is essential for converting raw data into a structured, machine-readable format suitable for analysis. The .mhd and .raw files provide the raw volumetric data, which is transformed into a 3D voxel array for easy indexing and processing.
Shows the pipeline from raw scan files to a voxel array and the transformation needed for structured indexing. section 12.3
Figure 12.5 Using the transformation information to convert a nodule center coordinate in candidate coordinates (X,Y,Z) to an array index (I,R,C)
Shows how a nodule location in patient coordinates becomes an array index. section 12.4.1
