private void GetImageFromFile(BasicGrayscaleImageSequenceIod imageBox, object fileName) { imageBox.AddDicomFileValues(fileName.ToString()); }
internal void BeforeSet(ColorMode colorMode) { byte[] pixelData; ushort rows; ushort columns; if (colorMode == ColorMode.Color) { var image = new BasicColorImageSequenceIod { SamplesPerPixel = 3, PhotometricInterpretation = PhotometricInterpretation.Rgb, PixelRepresentation = 0, PixelAspectRatio = new PixelAspectRatio(1, 1), PlanarConfiguration = 0, BitsStored = 8, BitsAllocated = 8, HighBit = 7 }; this.PrintItem.GetPixelData(this, colorMode, out rows, out columns, out pixelData); image.PixelData = pixelData; image.Rows = rows; image.Columns = columns; this.BasicColorImageSequenceList.Add(image); } else { var image = new BasicGrayscaleImageSequenceIod { SamplesPerPixel = 1, PhotometricInterpretation = PhotometricInterpretation.Monochrome2, PixelRepresentation = 0, PixelAspectRatio = new PixelAspectRatio(1, 1), BitsStored = 8, BitsAllocated = 8, HighBit = 7 }; this.PrintItem.GetPixelData(this, colorMode, out rows, out columns, out pixelData); image.PixelData = pixelData; image.Rows = rows; image.Columns = columns; this.BasicGrayscaleImageSequenceList.Add(image); } }