Not able to determine value of attributes in Image Pixel Module!!! - DICOM

This is a discussion on Not able to determine value of attributes in Image Pixel Module!!! - DICOM ; Hi all I am working on a DICOM converter, for converting jpeg image format to DICOM format.I have choosen SC Image IOD(I am getting scanned images from a scanner). I am stuck because I could not determine values of few ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Not able to determine value of attributes in Image Pixel Module!!!

  1. Not able to determine value of attributes in Image Pixel Module!!!

    Hi all I am working on a DICOM converter, for converting jpeg image
    format to DICOM format.I have choosen SC Image IOD(I am getting
    scanned images from a scanner). I am stuck because I could not
    determine values of few mandatory attributes. These are as below:
    Part-3 , section-C.7.6.3 (Image Pixel Module):

    1. Samples per pixel
    2. Photometric Interpretation
    3. Rows
    4. Columns
    5. Bits Allocated
    6. Bits Stored
    7. High Bit
    8. Pixel Representation

    A normal jpeg image has following information:
    1. Width(in pixels)
    2. Height(in pixels)
    3. Horizontal Resolution(in dpi)
    4. Vertical Resolution(in dpi)
    5. Bit Depth
    6. Frame Count

    Please clarify if i am using correct values when
    converting a jpeg to DICOM or not:

    1. Sample per pixel - 1(monochrome) or 3(RGB) ??
    please clarify if it should be 1 or 3 and why??

    2. Photometric Interpretation
    If i choose "Sample per pixel"=1 then the value of
    this attribute should be "monochrome1 or
    monochrome2(please clarify)??"

    3. Rows = Width (i.e value of "width" attribute of a jpeg file)
    (please clarify! )

    4.Columns = Height(i.e value of "Height" attribute of a jpeg file)
    (please clarify! )

    5*. Bits Allocated= ??(could not determine its value)

    6*. Bits Stored =? (could not determine its value)

    7*. High Bit=? (could not determine its value)

    8*. Pixel Representation = 1 or 0 (please clarify)?

    Waiting for reply and thanks in advance

    cheers.ssss
    Navdeep



  2. Re: Not able to determine value of attributes in Image PixelModule!!!

    Hi Navdeep,

    I will be using IJG vocabulary, but I bet your JPEG library is using
    a very close vocabulary.

    On Jan 28, 12:24 pm, navdeepr...@gmail.com wrote:
    > Hi all I am working on a DICOM converter, for converting jpeg image
    > format to DICOM format.I have choosen SC Image IOD(I am getting
    > scanned images from a scanner). I am stuck because I could not
    > determine values of few mandatory attributes. These are as below:
    > Part-3 , section-C.7.6.3 (Image Pixel Module):
    >
    > 1. Samples per pixel
    > 2. Photometric Interpretation
    > 3. Rows
    > 4. Columns
    > 5. Bits Allocated
    > 6. Bits Stored
    > 7. High Bit
    > 8. Pixel Representation
    >
    > A normal jpeg image has following information:
    > 1. Width(in pixels)
    > 2. Height(in pixels)
    > 3. Horizontal Resolution(in dpi)
    > 4. Vertical Resolution(in dpi)
    > 5. Bit Depth
    > 6. Frame Count


    I am not sure about 3/4 since density_unit can be 0 for unknown while
    being 1 for dots/inch and 2 for dots/cm. So you should really check
    that in the JPEg header coming out of your scanner.
    I am not sure about 6 either. I have never seen a JPEG (other than
    J2K) having multiple frames...

    > Please clarify if i am using correct values when
    > converting a jpeg to DICOM or not:
    >
    > 1. Sample per pixel - 1(monochrome) or 3(RGB) ??
    > please clarify if it should be 1 or 3 and why??


    Pretty straighforward:
    1. if JCS_GRAYSCALE then MONOCHROME2 + SamplePerPixel = 1
    2. if JCS_RGB then PALETTE COLOR + SamplePerPixel = 3 (I am not sure
    about Planar Configuration in this case, but I believe JPEG has
    PlanarConfiguration=0)
    3. if JCS_YCbCr simple decompres in RGB space and do the same as 2.
    4. if JCS_CMYK or JCS_YCCK well I do not know...

    > 2. Photometric Interpretation
    > If i choose "Sample per pixel"=1 then the value of
    > this attribute should be "monochrome1 or
    > monochrome2(please clarify)??"


    MONOCHROME2 is the one used in JPEG.

    > 3. Rows = Width (i.e value of "width" attribute of a jpeg file)
    > (please clarify! )
    > 4.Columns = Height(i.e value of "Height" attribute of a jpeg file)
    > (please clarify! )


    Almost

    JPEG Height <-> DICOM Rows (0028,0010)
    JPEG Width <-> DICOM Columns (0028,0011)


    > 5*. Bits Allocated= ??(could not determine its value)


    Since this is a regular scanner and you are produce lossy jpeg. This
    value should be set to 8.

    > 6*. Bits Stored =? (could not determine its value)


    Since this is a regular scanner and you are produce lossy jpeg. This
    value should be set to 8.

    > 7*. High Bit=? (could not determine its value)


    Since this is a regular scanner and you are produce lossy jpeg. This
    value should be set to 7.

    > 8*. Pixel Representation = 1 or 0 (please clarify)?


    Since this is a regular scanner and you are produce lossy jpeg. This
    value should be set to 0 (jpeg only support unsigned char).

    HTH
    -Mathieu

  3. Re: Not able to determine value of attributes in Image PixelModule!!!

    On Jan 28, 3:19 pm, Mathieu Malaterre
    wrote:
    > Hi Navdeep,
    >
    > I will be using IJG vocabulary, but I bet your JPEG library is using
    > a very close vocabulary.
    >
    > On Jan 28, 12:24 pm, navdeepr...@gmail.com wrote:
    >
    >
    >
    > > Hi all I am working on a DICOM converter, for converting jpeg image
    > > format to DICOM format.I have choosen SC Image IOD(I am getting
    > > scanned images from a scanner). I am stuck because I could not
    > > determine values of few mandatory attributes. These are as below:
    > > Part-3 , section-C.7.6.3 (Image Pixel Module):

    >
    > > 1. Samples per pixel
    > > 2. Photometric Interpretation
    > > 3. Rows
    > > 4. Columns
    > > 5. Bits Allocated
    > > 6. Bits Stored
    > > 7. High Bit
    > > 8. Pixel Representation

    >
    > > A normal jpeg image has following information:
    > > 1. Width(in pixels)
    > > 2. Height(in pixels)
    > > 3. Horizontal Resolution(in dpi)
    > > 4. Vertical Resolution(in dpi)
    > > 5. Bit Depth
    > > 6. Frame Count

    >
    > I am not sure about 3/4 since density_unit can be 0 for unknown while
    > being 1 for dots/inch and 2 for dots/cm. So you should really check
    > that in the JPEg header coming out of your scanner.
    > I am not sure about 6 either. I have never seen a JPEG (other than
    > J2K) having multiple frames...
    >
    > > Please clarify if i am using correct values when
    > > converting a jpeg to DICOM or not:

    >
    > > 1. Sample per pixel - 1(monochrome) or 3(RGB) ??
    > > please clarify if it should be 1 or 3 and why??

    >
    > Pretty straighforward:
    > 1. if JCS_GRAYSCALE then MONOCHROME2 + SamplePerPixel = 1
    > 2. if JCS_RGB then PALETTE COLOR + SamplePerPixel = 3 (I am not sure
    > about Planar Configuration in this case, but I believe JPEG has
    > PlanarConfiguration=0)
    > 3. if JCS_YCbCr simple decompres in RGB space and do the same as 2.
    > 4. if JCS_CMYK or JCS_YCCK well I do not know...
    >
    > > 2. Photometric Interpretation
    > > If i choose "Sample per pixel"=1 then the value of
    > > this attribute should be "monochrome1 or
    > > monochrome2(please clarify)??"

    >
    > MONOCHROME2 is the one used in JPEG.
    >
    > > 3. Rows = Width (i.e value of "width" attribute of a jpeg file)
    > > (please clarify! )
    > > 4.Columns = Height(i.e value of "Height" attribute of a jpeg file)
    > > (please clarify! )

    >
    > Almost
    >
    > JPEG Height <-> DICOM Rows (0028,0010)
    > JPEG Width <-> DICOM Columns (0028,0011)
    >
    > > 5*. Bits Allocated= ??(could not determine its value)

    >
    > Since this is a regular scanner and you are produce lossy jpeg. This
    > value should be set to 8.
    >
    > > 6*. Bits Stored =? (could not determine its value)

    >
    > Since this is a regular scanner and you are produce lossy jpeg. This
    > value should be set to 8.
    >
    > > 7*. High Bit=? (could not determine its value)

    >
    > Since this is a regular scanner and you are produce lossy jpeg. This
    > value should be set to 7.
    >
    > > 8*. Pixel Representation = 1 or 0 (please clarify)?

    >
    > Since this is a regular scanner and you are produce lossy jpeg. This
    > value should be set to 0 (jpeg only support unsigned char).
    >
    > HTH
    > -Mathieu


    Hi Mathieu!
    Thanks for clarifying my doubts but i still have some!

    a)I am getting images scanned from a scanner(a normal scanner
    and not a colored scanner). So as per me for my case
    "Sample Per Pixel" should be 1 , since i guess the image scanned
    is a gray scale image(correct me if I am wrong!)
    But i came to know from somewhere that in my case i can use
    "Sample per pixel"=3(RGB) also. That's why i am still confused
    if for my scenario the value should be 1 or 3(please clarify)??

    b)So accordingly "Photometric Interpretation" will be RGB if
    "Sample per pixel"=3

    c)The reason why you said "Bits stored"=8 is that a normal jpeg
    image stores stores 24 bits per pixel i.e. 8 bit per channel
    (red, green, blue)?? please correct me if wrong!

    d) Bits Allocated= Bits stored??

    e) When is say my jpeg image is 8 bit or 16 bit that implies
    that jpeg image stores 8 bits per channel or 16 bit per channel
    i.e. red,green, blue(please clarify)??

    f)High Bit= Bits Allocated-1 or High Bit= Bits Stored-1 ??

    Once again thanks in advance for your time!
    cheersss.sssss
    Navdeep

+ Reply to Thread