示例#1
0
文件: Print.cs 项目: khaha2210/radio
 private void GetImageFromFile(BasicGrayscaleImageSequenceIod imageBox, object fileName)
 {
     imageBox.AddDicomFileValues(fileName.ToString());
 }
示例#2
0
文件: PrintScu2.cs 项目: nhannd/Xian
			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);
				}
			}