A slice is a two-dimensional cross-section extracted from a volumetric CT scan. Treating each slice as a separate image lets a 2D model such as SAM segment suspected nodules while keeping results easier to visualize. section 15.6.1 section 15.1
A CT slice supports the segmentation workflow by providing:
- A spatial position within the larger CT volume. section 15.6.1
- A 2D image that can be paired with a nodule point or segmentation mask. section 15.6.2
- Training and validation data for fine-tuning a segmentation model. section 15.6.1 section 15.1
- A cached artifact that avoids repeatedly reading and parsing the full CT volume. section 15.6.2
Extracting one slice
The extraction code converts an XYZ center into image coordinates, selects one axis of the CT array, and returns a two-dimensional tensor. A retrieved example has shape torch.Size([512, 512]) and can be plotted with its candidate nodule point. section 15.6.2
Figure 15.10 Lung CT scan slice with segmentation mask over nodule
View a lung CT slice with a segmentation mask over a nodule. section 15.6.1
