AdjustContrast
DicomImage.AdjustContrast method
Image
对比
public override void AdjustContrast(float contrast)
范围 | 类型 | 描述 |
---|---|---|
contrast | Single | 对比度值(范围 [-100; 100]) |
例子
以下示例执行 DICOM 图像的对比度校正。
[C#]
string dir = "c:\\temp\\";
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.dicom"))
{
Aspose.Imaging.FileFormats.Dicom.DicomImage dicomImage = (Aspose.Imaging.FileFormats.Dicom.DicomImage)image;
// 设置对比度值。可接受的对比度值在 [-100f, 100f] 范围内。
dicomImage.AdjustContrast(50f);
dicomImage.Save(dir + "sample.AdjustContrast.png", new Aspose.Imaging.ImageOptions.PngOptions());
}
也可以看看
- class DicomImage
- 命名空间 Aspose.Imaging.FileFormats.Dicom
- 部件 Aspose.Imaging