Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

If I have not seen so far it is because I stood in giant's footsteps.


devel / comp.protocols.dicom / Find the end of part10 file to extract from ISO

SubjectAuthor
* Find the end of part10 file to extract from ISOtomas moberg
`* Re: Find the end of part10 file to extract from ISODavid Gobbi
 `* Re: Find the end of part10 file to extract from ISOtomas moberg
  `* Re: Find the end of part10 file to extract from ISOJim Irrer
   `- Re: Find the end of part10 file to extract from ISOtomas moberg

1
Find the end of part10 file to extract from ISO

<491be11b-d821-4714-8576-7f7f503abcban@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:a05:620a:149c:b0:74d:f172:1a45 with SMTP id w28-20020a05620a149c00b0074df1721a45mr718483qkj.7.1682067832716;
Fri, 21 Apr 2023 02:03:52 -0700 (PDT)
X-Received: by 2002:a05:620a:128f:b0:74c:4349:8ceb with SMTP id
w15-20020a05620a128f00b0074c43498cebmr882223qki.14.1682067832403; Fri, 21 Apr
2023 02:03:52 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.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, 21 Apr 2023 02:03:52 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=176.10.137.217; posting-account=uMazCAkAAADvP0kbE7qdnbazs_TCaHv4
NNTP-Posting-Host: 176.10.137.217
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <491be11b-d821-4714-8576-7f7f503abcban@googlegroups.com>
Subject: Find the end of part10 file to extract from ISO
From: rullbandspelare@gmail.com (tomas moberg)
Injection-Date: Fri, 21 Apr 2023 09:03:52 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1416
 by: tomas moberg - Fri, 21 Apr 2023 09:03 UTC

Hi!
I have a corrupt ISO file that contains Dicom files and other things.

How can i determine the end of each dicom file within that ISO file?

First I look for "DICM" - 128 to be the start position.
But how can i determine the length of that file?

Today I just take the end as the next DICM-128 characters as the end position
Wich gives me a lot of garbage at the end of each file.

/Tomas

Re: Find the end of part10 file to extract from ISO

<672f9929-c990-4bbc-a391-5ee89f93aa32n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:ac8:5715:0:b0:3ec:8ffc:e232 with SMTP id 21-20020ac85715000000b003ec8ffce232mr1872507qtw.7.1682101960439;
Fri, 21 Apr 2023 11:32:40 -0700 (PDT)
X-Received: by 2002:a05:622a:1007:b0:3ef:3395:de6a with SMTP id
d7-20020a05622a100700b003ef3395de6amr2007674qte.6.1682101960272; Fri, 21 Apr
2023 11:32:40 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.protocols.dicom
Date: Fri, 21 Apr 2023 11:32:39 -0700 (PDT)
In-Reply-To: <491be11b-d821-4714-8576-7f7f503abcban@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: <491be11b-d821-4714-8576-7f7f503abcban@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <672f9929-c990-4bbc-a391-5ee89f93aa32n@googlegroups.com>
Subject: Re: Find the end of part10 file to extract from ISO
From: david.gobbi@gmail.com (David Gobbi)
Injection-Date: Fri, 21 Apr 2023 18:32:40 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: David Gobbi - Fri, 21 Apr 2023 18:32 UTC

There is no field in a DICOM Part 10 file that indicates the length of the file, nor any end-of-file marker. So the best method might be to parse the file until you reach an invalid data element, and truncate the file at that point. This might require a custom parser, I'm not aware of any DICOM parsers that have an option to do this automatically.

If all the DICOM files contain pixel data, then you could possibly search for the PixelData tag, get its length (or parse the fragments if it's compressed), and then truncate at the end of the element. It's usually (but not always) the last element of the file. You would have to be very careful with this approach, because PixelData also appears in the IconImageSequence, not just in the root.

The ideal, though, is if you could find a CD recovery tool that can do most of the work at the filesystem level. I've had good luck with GNU ddrescue..

Re: Find the end of part10 file to extract from ISO

<dc9480ce-01a2-4e15-b69d-baa792bdb18en@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:a05:620a:152f:b0:74c:f9b2:47bc with SMTP id n15-20020a05620a152f00b0074cf9b247bcmr995090qkk.1.1682104098319;
Fri, 21 Apr 2023 12:08:18 -0700 (PDT)
X-Received: by 2002:a05:622a:1c4:b0:3ef:499a:dd97 with SMTP id
t4-20020a05622a01c400b003ef499add97mr1865235qtw.3.1682104098019; Fri, 21 Apr
2023 12:08:18 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.protocols.dicom
Date: Fri, 21 Apr 2023 12:08:17 -0700 (PDT)
In-Reply-To: <672f9929-c990-4bbc-a391-5ee89f93aa32n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=176.10.137.217; posting-account=uMazCAkAAADvP0kbE7qdnbazs_TCaHv4
NNTP-Posting-Host: 176.10.137.217
References: <491be11b-d821-4714-8576-7f7f503abcban@googlegroups.com> <672f9929-c990-4bbc-a391-5ee89f93aa32n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <dc9480ce-01a2-4e15-b69d-baa792bdb18en@googlegroups.com>
Subject: Re: Find the end of part10 file to extract from ISO
From: rullbandspelare@gmail.com (tomas moberg)
Injection-Date: Fri, 21 Apr 2023 19:08:18 +0000
Content-Type: text/plain; charset="UTF-8"
 by: tomas moberg - Fri, 21 Apr 2023 19:08 UTC

Excellent answer!
A lot of Structured Report objects also so it is a bit tricky.
Thanks for the ddrescue info. I tried that one. But still broken. Think it is beyond repair.

Re: Find the end of part10 file to extract from ISO

<1808e262-12f0-47a1-b7c2-f365fbdf911fn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:ac8:5a84:0:b0:3e3:9275:17b4 with SMTP id c4-20020ac85a84000000b003e3927517b4mr2444433qtc.10.1682173678679;
Sat, 22 Apr 2023 07:27:58 -0700 (PDT)
X-Received: by 2002:a05:622a:1744:b0:3ef:57f8:8471 with SMTP id
l4-20020a05622a174400b003ef57f88471mr2470426qtk.3.1682173678467; Sat, 22 Apr
2023 07:27:58 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.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: Sat, 22 Apr 2023 07:27:58 -0700 (PDT)
In-Reply-To: <dc9480ce-01a2-4e15-b69d-baa792bdb18en@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=141.214.125.209; posting-account=Xrp7ygoAAAANK09okVApPRadJPdMPiz2
NNTP-Posting-Host: 141.214.125.209
References: <491be11b-d821-4714-8576-7f7f503abcban@googlegroups.com>
<672f9929-c990-4bbc-a391-5ee89f93aa32n@googlegroups.com> <dc9480ce-01a2-4e15-b69d-baa792bdb18en@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1808e262-12f0-47a1-b7c2-f365fbdf911fn@googlegroups.com>
Subject: Re: Find the end of part10 file to extract from ISO
From: jimirrer@gmail.com (Jim Irrer)
Injection-Date: Sat, 22 Apr 2023 14:27:58 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2247
 by: Jim Irrer - Sat, 22 Apr 2023 14:27 UTC

Tomas -

There is a utility called DICOM+ that can recover damaged DICOM files.
- Download the pre-built package here: https://github.com/irrer/DICOMClient#user-content-dicom-for
- Unzip and run the DICOM+.bat file.
- Drag and drop DICOM files(s) and folders into it.
- Click the Preview button
- Click the Text radio button
- Click Edit
- Click Save+Close

This will make a copy of the DICOM, recovering as much of each file as possible. When it reads
DICOM files it goes until it reaches a corrupted portion. When it saves files it fixes the internal formatting
so that other utilities can read them.

Good luck!

- Jim

On Friday, April 21, 2023 at 3:08:19 PM UTC-4, tomas moberg wrote:
> Excellent answer!
> A lot of Structured Report objects also so it is a bit tricky.
> Thanks for the ddrescue info. I tried that one. But still broken. Think it is beyond repair.

Re: Find the end of part10 file to extract from ISO

<af6ef972-3a5f-4169-833c-2173133fcbfan@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:a05:622a:1a90:b0:3d5:bb6:9240 with SMTP id s16-20020a05622a1a9000b003d50bb69240mr2719155qtc.4.1682182639303;
Sat, 22 Apr 2023 09:57:19 -0700 (PDT)
X-Received: by 2002:a05:620a:152f:b0:74c:f9b2:47bc with SMTP id
n15-20020a05620a152f00b0074cf9b247bcmr1374855qkk.1.1682182639007; Sat, 22 Apr
2023 09:57:19 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.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: Sat, 22 Apr 2023 09:57:18 -0700 (PDT)
In-Reply-To: <1808e262-12f0-47a1-b7c2-f365fbdf911fn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=176.10.137.217; posting-account=uMazCAkAAADvP0kbE7qdnbazs_TCaHv4
NNTP-Posting-Host: 176.10.137.217
References: <491be11b-d821-4714-8576-7f7f503abcban@googlegroups.com>
<672f9929-c990-4bbc-a391-5ee89f93aa32n@googlegroups.com> <dc9480ce-01a2-4e15-b69d-baa792bdb18en@googlegroups.com>
<1808e262-12f0-47a1-b7c2-f365fbdf911fn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <af6ef972-3a5f-4169-833c-2173133fcbfan@googlegroups.com>
Subject: Re: Find the end of part10 file to extract from ISO
From: rullbandspelare@gmail.com (tomas moberg)
Injection-Date: Sat, 22 Apr 2023 16:57:19 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2496
 by: tomas moberg - Sat, 22 Apr 2023 16:57 UTC

lördag 22 april 2023 kl. 16:28:00 UTC+2 skrev Jim Irrer:

Realy cool tool.
Good to have.

> Tomas -
>
> There is a utility called DICOM+ that can recover damaged DICOM files.
> - Download the pre-built package here: https://github.com/irrer/DICOMClient#user-content-dicom-for
> - Unzip and run the DICOM+.bat file.
> - Drag and drop DICOM files(s) and folders into it.
> - Click the Preview button
> - Click the Text radio button
> - Click Edit
> - Click Save+Close
>
> This will make a copy of the DICOM, recovering as much of each file as possible. When it reads
> DICOM files it goes until it reaches a corrupted portion. When it saves files it fixes the internal formatting
> so that other utilities can read them.
>
> Good luck!
>
> - Jim
> On Friday, April 21, 2023 at 3:08:19 PM UTC-4, tomas moberg wrote:
> > Excellent answer!
> > A lot of Structured Report objects also so it is a bit tricky.
> > Thanks for the ddrescue info. I tried that one. But still broken. Think it is beyond repair.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor