CacheData
DicomImage.CacheData method
Caches the data private.
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
- class DicomImage
- namespace Aspose.Imaging.FileFormats.Dicom
- assembly Aspose.Imaging