DicomImageCacheData Method
Caches the data private.

Namespace: Aspose.Imaging.FileFormats.Dicom
Assembly: Aspose.Imaging (in Aspose.Imaging.dll) Version: 20.06
Syntax
public override void CacheData()
Examples
The following example shows how to cache all pages of a DICOM image.
[C#]

string dir = "c:\\temp\\";

// Load an image from a DICOM file.
using (Aspose.Imaging.FileFormats.Dicom.DicomImage image = (Aspose.Imaging.FileFormats.Dicom.DicomImage)Aspose.Imaging.Image.Load(dir + "sample.dicom"))
{
    // This call caches all the pages so that no additional data loading will be performed from the underlying data stream.
    image.CacheData();

    // Or you can cache the pages individually.
    foreach (Aspose.Imaging.FileFormats.Dicom.DicomPage page in image.DicomPages)
    {
        page.CacheData();
    }
}
See Also