dcmcjpeg: Unable to change Planar Configuration Error

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
martinrame
Posts: 347
Joined: Mon, 2009-02-23, 19:57

dcmcjpeg: Unable to change Planar Configuration Error

#1 Post by martinrame »

Hi, a new equipment is sending images that I cannot convert to Jpeg Lossless.

With dcmcjpeg I get this error:

Code: Select all

E: True lossless encoder: Unable to change Planar Configuration from 'by plane' to 'by pixel' for encoding
It looks like the equipment is generating "non standard" images. Is there a way to try to fix those images?.

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: dcmcjpeg: Unable to change Planar Configuration Error

#2 Post by Michael Onken »

Hi,

as far as I can see this error is only produced in case of serious problems, e.g. Planar Configuration is not present in the dataset, memory is exhausted or no pixel data is present.

Probably you should check the image with a DICOM validator, e.g. dciodvfy.

BR, Michael

martinrame
Posts: 347
Joined: Mon, 2009-02-23, 19:57

Re: dcmcjpeg: Unable to change Planar Configuration Error

#3 Post by martinrame »

Thanks Michael, this is the result of dciodvfy:

Code: Select all

Error - PixelData has incorrect value length - expected 17020800 dec - got 8510400 dec
Warning - Missing attribute or value that would be needed to build DICOMDIR - Study Time
Warning - Missing attribute or value that would be needed to build DICOMDIR - Study ID
Warning - Missing attribute or value that would be needed to build DICOMDIR - Series Number
Warning - Missing attribute or value that would be needed to build DICOMDIR - Instance Number
Error - Value invalid for this VR - (0x0018,0x1151) IS X-Ray Tube Current  IS [1] = <10.0> - Character invalid for this VR = '.' (0x2e)
Error - Dicom dataset contains invalid data values for Value Representations
DXImageForPresentation
Error - Missing attribute Type 2 Required Element=<StudyTime> Module=<GeneralStudy>
Error - Missing attribute Type 2 Required Element=<SeriesNumber> Module=<GeneralSeries>
Error - Missing attribute Type 2C Conditional Element=<Laterality> Module=<GeneralSeries>
Error - Missing attribute Type 2 Required Element=<InstanceNumber> Module=<GeneralImage>
Error - Missing attribute Type 2C Conditional Element=<PatientOrientation> Module=<GeneralImage>
Error - Missing attribute Type 2C Conditional Element=<AnatomicRegionSequence> Module=<GeneralImage>
Error - Unrecognized enumerated value <0x2> for value 1 of attribute <Samples per Pixel>
Error - Missing attribute Type 1 Required Element=<ImageLaterality> Module=<DXAnatomyImaged>
Error - Missing attribute Type 2 Required Element=<AnatomicRegionSequence> Module=<GeneralAnatomyRequiredMacro>
Error - Unrecognized enumerated value <0x2> for value 1 of attribute <Samples per Pixel>
Error - Missing attribute Type 1 Required Element=<PixelIntensityRelationship> Module=<DXImage>
Error - Missing attribute Type 1 Required Element=<PixelIntensityRelationshipSign> Module=<DXImage>
Error - Missing attribute Type 1 Required Element=<RescaleIntercept> Module=<DXImage>
Error - Missing attribute Type 1 Required Element=<RescaleSlope> Module=<DXImage>
Error - Missing attribute Type 1 Required Element=<RescaleType> Module=<DXImage>
Error - Missing attribute Type 1 Required Element=<PresentationLUTShape> Module=<DXImage>
Error - Missing attribute Type 1 Required Element=<LossyImageCompression> Module=<DXImage>
Error - Missing attribute Type 1C Conditional Element=<PatientOrientation> Module=<DXImage>
Error - Missing attribute Type 1 Required Element=<BurnedInAnnotation> Module=<DXImage>
Error - Missing attribute Type 1C Conditional Element=<VOILUTSequence> Module=<DXImage>
Error - Missing attribute Type 1C Conditional Element=<WindowCenter> Module=<DXImage>
Error - Missing attribute Type 2 Required Element=<DetectorType> Module=<DigitalXRayDetectorMacro>
Error - Missing attribute Type 1 Required Element=<ImagerPixelSpacing> Module=<DXDetector>
Warning - Value is zero for value 1 of attribute <KVP>
Warning - Value is zero for value 1 of attribute <KVP>
Error - Missing attribute Type 2 Required Element=<AcquisitionContextSequence> Module=<AcquisitionContext>
Warning - Attribute is not present in standard DICOM IOD - (0x0032,0x1032) PN Requesting Physician
Warning - Attribute is not present in standard DICOM IOD - (0x2100,0x0040) DA Creation Date
Warning - Dicom dataset contains attributes not present in standard DICOM IOD - this is a Standard Extended SOP Class
This is the dicom header:

Code: Select all

# Dicom-Meta-Information-Header                                                                                                                                    [14/1928]
# Used TransferSyntax: Little Endian Explicit                                                                                                                               
(0002,0000) UL 214                                      #   4, 1 FileMetaInformationGroupLength
(0002,0001) OB 00\01                                    #   2, 1 FileMetaInformationVersion
(0002,0002) UI =DigitalXRayImageStorageForPresentation  #  28, 1 MediaStorageSOPClassUID  
(0002,0003) UI [1.2.826.0.1.3680043.10.516.2023328.194439220.2020.1] #  52, 1 MediaStorageSOPInstanceUID
(0002,0010) UI =BigEndianExplicit                       #  20, 1 TransferSyntaxUID
(0002,0012) UI [1.2.276.0.7230010.3.0.3.6.2]            #  28, 1 ImplementationClassUID
(0002,0013) SH [OFFIS_DCMTK_362]                        #  16, 1 ImplementationVersionName
(0002,0016) AE [STORESCU]                               #   8, 1 SourceApplicationEntityTitle
                                                                                      
# Dicom-Data-Set                                                                      
# Used TransferSyntax: Big Endian Explicit                                            
(0008,0005) CS [ISO_IR 100]                             #  10, 1 SpecificCharacterSet
(0008,0008) CS [DERIVED\PRIMARY]                        #  16, 2 ImageType                                                                                                  
(0008,0012) DA [20230608]                               #   8, 1 InstanceCreationDate
(0008,0016) UI =DigitalXRayImageStorageForPresentation  #  28, 1 SOPClassUID
(0008,0018) UI [1.2.826.0.1.3680043.10.516.2023328.194439220.2020.1] #  52, 1 SOPInstanceUID
(0008,0020) DA [20230428]                               #   8, 1 StudyDate
(0008,0021) DA [20230428]                               #   8, 1 SeriesDate
(0008,0022) DA [20230428]                               #   8, 1 AcquisitionDate
(0008,0023) DA [20230428]                               #   8, 1 ContentDate
(0008,0050) SH (no value available)                     #   0, 0 AccessionNumber
(0008,0060) CS [PX]                                     #   2, 1 Modality
(0008,0068) CS [FOR PRESENTATION]                       #  16, 1 PresentationIntentType
(0008,0070) LO [DABI ATLANTE]                           #  12, 1 Manufacturer
(0008,0090) PN (no value available)                     #   0, 0 ReferringPhysicianName
(0008,1030) LO (no value available)                     #   0, 0 StudyDescription
(0010,0010) PN [Rey^Elvio]                              #  10, 1 PatientName
(0010,0020) LO [17734486]                               #   8, 1 PatientID
(0010,0030) DA [19660223]                               #   8, 1 PatientBirthDate
(0010,0040) CS [M]                                      #   2, 1 PatientSex
(0018,0060) DS [0.0]                                    #   4, 1 KVP
(0018,1020) LO [EAGLE EYE 1.0.0.0]                      #  18, 1 SoftwareVersions
(0018,1151) IS [10.0]                                   #   4, 1 XRayTubeCurrent
(0018,1151) IS [10.0]                                   #   4, 1 XRayTubeCurrent
(0020,000d) UI [1.2.826.0.1.3680043.10.516.2023328.194439220.2020.40.1] #  54, 1 StudyInstanceUID
(0020,000e) UI [1.2.826.0.1.3680043.10.516.2023328.194439220.2020] #  50, 1 SeriesInstanceUID
(0020,0010) LO (no value available)                     #   0, 0 StudyID
(0028,0002) US 2                                        #   2, 1 SamplesPerPixel
(0028,0004) CS [MONOCHROME2]                            #  12, 1 PhotometricInterpretation
(0028,0006) US 0                                        #   2, 1 PlanarConfiguration
(0028,0010) US 1440                                     #   2, 1 Rows
(0028,0011) US 2955                                     #   2, 1 Columns
(0028,0100) US 16                                       #   2, 1 BitsAllocated
(0028,0101) US 16                                       #   2, 1 BitsStored
(0028,0102) US 15                                       #   2, 1 HighBit
(0028,0103) US 0                                        #   2, 1 PixelRepresentation
(0032,1032) PN (no value available)                     #   0, 0 RequestingPhysician
(2100,0040) DA [20230428]                               #   8, 1 CreationDate
(7fe0,0010) OW d2b8\cb01\c178\c1b1\b7f1\b67c\c725\cab5\c663\ca80\bdad\c353\9532... # 8510400, 1 PixelData

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: dcmcjpeg: Unable to change Planar Configuration Error

#4 Post by Michael Onken »

After a first look, I would remove Samples Per Pixel from the dataset, the value 2 is never used in any color model. Probably the machine "means" 1 (one color=grayscale channel) instead. Just remove Samples Per Pixel, e.g. by calling

Code: Select all

dcmodify -e SamplesPerPixel <input_file>
Just curious: There are many errors in the dataset, and it's in Big Endian, is this an old machine?

martinrame
Posts: 347
Joined: Mon, 2009-02-23, 19:57

Re: dcmcjpeg: Unable to change Planar Configuration Error

#5 Post by martinrame »

Thanks, I removed SamplesPerPixel, but the viewer (Weasis) is still rejecting the image.

The equipment is new, but it uses a software to convert images to Dicom that maybe is old. I'm trying to contact the manufacturer, without too much expectations...

martinrame
Posts: 347
Joined: Mon, 2009-02-23, 19:57

Re: dcmcjpeg: Unable to change Planar Configuration Error

#6 Post by martinrame »

BTW, dcmj2pnm is able to convert the image to jpg and I can view it correctly.

Hopefully I could modify the source file until I can display it in Weasis or Cornerstone.

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: dcmcjpeg: Unable to change Planar Configuration Error

#7 Post by Michael Onken »

Mh, this is trial and error then. Invent values for Rescale Slope (1) and Intercept (0), if it does not help then maybe values for Window Center and Window Width, ... i.e. try fixing pixel related attributes that are reported by dciodvfy. Also, if dcmj2pnm prints warnings, fix those problems first.

Maybe Weasis does not support Big Endian? (dcmconv +te <input-file> <output-file> would convert to Little Endian Explicit).

martinrame
Posts: 347
Joined: Mon, 2009-02-23, 19:57

Re: dcmcjpeg: Unable to change Planar Configuration Error

#8 Post by martinrame »

Fixed by adding SamplesPerPixel=1.

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: dcmcjpeg: Unable to change Planar Configuration Error

#9 Post by Michael Onken »

Ah, of course, my mistake, of course Planar Configuration is not permitted if Samples Per Pixel = 1 but Samples per Pixel is required anyway :) Sry

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Amazon [Bot], Bing [Bot], Google [Bot] and 1 guest