public static void Run()
{
// ExStart:GrayscalingOnDICOM
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_DICOM();
// Load an existing image.
using (DicomImage image = new DicomImage(dataDir + "image.dcm"))
{
// Transform image to its grayscale representation and Save the resultant image.
image.Grayscale();
image.Save(dataDir + "GrayscalingOnDICOM_out.bmp", new BmpOptions());
}
// ExEnd:GrayscalingOnDICOM
}
}