Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Mystics always hope that science will some day overtake them. -- Booth Tarkington


devel / comp.protocols.dicom / DICOM: JPEG + APP2 marker

SubjectAuthor
* DICOM: JPEG + APP2 markerMathieu Malaterre
`* Re: DICOM: JPEG + APP2 markerDavid Clunie
 `* Re: DICOM: JPEG + APP2 markerMathieu Malaterre
  `* Re: DICOM: JPEG + APP2 markerDavid Clunie
   `* Re: DICOM: JPEG + APP2 markerMathieu Malaterre
    `- Re: DICOM: JPEG + APP2 markerDavid Clunie

1
DICOM: JPEG + APP2 marker

<4808cb60-c4de-4ba7-9563-9748de664e80n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:a37:a24a:0:b0:67b:4836:fe95 with SMTP id l71-20020a37a24a000000b0067b4836fe95mr5242642qke.109.1647598219211;
Fri, 18 Mar 2022 03:10:19 -0700 (PDT)
X-Received: by 2002:ad4:5b8f:0:b0:43f:a7fa:2049 with SMTP id
15-20020ad45b8f000000b0043fa7fa2049mr6562510qvp.18.1647598219027; Fri, 18 Mar
2022 03:10:19 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!3.us.feeder.erje.net!feeder.erje.net!border1.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: Fri, 18 Mar 2022 03:10:18 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2a01:e0a:343:1a00:bda1:e118:e349:7314;
posting-account=5syELgoAAABMLWsjbxhk8Wo7CLxGgTPG
NNTP-Posting-Host: 2a01:e0a:343:1a00:bda1:e118:e349:7314
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4808cb60-c4de-4ba7-9563-9748de664e80n@googlegroups.com>
Subject: DICOM: JPEG + APP2 marker
From: mathieu.malaterre@gmail.com (Mathieu Malaterre)
Injection-Date: Fri, 18 Mar 2022 10:10:19 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 31
 by: Mathieu Malaterre - Fri, 18 Mar 2022 10:10 UTC

Dear all,

[Yet another nitpick]

Current DICOM edition (PS 3.5) states:

[...]
If APP2 marker segments with an identifier of "ICC_PROFILE" (as defined in Annex B of [ISO 15076-1]) are present in the compressed data stream, their concatenated value shall be identical to the value of ICC Profile (0028,2000) Attribute, if present, excluding padding.
[...]

* https://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_8.2..html#para_c82ff006-e1a8-46d4-a5db-0f63db0fd123

So I understand what is expected when receiving a DICOM+JPEG+APP2+ICCProfile attribute. However I fail to understand the case where I receive DICOM+JPEG+APP2 (no ICCProfile attribute).

The standard mandates:

[...]
The Pixel Data characteristics included in the JPEG Interchange Format shall be used to decode the compressed data stream.
[...]

But I believe it is missing:

The JFIF APP2 marker segment is NOT required to be present in DICOM encapsulated JPEG bit streams, and should not be used for the rendering of the image.

Re: DICOM: JPEG + APP2 marker

<8ca17c31-93b5-436c-834b-b2aacfe003e1n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:a05:622a:285:b0:2e1:dcda:98fd with SMTP id z5-20020a05622a028500b002e1dcda98fdmr7221658qtw.625.1647606733019;
Fri, 18 Mar 2022 05:32:13 -0700 (PDT)
X-Received: by 2002:a05:620a:424d:b0:67d:2bad:4450 with SMTP id
w13-20020a05620a424d00b0067d2bad4450mr5670765qko.171.1647606732776; Fri, 18
Mar 2022 05:32:12 -0700 (PDT)
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: Fri, 18 Mar 2022 05:32:12 -0700 (PDT)
In-Reply-To: <4808cb60-c4de-4ba7-9563-9748de664e80n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=50.32.222.172; posting-account=rKkGZwkAAADOuxQ23uuHnmKt95j-5iL6
NNTP-Posting-Host: 50.32.222.172
References: <4808cb60-c4de-4ba7-9563-9748de664e80n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8ca17c31-93b5-436c-834b-b2aacfe003e1n@googlegroups.com>
Subject: Re: DICOM: JPEG + APP2 marker
From: dclunie@dclunie.com (David Clunie)
Injection-Date: Fri, 18 Mar 2022 12:32:13 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 11
 by: David Clunie - Fri, 18 Mar 2022 12:32 UTC

JPEG Interchange Format (all tables present) and JFIF are not the same thing.

ISO 10918-1 - describes the "Interchange Format" - "The representation of compressed image data for exchange between application
environments" - "is a compressed image data representation which includes all table specifications used in the encoding process"

ISO 10918-5 - JPEG File Interchange Format (JFIF)

On Friday, March 18, 2022 at 6:10:20 AM UTC-4, Mathieu Malaterre wrote:
>
> "the JPEG Interchange Format".
> ...
> The "JFIF" APP2 marker segment ...

Re: DICOM: JPEG + APP2 marker

<8fa50b59-d00d-4abd-b860-50332aebe7edn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:ac8:7fc6:0:b0:2e1:ce3e:b491 with SMTP id b6-20020ac87fc6000000b002e1ce3eb491mr7613312qtk.287.1647616003208;
Fri, 18 Mar 2022 08:06:43 -0700 (PDT)
X-Received: by 2002:a05:6214:20ee:b0:440:cc4f:2efa with SMTP id
14-20020a05621420ee00b00440cc4f2efamr7322132qvk.6.1647616002973; Fri, 18 Mar
2022 08:06:42 -0700 (PDT)
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: Fri, 18 Mar 2022 08:06:42 -0700 (PDT)
In-Reply-To: <8ca17c31-93b5-436c-834b-b2aacfe003e1n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a01:e0a:343:1a00:bda1:e118:e349:7314;
posting-account=5syELgoAAABMLWsjbxhk8Wo7CLxGgTPG
NNTP-Posting-Host: 2a01:e0a:343:1a00:bda1:e118:e349:7314
References: <4808cb60-c4de-4ba7-9563-9748de664e80n@googlegroups.com> <8ca17c31-93b5-436c-834b-b2aacfe003e1n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8fa50b59-d00d-4abd-b860-50332aebe7edn@googlegroups.com>
Subject: Re: DICOM: JPEG + APP2 marker
From: mathieu.malaterre@gmail.com (Mathieu Malaterre)
Injection-Date: Fri, 18 Mar 2022 15:06:43 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 31
 by: Mathieu Malaterre - Fri, 18 Mar 2022 15:06 UTC

On Friday, March 18, 2022 at 1:32:14 PM UTC+1, dcl...@dclunie.com wrote:
> JPEG Interchange Format (all tables present) and JFIF are not the same thing.
>
> ISO 10918-1 - describes the "Interchange Format" - "The representation of compressed image data for exchange between application
> environments" - "is a compressed image data representation which includes all table specifications used in the encoding process"
>
> ISO 10918-5 - JPEG File Interchange Format (JFIF)

Thanks !

FYI I've build 4 VL Photographic Image Storage instances from the same image.

Copyright is same as:

https://cloud.githubusercontent.com/assets/1139185/23364727/3da8c474-fcce-11e6-9f39-7e074e78aa33.jpg

img.dcm:
All APPn markers removed (colors muted)

img_app2.dcm
Only APP2 marker in original JPEG kep (no ICCProfile)

img_app2_iccprofile.dcm
Only APP2 marker in original JPEG kep (with exact ICCProfile copied in attribute)

img_jpgicc.dcm
jpgicc was used to apply ICC Profile

See:
http://gdcm.sourceforge.net/icc/icc.tar.gz

Enjoy

Re: DICOM: JPEG + APP2 marker

<7149eb03-05c4-41cf-9ea4-707f4bc4f7f5n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:ae9:e8ce:0:b0:67b:1373:2e6c with SMTP id a197-20020ae9e8ce000000b0067b13732e6cmr6030096qkg.746.1647618289297;
Fri, 18 Mar 2022 08:44:49 -0700 (PDT)
X-Received: by 2002:a05:620a:2889:b0:663:8d24:8cad with SMTP id
j9-20020a05620a288900b006638d248cadmr6319324qkp.662.1647618289023; Fri, 18
Mar 2022 08:44:49 -0700 (PDT)
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: Fri, 18 Mar 2022 08:44:48 -0700 (PDT)
In-Reply-To: <8fa50b59-d00d-4abd-b860-50332aebe7edn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=50.32.222.172; posting-account=rKkGZwkAAADOuxQ23uuHnmKt95j-5iL6
NNTP-Posting-Host: 50.32.222.172
References: <4808cb60-c4de-4ba7-9563-9748de664e80n@googlegroups.com>
<8ca17c31-93b5-436c-834b-b2aacfe003e1n@googlegroups.com> <8fa50b59-d00d-4abd-b860-50332aebe7edn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7149eb03-05c4-41cf-9ea4-707f4bc4f7f5n@googlegroups.com>
Subject: Re: DICOM: JPEG + APP2 marker
From: dclunie@dclunie.com (David Clunie)
Injection-Date: Fri, 18 Mar 2022 15:44:49 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 4
 by: David Clunie - Fri, 18 Mar 2022 15:44 UTC

Thanks for these very useful test files.

One permutation that you don't have is:

All APPn markers removed, ICCProfile in DICOM attribute

Re: DICOM: JPEG + APP2 marker

<07d7b607-f906-4ee7-9f7c-b818d5b08d3fn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:a05:622a:285:b0:2e1:dcda:98fd with SMTP id z5-20020a05622a028500b002e1dcda98fdmr8108786qtw.625.1647621491773;
Fri, 18 Mar 2022 09:38:11 -0700 (PDT)
X-Received: by 2002:ac8:65cf:0:b0:2e1:e78c:85f3 with SMTP id
t15-20020ac865cf000000b002e1e78c85f3mr7892976qto.15.1647621491555; Fri, 18
Mar 2022 09:38:11 -0700 (PDT)
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: Fri, 18 Mar 2022 09:38:11 -0700 (PDT)
In-Reply-To: <7149eb03-05c4-41cf-9ea4-707f4bc4f7f5n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a01:e0a:343:1a00:bda1:e118:e349:7314;
posting-account=5syELgoAAABMLWsjbxhk8Wo7CLxGgTPG
NNTP-Posting-Host: 2a01:e0a:343:1a00:bda1:e118:e349:7314
References: <4808cb60-c4de-4ba7-9563-9748de664e80n@googlegroups.com>
<8ca17c31-93b5-436c-834b-b2aacfe003e1n@googlegroups.com> <8fa50b59-d00d-4abd-b860-50332aebe7edn@googlegroups.com>
<7149eb03-05c4-41cf-9ea4-707f4bc4f7f5n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <07d7b607-f906-4ee7-9f7c-b818d5b08d3fn@googlegroups.com>
Subject: Re: DICOM: JPEG + APP2 marker
From: mathieu.malaterre@gmail.com (Mathieu Malaterre)
Injection-Date: Fri, 18 Mar 2022 16:38:11 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 9
 by: Mathieu Malaterre - Fri, 18 Mar 2022 16:38 UTC

On Friday, March 18, 2022 at 4:44:50 PM UTC+1, dcl...@dclunie.com wrote:
> Thanks for these very useful test files.
>
> One permutation that you don't have is:
>
> All APPn markers removed, ICCProfile in DICOM attribute

Good point !

http://gdcm.sourceforge.net/icc/icc.v2.tar.gz

Re: DICOM: JPEG + APP2 marker

<0baf8723-97fc-40ad-bd62-56d27aa67463n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:ac8:5a88:0:b0:2e1:bbda:3b21 with SMTP id c8-20020ac85a88000000b002e1bbda3b21mr8206697qtc.307.1647624168071;
Fri, 18 Mar 2022 10:22:48 -0700 (PDT)
X-Received: by 2002:ad4:5b8f:0:b0:43f:a7fa:2049 with SMTP id
15-20020ad45b8f000000b0043fa7fa2049mr7897138qvp.18.1647624167910; Fri, 18 Mar
2022 10:22:47 -0700 (PDT)
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: Fri, 18 Mar 2022 10:22:47 -0700 (PDT)
In-Reply-To: <07d7b607-f906-4ee7-9f7c-b818d5b08d3fn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=50.32.222.172; posting-account=rKkGZwkAAADOuxQ23uuHnmKt95j-5iL6
NNTP-Posting-Host: 50.32.222.172
References: <4808cb60-c4de-4ba7-9563-9748de664e80n@googlegroups.com>
<8ca17c31-93b5-436c-834b-b2aacfe003e1n@googlegroups.com> <8fa50b59-d00d-4abd-b860-50332aebe7edn@googlegroups.com>
<7149eb03-05c4-41cf-9ea4-707f4bc4f7f5n@googlegroups.com> <07d7b607-f906-4ee7-9f7c-b818d5b08d3fn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0baf8723-97fc-40ad-bd62-56d27aa67463n@googlegroups.com>
Subject: Re: DICOM: JPEG + APP2 marker
From: dclunie@dclunie.com (David Clunie)
Injection-Date: Fri, 18 Mar 2022 17:22:48 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 6
 by: David Clunie - Fri, 18 Mar 2022 17:22 UTC

I thought that might be a good test - my display code now applies the profile twice!

On Friday, March 18, 2022 at 12:38:13 PM UTC-4, Mathieu Malaterre wrote:
> On Friday, March 18, 2022 at 4:44:50 PM UTC+1, dcl...@dclunie.com wrote:
> > One permutation that you don't have is:
> Good point !
> http://gdcm.sourceforge.net/icc/icc.v2.tar.gz

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor