GetImageInformation Example for C#
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestGetImageInformation()
{
string msg = null;
LEADDICOM1.GetImageInformation(0);
msg = "Compression: " + System.Convert.ToString(LEADDICOM1.ImageInfo.Compression) +
"\r" + "\n";
msg = msg + "Photometric: " + System.Convert.ToString(LEADDICOM1.ImageInfo.Photometric) +
" - " + LEADDICOM1.ImageInfo.PhotometricString
+ "\r" + "\n";
msg = msg + "Rows x Columns: " + System.Convert.ToString(LEADDICOM1.ImageInfo.Rows) + "
x " + LEADDICOM1.ImageInfo.Columns
+ "\r" + "\n";
msg = msg + "Bits Allocated: " + System.Convert.ToString(LEADDICOM1.ImageInfo.BitsAllocated)
+ "\r" + "\n";
msg = msg + "Bits Stored: " + System.Convert.ToString(LEADDICOM1.ImageInfo.BitsStored) + "\r"
+ "\n";
msg = msg + "High Bit: " + System.Convert.ToString(LEADDICOM1.ImageInfo.HighBit) + "\r"
+ "\n";
msg = msg + "Pixel Representation: " + System.Convert.ToString(LEADDICOM1.ImageInfo.PixelRepresentation)
+ "\r" + "\n";
msg = msg + "Planar Configuration: " + System.Convert.ToString(LEADDICOM1.ImageInfo.PlanarConfiguration)
+ "\r" + "\n";
msg = msg + "ResolutionX: " + System.Convert.ToString(LEADDICOM1.ImageInfo.ResolutionX) +
"\r" + "\n";
msg = msg + "ResolutionY: " + System.Convert.ToString(LEADDICOM1.ImageInfo.ResolutionY) +
"\r" + "\n";
msg = msg + "SmallestImagePixelValue: " + System.Convert.ToString(LEADDICOM1.ImageInfo.SmallestImagePixelValue)
+ "\r" + "\n";
msg = msg + "SmallestImagePixelValueFlag: "
+ LEADDICOM1.ImageInfo.SmallestImagePixelValueFlag
+ "\r" + "\n";
msg = msg + "LargestImagePixelValue: " + System.Convert.ToString(LEADDICOM1.ImageInfo.LargestImagePixelValue)
+ "\r" + "\n";
msg = msg + "LargestImagePixelValueFlag: "
+ LEADDICOM1.ImageInfo.LargestImagePixelValueFlag
+ "\r" + "\n";
msg = msg + "RedEntries: " + System.Convert.ToString(LEADDICOM1.ImageInfo.RedEntries) + "\r"
+ "\n";
msg = msg + "RedFirst: " + System.Convert.ToString(LEADDICOM1.ImageInfo.RedFirst) + "\r"
+ "\n";
msg = msg + "RedBits: " + System.Convert.ToString(LEADDICOM1.ImageInfo.RedBits) + "\r"
+ "\n";
msg = msg + "GreenEntries: " + System.Convert.ToString(LEADDICOM1.ImageInfo.GreenEntries) +
"\r" + "\n";
msg = msg + "GreenFirst: " + System.Convert.ToString(LEADDICOM1.ImageInfo.GreenFirst) + "\r"
+ "\n";
msg = msg + "GreenBits: " + System.Convert.ToString(LEADDICOM1.ImageInfo.GreenBits) + "\r"
+ "\n";
msg = msg + "BlueEntries: " + System.Convert.ToString(LEADDICOM1.ImageInfo.BlueEntries) +
"\r" + "\n";
msg = msg + "BlueFirst: " + System.Convert.ToString(LEADDICOM1.ImageInfo.BlueFirst) + "\r"
+ "\n";
msg = msg + "BlueBits: " + System.Convert.ToString(LEADDICOM1.ImageInfo.BlueBits) + "\r"
+ "\n";
msg = msg + "PaletteEntries: " + System.Convert.ToString(LEADDICOM1.ImageInfo.PaletteEntries)
+ "\r" + "\n";
msg = msg + "PaletteFirst: " + System.Convert.ToString(LEADDICOM1.ImageInfo.PaletteFirst) +
"\r" + "\n";
msg = msg + "BitsPerPixel: " + System.Convert.ToString(LEADDICOM1.ImageInfo.BitsPerPixel) +
"\r" + "\n";
msg = msg + "Gray: " + LEADDICOM1.ImageInfo.Gray
+ "\r" + "\n";
msg = msg + "Frames: " + System.Convert.ToString(LEADDICOM1.ImageInfo.Frames) + "\r"
+ "\n";
MessageBox.Show(msg);
}