1. Manipulating neuroimaging data

Before training any model, you need to load, organise and transform your neuroimaging data. This is precisely what the data tools of ClinicaDL are for, and this chapter walks you through them, from the elementary data structures to the batches that will be fed to your network.

  1. Data structures — the objects ClinicaDL uses to carry an image, its masks and its metadata together.

  2. Reading neuroimaging datasets — how to read neuroimaging data, how to speed up loading by converting images to tensors, and how to combine several datasets.

  3. Transforming data — how to extract patches or slices from images, and how to apply pre-processing, data augmentation and post-processing.

  4. Splitting data — how to build training, validation and testing sets while preventing data leakage.

  5. Batching data for training — how to iterate over a dataset in batches.