unable to read a file

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
George
Posts: 52
Joined: Sun, 2023-11-12, 16:50

unable to read a file

#1 Post by George »

Hello,

I have a list of files that are YBCR and JPEG2000 but gdcmconv and dcmtk tool are unable to read it.
This is the link to the file:
https://drive.google.com/file/d/1Wjqsng ... drive_link
This is the code I tried to run:

Code: Select all

$ gdcmconv -V -w -i Anonymous.MR._.15.1.2017.06.28.09.41.02.294.59320538.dcm -o fixed.dcm
Could not read (pixmap): Anonymous.MR._.15.1.2017.06.28.09.41.02.294.59320538.dcm
Also, I tried using the normal dicomImage constructor and it failed compilaining about photometric interpretations.

let me know what you can do to fix that problem.

Best Regards
George

J. Riesmeier
DCMTK Developer
Posts: 2506
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: unable to read a file

#2 Post by J. Riesmeier »

Short answer: The public and freely available DCMTK does not support decompression of JPEG 2000-compressed DICOM images unless you use an extension such as DCMJP2K.

George
Posts: 52
Joined: Sun, 2023-11-12, 16:50

Re: unable to read a file

#3 Post by George »

I apologize, please take a look at this file
https://drive.google.com/file/d/1I_smfo ... sp=sharing

J. Riesmeier
DCMTK Developer
Posts: 2506
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: unable to read a file

#4 Post by J. Riesmeier »

The second file is not an image:

Code: Select all

> dcmdump +P SOPClassUID Anonymous.MR._.15.1.2017.06.28.09.41.02.294.59320538.dcm 
(0008,0016) UI =MRSpectroscopyStorage                   #  28, 1 SOPClassUID

George
Posts: 52
Joined: Sun, 2023-11-12, 16:50

Re: unable to read a file

#5 Post by George »

Hello,

I also wish to examine how to convert the SOP class:

Code: Select all

$ dcmdump +P SOPClassUID ./fix/fixed.dcm
(0008,0016) UI =VLWholeSlideMicroscopyImageStorage      #  30, 1 SOPClassUID
$ gdcmtar -i ./fix/ -o op1.dcm
Sorry MediaStorage not supported: [1.2.840.10008.5.1.4.1.1.77.1.6]
I noticed that gdcmtar do have the support that I need but it fails due to SOP class, so how can I use dcmtk to convert it.

Code: Select all

gdcminfo fix/fixed.dcm
MediaStorage is 1.2.840.10008.5.1.4.1.1.77.1.6 [VL Whole Slide Microscopy Image Storage]
TransferSyntax is 1.2.840.10008.1.2.1 [Explicit VR Little Endian]
NumberOfDimensions: 3
Dimensions: (512,512,2)
SamplesPerPixel    :3
BitsAllocated      :8
BitsStored         :8
HighBit            :7
PixelRepresentation:0
ScalarType found   :UINT8
PhotometricInterpretation: RGB
PlanarConfiguration: 0
TransferSyntax: 1.2.840.10008.1.2.1
Origin: (0,0,0)
Spacing: (1,1,1)
DirectionCosines: (1,0,0,0,1,0)
Rescale Intercept/Slope: (0,1)
Orientation Label: AXIAL
Best Regards
George

J. Riesmeier
DCMTK Developer
Posts: 2506
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: unable to read a file

#6 Post by J. Riesmeier »

I am sorry, but I still don't know what you want to do and what you mean by "how to convert the SOP class". In order to help you, you should describe your problem in more detail, i.e. what do you want to achieve, what have you tried, what does not work, etc.

George
Posts: 52
Joined: Sun, 2023-11-12, 16:50

Re: unable to read a file

#7 Post by George »

Hello,

I humbly request to learn how to convert this tag in dicom (0008,0016) to another using dcmtk.

The SOP Class UID and SOP Instance UID Attributes are defined for all DICOM IODs. However, they are only encoded in Composite IODs with the Type equal to 1. See Section C.1.2.3. When encoded they shall be equal to their respective Attributes in the DIMSE Services and the File Meta Information header (see PS3.10 Media Storage).

Best Regards
George
Last edited by George on Thu, 2024-02-22, 10:05, edited 1 time in total.

J. Riesmeier
DCMTK Developer
Posts: 2506
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: unable to read a file

#8 Post by J. Riesmeier »

I am sorry, but this very short explanation does not help (and it also makes no sense to me to "convert this tag in dicom"). Please describe in detail what you want to achieve. Otherwise no one will be able to help you in this regard.

George
Posts: 52
Joined: Sun, 2023-11-12, 16:50

Re: unable to read a file

#9 Post by George »

Hello,

I am trying to run gdcmtar but it keeps failing with this error Sorry MediaStorage not supported: [1.2.840.10008.5.1.4.1.1.77.1.6]
This means that the media is not supported in here becuase the tag of SOP Class in dicom (0008,0016) is not supported so how do I convert
this tag to another that can be supported so I might be able to extract multiframe dicom images to single frame dicoms

Best Regards
George

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 1 guest