Grayscale
DicomImage.Grayscale method
将图像转换为其灰度表示
public override void Grayscale()
例子
以下示例将彩色 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;
dicomImage.Grayscale();
dicomImage.Save(dir + "sample.Grayscale.png", new Aspose.Imaging.ImageOptions.PngOptions());
}
也可以看看
- class DicomImage
- 命名空间 Aspose.Imaging.FileFormats.Dicom
- 部件 Aspose.Imaging