public static void Run()
        {
            //ExStart:DICOMCroppingByShifts
            // 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))
                {
                    // Call and supply the four values to Crop method and Save the results to disk
                    image.Crop(1, 1, 1, 1);
                    image.Save(dataDir + "DICOMCroppingByShifts_out.bmp", new BmpOptions());
                }
            //ExEnd:DICOMCroppingByShifts
        }
Exemplo n.º 2
0
        public static void Run()
        {
            // ExStart:DICOMCroppingByShifts
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_DICOM();

            // Load an existing image.
            using (DicomImage image = new DicomImage(dataDir + "image.dcm"))
            {
                // Call and supply the four values to Crop method and Save the results to disk
                image.Crop(1, 1, 1, 1);
                image.Save(dataDir + "DICOMCroppingByShifts_out.bmp", new BmpOptions());
            }
            // ExEnd:DICOMCroppingByShifts
        }
        public static void Run()
        {
            // ExStart:DICOMCroppingByShifts
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_DICOM();

            // Load an existing image.
            using (DicomImage image = new DicomImage(dataDir + "image.dcm"))
            {
                // Call and supply the four values to Crop method and Save the results to disk
                image.Crop(1, 1, 1, 1);              
                image.Save(dataDir + "DICOMCroppingByShifts_out.bmp", new BmpOptions());
            }
            // ExEnd:DICOMCroppingByShifts
        }