Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

A fail-safe circuit will destroy others. -- Klipstein


devel / comp.protocols.dicom / ALPINION: Inverted Width / Height in JPEG bitstream

SubjectAuthor
* ALPINION: Inverted Width / Height in JPEG bitstreamMathieu Malaterre
`* Re: ALPINION: Inverted Width / Height in JPEG bitstreamDavid Gobbi
 `- Re: ALPINION: Inverted Width / Height in JPEG bitstreamMathieu Malaterre

1
ALPINION: Inverted Width / Height in JPEG bitstream

<4b782324-6474-4ec3-aa2b-392b9ec339bbn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=264&group=comp.protocols.dicom#264

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:a05:6214:20ad:: with SMTP id 13mr3196470qvd.4.1639579276197;
Wed, 15 Dec 2021 06:41:16 -0800 (PST)
X-Received: by 2002:a05:620a:1a9d:: with SMTP id bl29mr8753094qkb.55.1639579275942;
Wed, 15 Dec 2021 06:41:15 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.protocols.dicom
Date: Wed, 15 Dec 2021 06:41:15 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=91.173.12.104; posting-account=5syELgoAAABMLWsjbxhk8Wo7CLxGgTPG
NNTP-Posting-Host: 91.173.12.104
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4b782324-6474-4ec3-aa2b-392b9ec339bbn@googlegroups.com>
Subject: ALPINION: Inverted Width / Height in JPEG bitstream
From: mathieu.malaterre@gmail.com (Mathieu Malaterre)
Injection-Date: Wed, 15 Dec 2021 14:41:16 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 19
 by: Mathieu Malaterre - Wed, 15 Dec 2021 14:41 UTC

I've just received a bug report that GDCM is actually doing what the standard mandates:

* https://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_8.2..html#para_07617cc6-a4a9-4751-9435-7b496910168d

[...]
When decompressing, should the characteristics explicitly specified in the compressed data stream (e.g., spatial subsampling or number of components or planar configuration) be inconsistent with those specified in the DICOM Data Elements, those explicitly specified in the compressed data stream should be used to control the decompression.
[...]

Here is a test image from the "wild" :

* https://sourceforge.net/p/gdcm/bugs/528/attachment/original.dcm

References:
* https://sourceforge.net/p/gdcm/bugs/528/

Re: ALPINION: Inverted Width / Height in JPEG bitstream

<f330e677-c47e-4be5-a365-86deb81269adn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=265&group=comp.protocols.dicom#265

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:ac8:5c50:: with SMTP id j16mr13705099qtj.255.1639594484352;
Wed, 15 Dec 2021 10:54:44 -0800 (PST)
X-Received: by 2002:a05:6214:5008:: with SMTP id jo8mr9954476qvb.106.1639594484178;
Wed, 15 Dec 2021 10:54:44 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.protocols.dicom
Date: Wed, 15 Dec 2021 10:54:43 -0800 (PST)
In-Reply-To: <4b782324-6474-4ec3-aa2b-392b9ec339bbn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=198.48.161.196; posting-account=oJk4vAoAAAAuHqwGdLwYUlL776upyWJ3
NNTP-Posting-Host: 198.48.161.196
References: <4b782324-6474-4ec3-aa2b-392b9ec339bbn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f330e677-c47e-4be5-a365-86deb81269adn@googlegroups.com>
Subject: Re: ALPINION: Inverted Width / Height in JPEG bitstream
From: david.gobbi@gmail.com (David Gobbi)
Injection-Date: Wed, 15 Dec 2021 18:54:44 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 13
 by: David Gobbi - Wed, 15 Dec 2021 18:54 UTC

However, that same paragraph concludes with:

> The DICOM data elements, if inconsistent, can be regarded as suggestions as to the form in which an uncompressed Data Set might be encoded, subject to the general and IOD-specific rules for uncompressed Photometric Interpretation and Planar Configuration, which may require that decompressed data be converted to one of the permitted forms.

So I disagree that the standard "mandates" that you keep the dimensions. What the standard actually says is that you must use the embedded JPEG dimensions for decompression, but afterwards you may apply additional conversions to make the image match the DICOM data elements according to the IOD. The real problem, as far as I'm concerned, is that the standard gives no details on "how" those additional conversions are to be done.

Re: ALPINION: Inverted Width / Height in JPEG bitstream

<f23f762b-88b7-4400-9979-7fbe11be3737n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=266&group=comp.protocols.dicom#266

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:ac8:5c45:: with SMTP id j5mr15867574qtj.58.1639644231705;
Thu, 16 Dec 2021 00:43:51 -0800 (PST)
X-Received: by 2002:ae9:f511:: with SMTP id o17mr11160725qkg.763.1639644231399;
Thu, 16 Dec 2021 00:43:51 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.protocols.dicom
Date: Thu, 16 Dec 2021 00:43:51 -0800 (PST)
In-Reply-To: <f330e677-c47e-4be5-a365-86deb81269adn@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: <4b782324-6474-4ec3-aa2b-392b9ec339bbn@googlegroups.com> <f330e677-c47e-4be5-a365-86deb81269adn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f23f762b-88b7-4400-9979-7fbe11be3737n@googlegroups.com>
Subject: Re: ALPINION: Inverted Width / Height in JPEG bitstream
From: mathieu.malaterre@gmail.com (Mathieu Malaterre)
Injection-Date: Thu, 16 Dec 2021 08:43:51 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 29
 by: Mathieu Malaterre - Thu, 16 Dec 2021 08:43 UTC

On Wednesday, December 15, 2021 at 7:54:45 PM UTC+1, david...@gmail.com wrote:
> However, that same paragraph concludes with:
>
> > The DICOM data elements, if inconsistent, can be regarded as suggestions as to the form in which an uncompressed Data Set might be encoded, subject to the general and IOD-specific rules for uncompressed Photometric Interpretation and Planar Configuration, which may require that decompressed data be converted to one of the permitted forms.
>
> So I disagree that the standard "mandates" that you keep the dimensions. What the standard actually says is that you must use the embedded JPEG dimensions for decompression, but afterwards you may apply additional conversions to make the image match the DICOM data elements according to the IOD. The real problem, as far as I'm concerned, is that the standard gives no details on "how" those additional conversions are to be done.

This paragraph list only two possibilities "[...]Photometric Interpretation and Planar Configuration[...]". I read them as `Enumerated Values` (*), those cannot be extended by implementers.

To give another example: Samples per Pixel & Bits Allocated cannot imply additional conversion steps. If JPEG SOF marker is inconsistent with those, one should use those and only those contained in the JPEG bitstream.

Anyway, I'll do my homework and report the issue upstream. Online shaming has never been very effective ;)

(*) https://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_6..3.html#sect_6.3

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor