Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

"Your attitude determines your attitude." -- Zig Ziglar, self-improvement doofus


devel / comp.protocols.dicom / Re: YBR_FULL_422

SubjectAuthor
* YBR_FULL_422Valentí_Montoya
+- YBR_FULL_422Chris O'Donnell
`* YBR_FULL_422Mathieu Malaterre
 `* YBR_FULL_422Chris O'Donnell
  +- YBR_FULL_422Valentí_Montoya
  `* YBR_FULL_422Valentí_Montoya
   `* YBR_FULL_422Chris O'Donnell
    `* YBR_FULL_422Mathieu Malaterre
     `* YBR_FULL_422David Gobbi
      `* YBR_FULL_422David Gobbi
       `* YBR_FULL_422Valentí_Montoya
        `- YBR_FULL_422Chris O'Donnell

1
YBR_FULL_422

<fdba9554-5f00-4588-9ff2-94b693c4757cn@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1324&group=comp.protocols.dicom#1324

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:a05:620a:16c8:b0:6ce:21bd:7e41 with SMTP id a8-20020a05620a16c800b006ce21bd7e41mr6496125qkn.304.1663955359001;
Fri, 23 Sep 2022 10:49:19 -0700 (PDT)
X-Received: by 2002:a05:6870:55a4:b0:130:c298:46e5 with SMTP id
n36-20020a05687055a400b00130c29846e5mr1191116oao.216.1663955358595; Fri, 23
Sep 2022 10:49:18 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.protocols.dicom
Date: Fri, 23 Sep 2022 10:49:18 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=83.40.192.185; posting-account=sHRafQoAAAD_hV6C4pFG6XgBSEf3zKoP
NNTP-Posting-Host: 83.40.192.185
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fdba9554-5f00-4588-9ff2-94b693c4757cn@googlegroups.com>
Subject: YBR_FULL_422
From: uveeme@gmail.com (Valentí Montoya)
Injection-Date: Fri, 23 Sep 2022 17:49:18 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2958
 by: Valentí Montoya - Fri, 23 Sep 2022 17:49 UTC

Hi;

We are having trouble displaying a DICOM object.

This is a compressed object and is YBR_FULL_422. We believe that the object is not well formed, since YBR_FULL_422 and TransferSyntaxUID=JPEGLossless:Non-hierarchical-1stOrderPrediction do not appear in the standard.

Nut, MicroDicom viewer does not display the image correctly, while the RadiAnt does. If we use the DCMTKs to decompress the DICOM object, the result is not displayed correctly neither with the MicroDicom nor with the RadiAnt.

Specifically, it has this data:

COMPRESSED:
(0002,0010) UI =JPEGLossless:Non-hierarchical-1stOrderPrediction # 22, 1 TransferSyntaxUID
(0028,0004) CS [YBR_FULL_422] # 12, 1 PhotometricInterpretation
(0028,0006) US 0 # 2, 1 PlanarConfiguration
(0028,0010) US 576 # 2, 1 Rows
(0028,0011) US 720 # 2, 1 Columns
(0028,0100) US 8 # 2, 1 BitsAllocated
(0028,0101) US 8 # 2, 1 BitsStored
(0028,0102) US 7 # 2, 1 HighBit
(0028,0103) US 0 # 2, 1 PixelRepresentation
(0028,2110) CS [01] # 2, 1 LossyImageCompression
(0028,2112) DS [7] # 2, 1 LossyImageCompressionRatio
(0040,0253) SH (no value available) # 0, 0 PerformedProcedureStepID
(7fe0,0010) OB (PixelSequence #=2) # u/l, 1 PixelData
(fffe,e000) pi 00\00\00\00 # 4, 1 Item
(fffe,e000) pi ff\d8\ff\c4\00\50\00\01\00\02\03\01\01\01\00\00\00\00\00\00\00\00... # 813366, 1 Item
(fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem

Any idea what is going on??

Thank you and take care!!

Re: YBR_FULL_422

<6100093d-3909-402c-803a-26c51268dae1n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1326&group=comp.protocols.dicom#1326

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:a05:620a:22e2:b0:6cf:5ed5:a51c with SMTP id p2-20020a05620a22e200b006cf5ed5a51cmr7478289qki.92.1663980535749;
Fri, 23 Sep 2022 17:48:55 -0700 (PDT)
X-Received: by 2002:a05:6808:1988:b0:34f:de19:411c with SMTP id
bj8-20020a056808198800b0034fde19411cmr9918294oib.262.1663980535437; Fri, 23
Sep 2022 17:48:55 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.protocols.dicom
Date: Fri, 23 Sep 2022 17:48:55 -0700 (PDT)
In-Reply-To: <fdba9554-5f00-4588-9ff2-94b693c4757cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=165.225.61.70; posting-account=k73DqAkAAADdoksgsJTi6tuONxlkoUr0
NNTP-Posting-Host: 165.225.61.70
References: <fdba9554-5f00-4588-9ff2-94b693c4757cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6100093d-3909-402c-803a-26c51268dae1n@googlegroups.com>
Subject: Re: YBR_FULL_422
From: go.chris.bot@gmail.com (Chris O'Donnell)
Injection-Date: Sat, 24 Sep 2022 00:48:55 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3562
 by: Chris O'Donnell - Sat, 24 Sep 2022 00:48 UTC

On Friday, September 23, 2022 at 1:49:20 PM UTC-4, uve...@gmail.com wrote:
> Hi;
>
> We are having trouble displaying a DICOM object.
>
> This is a compressed object and is YBR_FULL_422. We believe that the object is not well formed, since YBR_FULL_422 and TransferSyntaxUID=JPEGLossless:Non-hierarchical-1stOrderPrediction do not appear in the standard.
>
> Nut, MicroDicom viewer does not display the image correctly, while the RadiAnt does. If we use the DCMTKs to decompress the DICOM object, the result is not displayed correctly neither with the MicroDicom nor with the RadiAnt.
>
> Specifically, it has this data:
>
> COMPRESSED:
> (0002,0010) UI =JPEGLossless:Non-hierarchical-1stOrderPrediction # 22, 1 TransferSyntaxUID
> (0028,0004) CS [YBR_FULL_422] # 12, 1 PhotometricInterpretation
> (0028,0006) US 0 # 2, 1 PlanarConfiguration
> (0028,0010) US 576 # 2, 1 Rows
> (0028,0011) US 720 # 2, 1 Columns
> (0028,0100) US 8 # 2, 1 BitsAllocated
> (0028,0101) US 8 # 2, 1 BitsStored
> (0028,0102) US 7 # 2, 1 HighBit
> (0028,0103) US 0 # 2, 1 PixelRepresentation
> (0028,2110) CS [01] # 2, 1 LossyImageCompression
> (0028,2112) DS [7] # 2, 1 LossyImageCompressionRatio
> (0040,0253) SH (no value available) # 0, 0 PerformedProcedureStepID
> (7fe0,0010) OB (PixelSequence #=2) # u/l, 1 PixelData
> (fffe,e000) pi 00\00\00\00 # 4, 1 Item
> (fffe,e000) pi ff\d8\ff\c4\00\50\00\01\00\02\03\01\01\01\00\00\00\00\00\00\00\00... # 813366, 1 Item
> (fffe,e0dd) na (SequenceDelimitationItem) # 0, 0 SequenceDelimitationItem
>
> Any idea what is going on??
>
>
> Thank you and take care!!

1.2.840.10008.1.2.4.70 JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1])
can be used with any colorspace, the JPEG Lossless encoding works just fine.. Finding some viewer that can interpret this combination of data, is another story.

Assuming the image data is in fact good, since you had success with the RadiAnt viewer. So the output of the DCMTK, is it handling the colorspace conversion back to RGB so you can get a displayable image? If the output of the decoding is still YBR_FULL_422, then you'll have to do something else to get to the desired RFB colorspace.

-thanks

Re: YBR_FULL_422

<55edf458-901f-4800-b234-fadc014a72ecn@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1327&group=comp.protocols.dicom#1327

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:a05:6214:1bcd:b0:4af:646a:9793 with SMTP id m13-20020a0562141bcd00b004af646a9793mr5334037qvc.94.1664174966327;
Sun, 25 Sep 2022 23:49:26 -0700 (PDT)
X-Received: by 2002:aca:4554:0:b0:343:3998:aff3 with SMTP id
s81-20020aca4554000000b003433998aff3mr14245534oia.119.1664174966043; Sun, 25
Sep 2022 23:49:26 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.protocols.dicom
Date: Sun, 25 Sep 2022 23:49:25 -0700 (PDT)
In-Reply-To: <fdba9554-5f00-4588-9ff2-94b693c4757cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=91.173.12.104; posting-account=5syELgoAAABMLWsjbxhk8Wo7CLxGgTPG
NNTP-Posting-Host: 91.173.12.104
References: <fdba9554-5f00-4588-9ff2-94b693c4757cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <55edf458-901f-4800-b234-fadc014a72ecn@googlegroups.com>
Subject: Re: YBR_FULL_422
From: mathieu.malaterre@gmail.com (Mathieu Malaterre)
Injection-Date: Mon, 26 Sep 2022 06:49:26 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1711
 by: Mathieu Malaterre - Mon, 26 Sep 2022 06:49 UTC

On Friday, September 23, 2022 at 7:49:20 PM UTC+2, uve...@gmail.com wrote:
> Hi;
>
> We are having trouble displaying a DICOM object.
>
> This is a compressed object and is YBR_FULL_422. We believe that the object is not well formed, since YBR_FULL_422 and TransferSyntaxUID=JPEGLossless:Non-hierarchical-1stOrderPrediction do not appear in the standard.

Correct:

* https://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_8.2.html#table_8.2.1-1

while:

* https://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_8.2.html#table_8.2.1-2

Re: YBR_FULL_422

<a8240eb4-0a13-4639-a0bb-2cf49b58a531n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1328&group=comp.protocols.dicom#1328

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:a05:6214:29ea:b0:4ad:8743:699a with SMTP id jv10-20020a05621429ea00b004ad8743699amr16441000qvb.44.1664202677117;
Mon, 26 Sep 2022 07:31:17 -0700 (PDT)
X-Received: by 2002:a05:6808:1997:b0:34f:d372:b790 with SMTP id
bj23-20020a056808199700b0034fd372b790mr9923897oib.2.1664202676854; Mon, 26
Sep 2022 07:31:16 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.protocols.dicom
Date: Mon, 26 Sep 2022 07:31:16 -0700 (PDT)
In-Reply-To: <55edf458-901f-4800-b234-fadc014a72ecn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=165.225.58.13; posting-account=k73DqAkAAADdoksgsJTi6tuONxlkoUr0
NNTP-Posting-Host: 165.225.58.13
References: <fdba9554-5f00-4588-9ff2-94b693c4757cn@googlegroups.com> <55edf458-901f-4800-b234-fadc014a72ecn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a8240eb4-0a13-4639-a0bb-2cf49b58a531n@googlegroups.com>
Subject: Re: YBR_FULL_422
From: go.chris.bot@gmail.com (Chris O'Donnell)
Injection-Date: Mon, 26 Sep 2022 14:31:17 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3593
 by: Chris O'Donnell - Mon, 26 Sep 2022 14:31 UTC

On Monday, September 26, 2022 at 2:49:27 AM UTC-4, Mathieu Malaterre wrote:
> On Friday, September 23, 2022 at 7:49:20 PM UTC+2, uve...@gmail.com wrote:
> > Hi;
> >
> > We are having trouble displaying a DICOM object.
> >
> > This is a compressed object and is YBR_FULL_422. We believe that the object is not well formed, since YBR_FULL_422 and TransferSyntaxUID=JPEGLossless:Non-hierarchical-1stOrderPrediction do not appear in the standard.
> Correct:
>
> * https://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_8..2.html#table_8.2.1-1
>
> while:
>
> * https://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_8..2.html#table_8.2.1-2

Interesting I've never seen that particular table, but congrats on finding the info.

Again this is another "grey area" of PixelData (yes really bad joke), simply too many encoding possibilities, and any vendor's Conformance may or may not go into details beyond simple support of SOP Class / Transfer pairs. In any event, if the original creator of this image knew what they were doing, then the image started life as JPEG Lossy since (0028,2110) CS [01] # 2, 1 LossyImageCompression == 1, and the colorspace is YBR_FULL_422, also what JPEG Lossy uses. Then somewhere the image being decompressed, then possibly re-encoded as Lossless, all the while maintaining the original colorspace, and hence the current state of the image. Real world case, ultrasound image to PACS to some archive, then later retrieve, is enough to demo this workflow.

Seems unusual that YBR_FULL is supported but not YBR_FULL_422, perhaps whoever decided this table was trying to keep things simple or simply missed some combinations.

So JPEG Lossless does not care about colorspace (Photometric), essentially binary blob going in ==> binary blob coming out later when decoding, and the burden is still on the user of the decoder to convert the colorspace into something usable, whatever that means for your application.

I've also seen images from the wild, that are both Planar and YBR_FULL, this combination is not on the table of JPEG Lossless support, but not surprising.

What do we do with these DICOM grey areas? Depends on what you're trying to achieve.

-thanks

Re: YBR_FULL_422

<ee64bec4-3138-4d64-a83f-55f2eb9644dbn@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1329&group=comp.protocols.dicom#1329

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:a05:620a:254f:b0:6cf:9b54:11dd with SMTP id s15-20020a05620a254f00b006cf9b5411ddmr4548900qko.55.1664215648590;
Mon, 26 Sep 2022 11:07:28 -0700 (PDT)
X-Received: by 2002:a05:6870:559b:b0:12c:8f0e:73bc with SMTP id
n27-20020a056870559b00b0012c8f0e73bcmr3018oao.142.1664215648326; Mon, 26 Sep
2022 11:07:28 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.protocols.dicom
Date: Mon, 26 Sep 2022 11:07:28 -0700 (PDT)
In-Reply-To: <a8240eb4-0a13-4639-a0bb-2cf49b58a531n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.88.70.21; posting-account=sHRafQoAAAD_hV6C4pFG6XgBSEf3zKoP
NNTP-Posting-Host: 84.88.70.21
References: <fdba9554-5f00-4588-9ff2-94b693c4757cn@googlegroups.com>
<55edf458-901f-4800-b234-fadc014a72ecn@googlegroups.com> <a8240eb4-0a13-4639-a0bb-2cf49b58a531n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ee64bec4-3138-4d64-a83f-55f2eb9644dbn@googlegroups.com>
Subject: Re: YBR_FULL_422
From: uveeme@gmail.com (Valentí Montoya)
Injection-Date: Mon, 26 Sep 2022 18:07:28 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1860
 by: Valentí Montoya - Mon, 26 Sep 2022 18:07 UTC

Thanks for your answers.

I don't have so clear the key point, and for that, I attach my dicom file if you want to test and check my DICOM file.

https://wetransfer.com/downloads/7363d6744724eb361d8a1d9e03610b4520220926180110/52e83f49e69ca14e3390b34cd1347db820220926180127/d9b281

I guess that is a YBR_FULL_422 but every compoenent in YBR_FULL_422 (Y1,Y2,Cb1,Cr1 , Y3,Y4,Cb2,Cr2) compressed is 12 bits and not 8. I think so because, after uncompress this object the pixel data size is not rows*columns*2, is rows*columns*samplesPerPixel.

Thanks

Re: YBR_FULL_422

<4337b4fc-44be-4478-af30-1e0b4ea265b9n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1330&group=comp.protocols.dicom#1330

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:a05:620a:1a18:b0:6ce:6fa8:fba0 with SMTP id bk24-20020a05620a1a1800b006ce6fa8fba0mr15196304qkb.292.1664215946888;
Mon, 26 Sep 2022 11:12:26 -0700 (PDT)
X-Received: by 2002:a05:6808:f8d:b0:350:ec44:80b1 with SMTP id
o13-20020a0568080f8d00b00350ec4480b1mr11715oiw.162.1664215946577; Mon, 26 Sep
2022 11:12:26 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.protocols.dicom
Date: Mon, 26 Sep 2022 11:12:26 -0700 (PDT)
In-Reply-To: <a8240eb4-0a13-4639-a0bb-2cf49b58a531n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.88.70.21; posting-account=sHRafQoAAAD_hV6C4pFG6XgBSEf3zKoP
NNTP-Posting-Host: 84.88.70.21
References: <fdba9554-5f00-4588-9ff2-94b693c4757cn@googlegroups.com>
<55edf458-901f-4800-b234-fadc014a72ecn@googlegroups.com> <a8240eb4-0a13-4639-a0bb-2cf49b58a531n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4337b4fc-44be-4478-af30-1e0b4ea265b9n@googlegroups.com>
Subject: Re: YBR_FULL_422
From: uveeme@gmail.com (Valentí Montoya)
Injection-Date: Mon, 26 Sep 2022 18:12:26 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1846
 by: Valentí Montoya - Mon, 26 Sep 2022 18:12 UTC

Thanks for your answers.

I don't have so clear the key point, and for that, I attach my dicom file if you want to test and check my DICOM file.

https://we.tl/t-eQo2X1hFHk

I guess that is a YBR_FULL_422 but every compoenent in YBR_FULL_422 (Y1,Y2,Cb1,Cr1 , Y3,Y4,Cb2,Cr2) compressed is 12 bits and not 8. I think so because, after uncompress this object the pixel data size is not rows*columns*2, is rows*columns*samplesPerPixel.

We transfer has a Preview option, if you don't trust this content. Please, check it.

Thanks

Re: YBR_FULL_422

<c84d397f-5e23-4d6f-941c-26189ead9a00n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1332&group=comp.protocols.dicom#1332

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:a05:6214:1cc7:b0:4af:6573:c056 with SMTP id g7-20020a0562141cc700b004af6573c056mr7263406qvd.103.1664219480858;
Mon, 26 Sep 2022 12:11:20 -0700 (PDT)
X-Received: by 2002:a05:6870:a710:b0:127:b0be:3d39 with SMTP id
g16-20020a056870a71000b00127b0be3d39mr123129oam.119.1664219480341; Mon, 26
Sep 2022 12:11:20 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.protocols.dicom
Date: Mon, 26 Sep 2022 12:11:20 -0700 (PDT)
In-Reply-To: <4337b4fc-44be-4478-af30-1e0b4ea265b9n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=165.225.58.13; posting-account=k73DqAkAAADdoksgsJTi6tuONxlkoUr0
NNTP-Posting-Host: 165.225.58.13
References: <fdba9554-5f00-4588-9ff2-94b693c4757cn@googlegroups.com>
<55edf458-901f-4800-b234-fadc014a72ecn@googlegroups.com> <a8240eb4-0a13-4639-a0bb-2cf49b58a531n@googlegroups.com>
<4337b4fc-44be-4478-af30-1e0b4ea265b9n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c84d397f-5e23-4d6f-941c-26189ead9a00n@googlegroups.com>
Subject: Re: YBR_FULL_422
From: go.chris.bot@gmail.com (Chris O'Donnell)
Injection-Date: Mon, 26 Sep 2022 19:11:20 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3176
 by: Chris O'Donnell - Mon, 26 Sep 2022 19:11 UTC

On Monday, September 26, 2022 at 2:12:28 PM UTC-4, uve...@gmail.com wrote:
> Thanks for your answers.
>
> I don't have so clear the key point, and for that, I attach my dicom file if you want to test and check my DICOM file.
>
> https://we.tl/t-eQo2X1hFHk
>
> I guess that is a YBR_FULL_422 but every compoenent in YBR_FULL_422 (Y1,Y2,Cb1,Cr1 , Y3,Y4,Cb2,Cr2) compressed is 12 bits and not 8. I think so because, after uncompress this object the pixel data size is not rows*columns*2, is rows*columns*samplesPerPixel.
>
>
> We transfer has a Preview option, if you don't trust this content. Please, check it.
>
>
> Thanks

Mathieu is 100% correct, the DICOM standard says your combination is *not* supported, so that could be your final deciding factor.

If you still want to try and support it anyways, then read on. You did mention that one viewer RadiAnt did show these images, or does it have some error?

(0028,0010) US 576 # 2, 1 Rows
(0028,0011) US 720 # 2, 1 Columns
(0028,0100) US 8 # 2, 1 BitsAllocated
(0028,0101) US 8 # 2, 1 BitsStored

So it should be 8 bits / channel. The YBR_FULL_422 colorspace is using chroma subsampling, so you will get fewer pixels than with RGB:
https://en.wikipedia.org/wiki/Chroma_subsampling
RGB:
720 * 576 * 3 = 1,244,160 pixels
YBR_FULL_422:
Y (720 * 576) * 1
B (720 * 576) * 0.5
R (720 * 576) * 0.5
720 * 576 * 2 = 829,440 pixels

But looking at the PixelData size from your original post, it says 813,366
(fffe,e000) pi ff\d8\ff\c4\00\50\00\01\00\02\03\01\01\01\00\00\00\00\00\00\00\00... # 813366
That seems wrong, with anything lossless, you should get approximately 33% to 50% of original size, as a rough guide. So maybe it is not well-formed after all?

-thanks

Re: YBR_FULL_422

<a352d368-64b1-4f98-a7ef-cce24941e9a6n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1333&group=comp.protocols.dicom#1333

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:ac8:7f54:0:b0:35d:159d:f88e with SMTP id g20-20020ac87f54000000b0035d159df88emr21137280qtk.415.1664280793464;
Tue, 27 Sep 2022 05:13:13 -0700 (PDT)
X-Received: by 2002:a05:6871:202:b0:127:90c1:6672 with SMTP id
t2-20020a056871020200b0012790c16672mr1922528oad.162.1664280793013; Tue, 27
Sep 2022 05:13:13 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.protocols.dicom
Date: Tue, 27 Sep 2022 05:13:12 -0700 (PDT)
In-Reply-To: <c84d397f-5e23-4d6f-941c-26189ead9a00n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=91.173.12.104; posting-account=5syELgoAAABMLWsjbxhk8Wo7CLxGgTPG
NNTP-Posting-Host: 91.173.12.104
References: <fdba9554-5f00-4588-9ff2-94b693c4757cn@googlegroups.com>
<55edf458-901f-4800-b234-fadc014a72ecn@googlegroups.com> <a8240eb4-0a13-4639-a0bb-2cf49b58a531n@googlegroups.com>
<4337b4fc-44be-4478-af30-1e0b4ea265b9n@googlegroups.com> <c84d397f-5e23-4d6f-941c-26189ead9a00n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a352d368-64b1-4f98-a7ef-cce24941e9a6n@googlegroups.com>
Subject: Re: YBR_FULL_422
From: mathieu.malaterre@gmail.com (Mathieu Malaterre)
Injection-Date: Tue, 27 Sep 2022 12:13:13 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4683
 by: Mathieu Malaterre - Tue, 27 Sep 2022 12:13 UTC

On Monday, September 26, 2022 at 9:11:22 PM UTC+2, go.chr...@gmail.com wrote:
> On Monday, September 26, 2022 at 2:12:28 PM UTC-4, uve...@gmail.com wrote:
> > Thanks for your answers.
> >
> > I don't have so clear the key point, and for that, I attach my dicom file if you want to test and check my DICOM file.
> >
> > https://we.tl/t-eQo2X1hFHk
> >
> > I guess that is a YBR_FULL_422 but every compoenent in YBR_FULL_422 (Y1,Y2,Cb1,Cr1 , Y3,Y4,Cb2,Cr2) compressed is 12 bits and not 8. I think so because, after uncompress this object the pixel data size is not rows*columns*2, is rows*columns*samplesPerPixel.
> >
> >
> > We transfer has a Preview option, if you don't trust this content. Please, check it.
> >
> >
> > Thanks
> Mathieu is 100% correct, the DICOM standard says your combination is *not* supported, so that could be your final deciding factor.
>
> If you still want to try and support it anyways, then read on. You did mention that one viewer RadiAnt did show these images, or does it have some error?
> (0028,0010) US 576 # 2, 1 Rows
> (0028,0011) US 720 # 2, 1 Columns
> (0028,0100) US 8 # 2, 1 BitsAllocated
> (0028,0101) US 8 # 2, 1 BitsStored
> So it should be 8 bits / channel. The YBR_FULL_422 colorspace is using chroma subsampling, so you will get fewer pixels than with RGB:
> https://en.wikipedia.org/wiki/Chroma_subsampling
> RGB:
> 720 * 576 * 3 = 1,244,160 pixels
> YBR_FULL_422:
> Y (720 * 576) * 1
> B (720 * 576) * 0.5
> R (720 * 576) * 0.5
> 720 * 576 * 2 = 829,440 pixels
>
> But looking at the PixelData size from your original post, it says 813,366
> (fffe,e000) pi ff\d8\ff\c4\00\50\00\01\00\02\03\01\01\01\00\00\00\00\00\00\00\00... # 813366
> That seems wrong, with anything lossless, you should get approximately 33% to 50% of original size, as a rough guide. So maybe it is not well-formed after all?
>
> -thanks

There is no subsampling in the DICOM/JPEG file uploaded. This is a plain regular JPEG Lossless (no sub-sampling).

$ jpegdump < input.jpg >& output.txt
$ cat output.txt
[...]
Offset 0x0054 Marker 0xffc3 SOF3 Huffman Lossless Sequential length variable 0x11
JPEG_SOF_Parameters:
SamplePrecision = 8
nLines = 576
nSamplesPerLine = 720
nComponentsInFrame = 3
component 0
ComponentIdentifier = 1
HorizontalSamplingFactor = 1
VerticalSamplingFactor = 1
QuantizationTableDestinationSelector = 0
component 1
ComponentIdentifier = 2
HorizontalSamplingFactor = 1
VerticalSamplingFactor = 1
QuantizationTableDestinationSelector = 0
component 2
ComponentIdentifier = 3
HorizontalSamplingFactor = 1
VerticalSamplingFactor = 1
QuantizationTableDestinationSelector = 0

Re: YBR_FULL_422

<72327f92-c85a-4330-9845-3442c1df7530n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1334&group=comp.protocols.dicom#1334

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:a37:644e:0:b0:6cb:cd57:f9a7 with SMTP id y75-20020a37644e000000b006cbcd57f9a7mr18723214qkb.57.1664299639083;
Tue, 27 Sep 2022 10:27:19 -0700 (PDT)
X-Received: by 2002:a05:6808:49:b0:350:77ce:3368 with SMTP id
v9-20020a056808004900b0035077ce3368mr2290105oic.195.1664299637380; Tue, 27
Sep 2022 10:27:17 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.protocols.dicom
Date: Tue, 27 Sep 2022 10:27:17 -0700 (PDT)
In-Reply-To: <a352d368-64b1-4f98-a7ef-cce24941e9a6n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=198.161.4.57; posting-account=oJk4vAoAAAAuHqwGdLwYUlL776upyWJ3
NNTP-Posting-Host: 198.161.4.57
References: <fdba9554-5f00-4588-9ff2-94b693c4757cn@googlegroups.com>
<55edf458-901f-4800-b234-fadc014a72ecn@googlegroups.com> <a8240eb4-0a13-4639-a0bb-2cf49b58a531n@googlegroups.com>
<4337b4fc-44be-4478-af30-1e0b4ea265b9n@googlegroups.com> <c84d397f-5e23-4d6f-941c-26189ead9a00n@googlegroups.com>
<a352d368-64b1-4f98-a7ef-cce24941e9a6n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <72327f92-c85a-4330-9845-3442c1df7530n@googlegroups.com>
Subject: Re: YBR_FULL_422
From: david.gobbi@gmail.com (David Gobbi)
Injection-Date: Tue, 27 Sep 2022 17:27:19 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2427
 by: David Gobbi - Tue, 27 Sep 2022 17:27 UTC

On Tuesday, 27 September 2022 at 06:13:14 UTC-6, Mathieu Malaterre wrote:
> There is no subsampling in the DICOM/JPEG file uploaded. This is a plain regular JPEG Lossless (no sub-sampling).

It is truly a Frankenstein DICOM. It seems that it was subsampled and then fed into the JPEG compression as if it was _not_ subsampled. I can make it into a "valid" image like this, with dcmtk:

# force PhotometricInterpretation to RGB (no subsampling) and decompress
dcmodify -m "0028,0004=RGB" ko_c_anon.dcm
dcmdjpeg ko_c_anon.dcm ko_c_anon_decompressed.dcm

# force PhotometricInterpetation back to YBR_FULL_422 (subsampled)
dcmodify -m "0028,0004=YBR_FULL_422" ko_c_anon_decompressed.dcm

# convert to pnm for viewing (I used dcmtk 3.6.6)
dcm2pnm ko_c_anon_decompressed.dcm ko_c_anon_decompressed.pnm

After the above commands, I get a .pnm that displays propertly.
The .pnm format can be read by GIMP and possibly by some other programs.

To make a long story short, even the encapsulated JPEG is messed up.

Re: YBR_FULL_422

<73a43a92-1f57-45a8-a86b-2386d94372a0n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1335&group=comp.protocols.dicom#1335

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:a05:622a:190:b0:35d:4803:4303 with SMTP id s16-20020a05622a019000b0035d48034303mr7062291qtw.253.1664310548850;
Tue, 27 Sep 2022 13:29:08 -0700 (PDT)
X-Received: by 2002:a05:6870:428f:b0:12d:69e5:78a3 with SMTP id
y15-20020a056870428f00b0012d69e578a3mr3267401oah.195.1664310548619; Tue, 27
Sep 2022 13:29:08 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.protocols.dicom
Date: Tue, 27 Sep 2022 13:29:08 -0700 (PDT)
In-Reply-To: <72327f92-c85a-4330-9845-3442c1df7530n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=198.161.4.57; posting-account=oJk4vAoAAAAuHqwGdLwYUlL776upyWJ3
NNTP-Posting-Host: 198.161.4.57
References: <fdba9554-5f00-4588-9ff2-94b693c4757cn@googlegroups.com>
<55edf458-901f-4800-b234-fadc014a72ecn@googlegroups.com> <a8240eb4-0a13-4639-a0bb-2cf49b58a531n@googlegroups.com>
<4337b4fc-44be-4478-af30-1e0b4ea265b9n@googlegroups.com> <c84d397f-5e23-4d6f-941c-26189ead9a00n@googlegroups.com>
<a352d368-64b1-4f98-a7ef-cce24941e9a6n@googlegroups.com> <72327f92-c85a-4330-9845-3442c1df7530n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <73a43a92-1f57-45a8-a86b-2386d94372a0n@googlegroups.com>
Subject: Re: YBR_FULL_422
From: david.gobbi@gmail.com (David Gobbi)
Injection-Date: Tue, 27 Sep 2022 20:29:08 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2107
 by: David Gobbi - Tue, 27 Sep 2022 20:29 UTC

Apologies for the double-post, but here is a full pipeline for rescuing the file with dcmtk 3.6.6:

dcmodify -m "0028,0004=RGB" ko_c_anon.dcm
dcmdjpeg ko_c_anon.dcm ko_c_anon_ybr_422.dcm
dcmodify -m "0028,0004=YBR_FULL_422" ko_c_anon_ybr_422.dcm
dcm2pnm --write-bmp ko_c_anon_decompressed.dcm ko_c_anon_ybr_422.bmp
img2dcm --dataset-from ko_c_anon.dcm --input-format BMP ko_c_anon_ybr_422.bmp ko_c_anon_repaired.dcm

The resulting file "ko_c_anon_repaired.dcm" is uncompressed RGB.

Note that the PixelData in the intermediate "ko_c_anon_ybr_422.dcm" file contains 829440 bytes of 422 data following by 414720 bytes of unused zeros.

Re: YBR_FULL_422

<276ec545-32f1-4ecf-95a1-ce85f3900abdn@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1339&group=comp.protocols.dicom#1339

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:a05:622a:64b:b0:35d:5860:ea86 with SMTP id a11-20020a05622a064b00b0035d5860ea86mr15850146qtb.277.1664803702877;
Mon, 03 Oct 2022 06:28:22 -0700 (PDT)
X-Received: by 2002:a05:6870:9a1e:b0:132:2c3:7b6 with SMTP id
fo30-20020a0568709a1e00b0013202c307b6mr5438412oab.119.1664803702620; Mon, 03
Oct 2022 06:28:22 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.protocols.dicom
Date: Mon, 3 Oct 2022 06:28:22 -0700 (PDT)
In-Reply-To: <73a43a92-1f57-45a8-a86b-2386d94372a0n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=84.88.70.21; posting-account=sHRafQoAAAD_hV6C4pFG6XgBSEf3zKoP
NNTP-Posting-Host: 84.88.70.21
References: <fdba9554-5f00-4588-9ff2-94b693c4757cn@googlegroups.com>
<55edf458-901f-4800-b234-fadc014a72ecn@googlegroups.com> <a8240eb4-0a13-4639-a0bb-2cf49b58a531n@googlegroups.com>
<4337b4fc-44be-4478-af30-1e0b4ea265b9n@googlegroups.com> <c84d397f-5e23-4d6f-941c-26189ead9a00n@googlegroups.com>
<a352d368-64b1-4f98-a7ef-cce24941e9a6n@googlegroups.com> <72327f92-c85a-4330-9845-3442c1df7530n@googlegroups.com>
<73a43a92-1f57-45a8-a86b-2386d94372a0n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <276ec545-32f1-4ecf-95a1-ce85f3900abdn@googlegroups.com>
Subject: Re: YBR_FULL_422
From: uveeme@gmail.com (Valentí Montoya)
Injection-Date: Mon, 03 Oct 2022 13:28:22 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1792
 by: Valentí Montoya - Mon, 3 Oct 2022 13:28 UTC

Thanks a lot. it works perfectly.

Can you explain the clues that made you think the pixel data was subsampled, but when the pixeldata was compressed, it was made as if it wasn't subsampled? Tools and atributes that argues this point?

Thanks to all!!

Re: YBR_FULL_422

<8cd70673-809b-4356-a7e9-e37ed081b117n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1340&group=comp.protocols.dicom#1340

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:ad4:5dc8:0:b0:4ac:7fff:4360 with SMTP id m8-20020ad45dc8000000b004ac7fff4360mr16088903qvh.69.1664804701286;
Mon, 03 Oct 2022 06:45:01 -0700 (PDT)
X-Received: by 2002:a9d:638d:0:b0:65a:1f1a:7a74 with SMTP id
w13-20020a9d638d000000b0065a1f1a7a74mr8388417otk.317.1664804701022; Mon, 03
Oct 2022 06:45:01 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.protocols.dicom
Date: Mon, 3 Oct 2022 06:45:00 -0700 (PDT)
In-Reply-To: <276ec545-32f1-4ecf-95a1-ce85f3900abdn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=165.225.57.251; posting-account=k73DqAkAAADdoksgsJTi6tuONxlkoUr0
NNTP-Posting-Host: 165.225.57.251
References: <fdba9554-5f00-4588-9ff2-94b693c4757cn@googlegroups.com>
<55edf458-901f-4800-b234-fadc014a72ecn@googlegroups.com> <a8240eb4-0a13-4639-a0bb-2cf49b58a531n@googlegroups.com>
<4337b4fc-44be-4478-af30-1e0b4ea265b9n@googlegroups.com> <c84d397f-5e23-4d6f-941c-26189ead9a00n@googlegroups.com>
<a352d368-64b1-4f98-a7ef-cce24941e9a6n@googlegroups.com> <72327f92-c85a-4330-9845-3442c1df7530n@googlegroups.com>
<73a43a92-1f57-45a8-a86b-2386d94372a0n@googlegroups.com> <276ec545-32f1-4ecf-95a1-ce85f3900abdn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8cd70673-809b-4356-a7e9-e37ed081b117n@googlegroups.com>
Subject: Re: YBR_FULL_422
From: go.chris.bot@gmail.com (Chris O'Donnell)
Injection-Date: Mon, 03 Oct 2022 13:45:01 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3254
 by: Chris O'Donnell - Mon, 3 Oct 2022 13:45 UTC

On Monday, October 3, 2022 at 9:28:24 AM UTC-4, uve...@gmail.com wrote:
> Thanks a lot. it works perfectly.
>
> Can you explain the clues that made you think the pixel data was subsampled, but when the pixeldata was compressed, it was made as if it wasn't subsampled? Tools and atributes that argues this point?
>
> Thanks to all!!

From examining the JPEG header (from Mathieu's post):
JPEG_SOF_Parameters:
SamplePrecision = 8
nLines = 576
nSamplesPerLine = 720
nComponentsInFrame = 3
component 0
ComponentIdentifier = 1
HorizontalSamplingFactor = 1
VerticalSamplingFactor = 1
QuantizationTableDestinationSelector = 0
component 1
ComponentIdentifier = 2
HorizontalSamplingFactor = 1
VerticalSamplingFactor = 1
QuantizationTableDestinationSelector = 0
component 2
ComponentIdentifier = 3
HorizontalSamplingFactor = 1
VerticalSamplingFactor = 1
QuantizationTableDestinationSelector = 0

All channels have both HorizontalSamplingFactor = 1, and VerticalSamplingFactor = 1, this indicates "no subsampling", you can look this up.

My suspicion that the image was subsampled, was that I actually trusted the PHOTOMETRIC_INTERPRETATION when it said YBR_FULL_422, the 422 portion here means sub-sampled.

-thanks

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor