title: Understanding the BPP inside DICOM images
body: <p>I'm working with DICOM files since a few days, using FO-DICOM.</p>
  
  <p>I'm using a set of dicom files for my tests, and I've been printing the "Photometric Interpretation" and the "Sample Per Pixel" values, to have a better understanding of what kind of images I'm working with.</p>
  
  <p>The result was "MONOCHROME2" for the Photometric Interpretation, and "1" for the Sample Per Pixel.</p>
  
  <p>What I understood by reading the part3 of the standard is that MONOCHROME2 represent a gray scale, starting from black for its minimum values.</p>
  
  <p>But what is the Sample Per Pixel exactly? I thought this was representing the number of <strong>bytes</strong> (and not bits) per pixel (that would be logic to have 8 <strong>bits</strong> per pixel for a scale of gray right?)</p>
  
  <p>But my problem here is that actually, my images seem to have 32 bpp.
  I'm working with 512*512 pixels images, and I converted them into byte arrays. So I was expecting arrays of 512*512=262144 bytes.
  But I get arrays of 1048630 bytes (which is a bit more than 4*262144)</p>
  
  <p>Does someone have an explanation?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Here's are some of my datas :</p>
  
  <pre><code>PhotometricInterpretation=MONOCHROME2
  SamplePerPixel=1
  BitsAllocated=16
  BitsStored=12
  HighBit=11
  PixelRepresentation=0
  NumberOfFrames=0
  </code></pre>