コード例 #1
0
        public static void Run()
        {
            // ExStart:AdjustBrightnessDICOM
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_DICOM();

            // Load a DICOM image in an instance of DicomImage
            using (DicomImage image = new DicomImage(dataDir + "image.dcm"))
            {
                // Adjust the brightness and Create an instance of BmpOptions for the resultant image and Save the resultant image
                image.AdjustBrightness(50);
                image.Save(dataDir + "AdjustBrightnessDICOM_out.bmp", new BmpOptions());
            }
            // ExEnd:AdjustBrightnessDICOM
        }
コード例 #2
0
        public static void Run()
        {
            // ExStart:AdjustBrightnessDICOM
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_DICOM();

            // Load a DICOM image in an instance of DicomImage
            using (DicomImage image = new DicomImage(dataDir + "image.dcm"))
            {
                // Adjust the brightness and Create an instance of BmpOptions for the resultant image and Save the resultant image
                image.AdjustBrightness(50);
                image.Save(dataDir + "AdjustBrightnessDICOM_out.bmp", new BmpOptions());
            }
            // ExEnd:AdjustBrightnessDICOM
        }
コード例 #3
0
        public static void Run()
        {
            //ExStart:AdjustBrightnessDICOM
            // 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))
                {
                    // Adjust the brightness and Create an instance of BmpOptions for the resultant image and Save the resultant image
                    image.AdjustBrightness(50);
                    image.Save(dataDir + "AdjustBrightnessDICOM_out.bmp", new BmpOptions());
                }
            //ExEnd:AdjustBrightnessDICOM
        }