public static void Run()
        {
            // ExStart:BinarizationWithFixedThresholdOnDICOMImage
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_DICOM();

            // Load an existing image.
            using (DicomImage image = new DicomImage(dataDir + "image.dcm"))
            {
                // Binarize image with predefined fixed threshold and Save the resultant image.
                image.BinarizeFixed(100);
                image.Save(dataDir + "BinarizationWithFixedThresholdOnDICOMImage_out.bmp", new BmpOptions());
            }
            // ExEnd:BinarizationWithFixedThresholdOnDICOMImage
        }
        public static void Run()
        {
            // ExStart:BinarizationWithFixedThresholdOnDICOMImage
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_DICOM();

            // Load an existing image.
            using (DicomImage image = new DicomImage(dataDir + "image.dcm"))
            {
                // Binarize image with predefined fixed threshold and Save the resultant image.
                image.BinarizeFixed(100);
                image.Save(dataDir + "BinarizationWithFixedThresholdOnDICOMImage_out.bmp", new BmpOptions());
            }
            // ExEnd:BinarizationWithFixedThresholdOnDICOMImage
        }
        public static void Run()
        {
            //ExStart:BinarizationWithFixedThresholdOnDICOMImage
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_DICOM();


            using (var fileStream = new FileStream(dataDir + "file.dcm", FileMode.Open, FileAccess.Read))
                using (DicomImage image = new DicomImage(fileStream))
                {
                    // Binarize image with predefined fixed threshold and Save the resultant image.
                    image.BinarizeFixed(100);
                    image.Save(dataDir + "BinarizationWithFixedThresholdOnDICOMImage_out.bmp", new BmpOptions());
                }
            //ExEnd:BinarizationWithFixedThresholdOnDICOMImage
        }