Calculating Pixel Data Size - DICOM

This is a discussion on Calculating Pixel Data Size - DICOM ; How to calculate pixel data size of an uncompressed DICOM Image File. Is it the following equation ((Rows * Columns * Samples Per pixels ) * (Bits Allocated/ 8)) * (total no of frames) or ((Rows * Columns * Samples ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Calculating Pixel Data Size

  1. Calculating Pixel Data Size

    How to calculate pixel data size of an uncompressed DICOM Image File.

    Is it the following equation

    ((Rows * Columns * Samples Per pixels ) * (Bits Allocated/ 8)) *
    (total no of frames)

    or

    ((Rows * Columns * Samples Per pixels ) * (total no of frames))


  2. Re: Calculating Pixel Data Size

    > ((Rows * Columns * Samples Per pixels ) * (Bits Allocated/ 8)) *
    > (total no of frames)

    I think thats it

  3. Re: Calculating Pixel Data Size

    On Mar 2, 10:12 am, Sascha Bohnenkamp
    wrote:
    > > ((Rows * Columns * Samples Per pixels ) * (Bits Allocated/ 8)) *
    > > (total no of frames)

    >
    > I think thats it


    The PixelMed library handles it like this, iirc:

    int bytesPerSample = (bitsAllocated-1)/8+1;
    int bytesPerFrame = columns * rows * samplesPerPixel * bytesPerSample;

    The bytesPerSample-business is accounting for when not all bits in the
    bytes are used.

    Cheers,
    Lennart Kolmodin


+ Reply to Thread