Here’s the table of contents:

  1. Use ReadImage to load and convert to a numpy array

Use ReadImage to load and convert to a numpy array

    import SimpleITK as sitk
    volume = sitk.ReadImage("./image.mhd");
    volume_np = sitk.GetArrayFromImage(volume);
    print (volume_np.shape);

See!