Dicom RGB file not received correctly by the PacsOne server

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Masato
Posts: 31
Joined: Fri, 2009-03-13, 01:41
Location: United States

Dicom RGB file not received correctly by the PacsOne server

#1 Post by Masato »

Hello,

I used DCMTK's "storescu" to send the DICOM RGB file to the PacsOne server. When command line debug messages are analyzed, the files are successfully sent to the server. But the file is not stored by the server. However, the same dicom file once loaded and saved by KPACS workstation when sent using the same options, the file is correctly received and stored by the server. I guess that some of the DICOM attributes are missing or not compatible in the first case. What could be the problem ?

Following are the files that I used to sent to the PacsOne server using "storescu":
1. HipRgb.dcm
2. HipRgb-KPACS.dcm

Here,
No1 file is successfully sent but not stored in the server's database.
No2 file is successfully sent and stored in the server's database.

I compared these two files and made the attributes of No1 file as much similar as No2, but I could not solve the problem.

Note :
The PacsOne server I am using is trial version: PacsOne server Premium edition

Thank you,
Best regards

Bellow are the contents of dcm file for these two cases :

1. HipRgb.dcm
0002,0000,File Meta Elements Group Len=196
0002,0001,File Meta Info Version=256
0002,0002,Media Storage SOP Class UID=1.2.840.10008.5.1.4.1.1.7.
0002,0003,Media Storage SOP Inst UID=1.2.276.0.7230010.3.1.4.683318384.4012.1246437517.1.
0002,0010,Transfer Syntax UID=1.2.840.10008.1.2.1.
0002,0012,Implementation Class UID=1.2.276.0.7230010.3.0.3.5.4.
0002,0013,Implementation Version Name=OFFIS.DCMTK.354
0008,0000,Identifying Group Length=400
0008,0005,Specific Character Set=ISO.IR 100
0008,0008,Image Type=OTHER
0008,0012,Instance Creation Date=20090701
0008,0013,Instance Creation Time=121045.000000
0008,0016,SOP Class UID=1.2.840.10008.5.1.4.1.1.7.
0008,0018,SOP Instance UID=1.2.276.0.7230010.3.1.4.683318384.4012.1246437517.1.
0008,0020,Study Date=20090701
0008,0021,Series Date=20090701
0008,0030,Study Time=121045.000000
0008,0031,Series Time=121045.000000
0008,0032,Acquisition Time=121045.000000
0008,0033,Image Time=121045.000000
0008,0050,Accession Number=
0008,0060,Modality=OT
0008,0064,Conversion Type=WSD
0008,0070,Manufacturer=
0008,0080,Institution Name=1953719636
0008,0090,Referring Physician's Name=
0008,1030,Study Description=Secondary capture
0008,103E,Series Description=
0008,1050,Performing Physician's Name=
0008,1070,Operator's Name=
0008,1090,Manufacturer's Model Name=
0010,0000,Patient Group Length=76
0010,0010,Patient's Name=TestRGB
0010,0020,Patient ID=ID-TestRGB
0010,0030,Patient Date of Birth=20050216
0010,0040,Patient Sex=Unknown
0010,1010,Patient Age=0
0018,0000,Acquisition Group Length=46
0018,0015,Body Part Examined=
0018,0050,Slice Thickness=2
0018,1100,Reconstruction Diameter=8240
0018,1120,Gantry/Detector Tilt=8240
0018,1210,Convolution Kernel=
0020,0000,Relationship Group Length=198
0020,000D,Study Instance UID=1.2.276.0.7230010.3.1.4.683318384.4012.1246437517.2.
0020,000E,Series Instance UID=1.2.276.0.7230010.3.1.4.683318384.4012.1246437517.3.
0020,0010,Study ID=1
0020,0011,Series Number=1
0020,0013,Image Number=1
0020,0020,Patient Orientation=
0020,0032,Image Position Patient=
0020,0037,Image Orientation (Patient)=1.0\0.0\0.0\0.0\1.0\0.0
0028,0000,Image Presentation Group Length=150
0028,0002,Samples Per Pixel=3
0028,0004,Photometric Interpretation=RGB
0028,0006,Planar Configuration=0
0028,0010,Rows=512
0028,0011,Columns=512
0028,0030,Pixel Spacing=0.46 0.46
0028,0100,Bits Allocated=8
0028,0101,Bits Stored=8
0028,0102,High Bit=7
0028,0103,Pixel Representation=1
0028,1050,Window Center=975
0028,1051,Window Width=4000
0028,1052,Rescale Intercept=
0028,1053,Rescale Slope=
7FE0,0000,Pixel Data Group Length=786444
7FE0,0010,Pixel Data=786432
2. HipRgb-KPACS.dcm
0002,0000,File Meta Elements Group Len=190
0002,0001,File Meta Info Version=1
0002,0002,Media Storage SOP Class UID=1.2.840.10008.5.1.4.1.1.7.
0002,0003,Media Storage SOP Inst UID=1.2.826.0.1.3680043.2.1208.348705251200971174224734.
0002,0010,Transfer Syntax UID=1.2.840.10008.1.2.1.
0002,0012,Implementation Class UID=1.2.826.0.1.3680043.2.1208.1.1
0002,0013,Implementation Version Name=iQ-View.
0008,0000,Identifying Group Length=408
0008,0005,Specific Character Set=ISO.IR 100
0008,0008,Image Type=OTHER
0008,0012,Instance Creation Date=20090701
0008,0013,Instance Creation Time=174224.000000.
0008,0016,SOP Class UID=1.2.840.10008.5.1.4.1.1.7.
0008,0018,SOP Instance UID=1.2.826.0.1.3680043.2.1208.348705251200971174224734.
0008,0020,Study Date=20090701
0008,0021,Series Date=20090701
0008,0030,Study Time=174224.000000.
0008,0031,Series Time=174224.000000.
0008,0032,Acquisition Time=174224.000000.
0008,0033,Image Time=174224.000000.
0008,0050,Accession Number=
0008,0060,Modality=OT
0008,0064,Conversion Type=WSD.
0008,0070,Manufacturer=5458249
0008,0080,Institution Name=
0008,0090,Referring Physician's Name=
0008,1030,Study Description=secondary capture.
0008,103E,Series Description=
0008,1050,Performing Physician's Name=
0008,1070,Operator's Name=
0010,0000,Patient Group Length=70
0010,0010,Patient's Name=TestRGB-KPACS.
0010,0020,Patient ID=ID-TestRGB-KPACS
0010,0030,Patient Date of Birth=20050226
0010,0040,Patient Sex=
0018,0000,Acquisition Group Length=8
0018,0015,Body Part Examined=
0020,0000,Relationship Group Length=162
0020,000D,Study Instance UID=1.2.826.0.1.3680043.2.1208.148705251200971174224718.
0020,000E,Series Instance UID=1.2.826.0.1.3680043.2.1208.248705251200971174224734.
0020,0010,Study ID=1.
0020,0011,Series Number=1
0020,0013,Image Number=1
0020,0020,Patient Orientation=
0028,0000,Image Presentation Group Length=164
0028,0002,Samples Per Pixel=3
0028,0004,Photometric Interpretation=RGB
0028,0006,Planar Configuration=0
0028,0008,Number of Frames=1
0028,0010,Rows=512
0028,0011,Columns=512
0028,0030,Pixel Spacing=0.46 0.46
0028,0100,Bits Allocated=8
0028,0101,Bits Stored=8
0028,0102,High Bit=7
0028,0103,Pixel Representation=1
0028,1050,Window Center=89
0028,1051,Window Width=98
0028,1052,Rescale Intercept=0.00
0028,1053,Rescale Slope=1.00
7FE0,0000,Pixel Data Group Length=786444
7FE0,0010,Pixel Data=786432

Yves Neumann
Posts: 30
Joined: Fri, 2005-12-02, 17:06
Location: Germany

#2 Post by Yves Neumann »

Would be interesting what PacsOne is logging when the image sent by storescu is not stored correctly. PacsOne creates the log under {PacsOne_install_dir}\log\{AETitle}.

Beside the window width and center values in HipRgb.dcm I see nothing strange in the dumps. Nevertheless, those values should not harm the storage in PacsOne anyway.

Masato
Posts: 31
Joined: Fri, 2009-03-13, 01:41
Location: United States

#3 Post by Masato »

Hello,

Thanks for the response.

But its still not working !! I have checked the log files created by the PacsOne server while sending the files to it.

The error seems to be in parsing the Dicom file data elements. I have attached the log files for both the cases.

While sending "HipRgb.dcm"
Thu Jul 02 09:32:01 2009 INFO - Server Process [1712] Initialized as AE Title: [PacsOneAE]
Thu Jul 02 09:32:01 2009 INFO - Server Socket: 160 created successfully
Thu Jul 02 09:32:01 2009 INFO - Socket: 160 bind to Port: 4000
Thu Jul 02 09:32:01 2009 INFO - Worker Thread: 1836 running
Thu Jul 02 09:32:01 2009 INFO - Worker Thread: 1844 running
Thu Jul 02 09:32:07 2009 ERROR - Exception error connecting to MySQL!
Thu Jul 02 09:32:08 2009 ERROR - Exception error connecting to MySQL!
............................................................................................
............................................................................................
............................................................................................

Thu Jul 02 09:47:13 2009 INFO - MySQL: Connected to database [PacsOne]
Thu Jul 02 09:52:40 2009 INFO - Session: <1> started from SCU: 192.168.0.4
Thu Jul 02 09:52:40 2009 INFO - <1> Receiving A-ASSOCIATE-RQ PDU
Thu Jul 02 09:52:40 2009 INFO - 1 record found in [applentity] table
Thu Jul 02 09:52:40 2009 INFO - <1> A-ASSOCIATE-RQ received successfully
Thu Jul 02 09:52:40 2009 INFO - <1> Sending A-ASSOCIATE-AC PDU
Thu Jul 02 09:52:40 2009 INFO - <1> A-ASSOCIATE-AC PDU sent successfully
Thu Jul 02 09:52:40 2009 INFO - <1> Receiving P-DATA-TF PDU
Thu Jul 02 09:52:41 2009 INFO - <1> C-STORE [197] command received in P-DATA-TF PDU
Thu Jul 02 09:52:41 2009 ERROR - Fatal error while processing data element near Tag: <0x00101010>
Thu Jul 02 09:52:41 2009 ERROR - 10 00 10 10 41 53 02 00 30 20 18 00 00 00 55 4c 04 00 2e 00 00 00 18 00 15 00 43 53 00 00 18 00 50 00 44 53 02 00 32 20 18 00 00 11 44 53 02 00 30 20 18 00 20 11 44 53 02 00 30 20 18 00 10 12
Thu Jul 02 09:52:41 2009 INFO - 29 tags processed in CDataSetPdv
Thu Jul 02 09:52:41 2009 INFO - <1> A-ASSOCIATE-RELEASE-RQ PDU received
Thu Jul 02 09:52:41 2009 INFO - <1> Sending A-ASSOCIATE-RELEASE-RSP PDU
Thu Jul 02 09:52:41 2009 INFO - <1> A-ASSOCIATE-RELEASE-RSP PDU sent successfully
Thu Jul 02 09:52:41 2009 INFO - Session: <1> disconnected for client: 192.168.0.4
While sending "HipRgb-KPACS.dcm"
Thu Jul 02 10:58:09 2009 INFO - Session: <5> started from SCU: 192.168.0.4
Thu Jul 02 10:58:09 2009 INFO - <5> Receiving A-ASSOCIATE-RQ PDU
Thu Jul 02 10:58:09 2009 INFO - 1 record found in [applentity] table
Thu Jul 02 10:58:09 2009 INFO - <5> A-ASSOCIATE-RQ received successfully
Thu Jul 02 10:58:09 2009 INFO - <5> Sending A-ASSOCIATE-AC PDU
Thu Jul 02 10:58:09 2009 INFO - <5> A-ASSOCIATE-AC PDU sent successfully
Thu Jul 02 10:58:09 2009 INFO - <5> Receiving P-DATA-TF PDU
Thu Jul 02 10:58:09 2009 INFO - <5> C-STORE [197] command received in P-DATA-TF PDU
Thu Jul 02 10:58:09 2009 WARNING - Tag: 0x00080008 length [22] will be truncated to maximum of [16]
Thu Jul 02 10:58:09 2009 INFO - 54 tags processed in CDataSetPdv
Thu Jul 02 10:58:09 2009 INFO - <5> A-ASSOCIATE-RELEASE-RQ PDU received
Thu Jul 02 10:58:09 2009 INFO - <5> Sending A-ASSOCIATE-RELEASE-RSP PDU
Thu Jul 02 10:58:09 2009 INFO - <5> A-ASSOCIATE-RELEASE-RSP PDU sent successfully
Thu Jul 02 10:58:09 2009 INFO - Session: <5> disconnected for client: 192.168.0.4
So while sending the first file, a fatal error has been occured near the tag 0x0010,1010...
What may be the problem around these tags ?


By the way, the first file is created by inserting the following tags....
Also the created Dicom file is sucessfully parsed and read by all Dicom viewers.

Code: Select all

// insert the DICOM tags to create the file
 //////////////////////////////////////////////////////////////////////////

 pDataSet->putAndInsertString(DCM_SpecificCharacterSet,"ISO.IR 100");  
 pDataSet->putAndInsertString(DCM_ImageType,"OTHER");
 pDataSet->putAndInsertString(DCM_InstanceCreationDate,"20090701");  
 pDataSet->putAndInsertString(DCM_InstanceCreationTime,"121045.000000");  
 pDataSet->putAndInsertString(DCM_SOPClassUID,UID_SecondaryCaptureImageStorage); 
 pDataSet->putAndInsertString(DCM_SOPInstanceUID,dcmGenerateUniqueIdentifier(chUID, SITE_INSTANCE_UID_ROOT)); 

 pDataSet->putAndInsertString(DCM_StudyDate,"20090701");  
 pDataSet->putAndInsertString(DCM_SeriesDate,"20090701"); 
 pDataSet->putAndInsertString(DCM_StudyTime,"121045.000000");
 pDataSet->putAndInsertString(DCM_SeriesTime,"121045.000000");
 pDataSet->putAndInsertString(DCM_AcquisitionTime,"121045.000000");
 pDataSet->putAndInsertString(DCM_ContentTime,"121045.000000");
 pDataSet->putAndInsertString(DCM_AccessionNumber,"");
 pDataSet->putAndInsertString(DCM_Modality,"OT");
 pDataSet->putAndInsertString(DCM_ConversionType,"WSD");
 pDataSet->putAndInsertString(DCM_Manufacturer,"test");        // (0x0008, 0x0070)
 pDataSet->putAndInsertString(DCM_ManufacturersModelName,"test");    // (0x0008, 0x1090)
 pDataSet->putAndInsertString(DCM_InstitutionName,"test");       // (0x0008, 0x0080)
 pDataSet->putAndInsertString(DCM_ReferringPhysiciansName,"");
 pDataSet->putAndInsertString(DCM_StudyDescription,"Secondary capture");
 pDataSet->putAndInsertString(DCM_SeriesDescription ,"");
 pDataSet->putAndInsertString(DCM_PerformingPhysiciansName,"");
 pDataSet->putAndInsertString(DCM_OperatorsName,"");

 pDataSet->putAndInsertString(DCM_PatientsName,"TestRGB");              // (0x0010, 0x0010)
 pDataSet->putAndInsertString(DCM_PatientID,"ID-TestRGB");              // (0x0010, 0x0020)
 pDataSet->putAndInsertString(DCM_PatientsBirthDate,"20050216");             // (0x0010, 0x0030)
 pDataSet->putAndInsertString(DCM_PatientsSex,"M");                // (0x0010, 0x0040)
 pDataSet->putAndInsertString(DCM_PatientsAge,"52");                // (0x0010, 0x1010)
        
 pDataSet->putAndInsertString(DCM_BodyPartExamined ,"");
 pDataSet->putAndInsertString(DCM_SliceThickness,"0.5");        // (0x0018, 0x0050)
 pDataSet->putAndInsertString(DCM_ReconstructionDiameter,"0.35");         // (0x0018, 0x1100)
 pDataSet->putAndInsertString(DCM_GantryDetectorTilt,"0");        // (0x0018, 0x1120)
 pDataSet->putAndInsertString(DCM_ConvolutionKernel,"0");      // (0x0018, 0x1210)


 pDataSet->putAndInsertString(DCM_PatientOrientation ,"");
 pDataSet->putAndInsertString(DCM_StudyID,"1");                 // (0x0008, 0x0020)
 pDataSet->putAndInsertString(DCM_SeriesNumber,"1");          // (0x0020, 0x0011)
 pDataSet->putAndInsertString(DCM_InstanceNumber,"1");         // (0x0020, 0x0013)
 pDataSet->putAndInsertString(DCM_ImagePositionPatient,"");       // (0x0020, 0x0032)
 pDataSet->putAndInsertString(DCM_StudyInstanceUID,dcmGenerateUniqueIdentifier(chUID, SITE_INSTANCE_UID_ROOT)); 
 pDataSet->putAndInsertString(DCM_SeriesInstanceUID,dcmGenerateUniqueIdentifier(chUID, SITE_INSTANCE_UID_ROOT));
 pDataSet->putAndInsertString(DCM_ImageOrientationPatient,"");     // (0x0020, 0x0037)

 pDataSet->putAndInsertUint16(DCM_SamplesPerPixel,3);
 pDataSet->putAndInsertUint16(DCM_PlanarConfiguration,0);
 pDataSet->putAndInsertUint16(DCM_Rows,512);           // (0x0028, 0x0010)
 pDataSet->putAndInsertUint16(DCM_Columns,512);           // (0x0028, 0x0011)

 pDataSet->putAndInsertString(DCM_PhotometricInterpretation,"RGB"); 
 pDataSet->putAndInsertString(DCM_PixelSpacing,"0.5");         // (0x0028, 0x0030)
 pDataSet->putAndInsertUint16(DCM_BitsAllocated,8);                // ?? for raw check
 pDataSet->putAndInsertUint16(DCM_BitsStored,8); 
 pDataSet->putAndInsertUint16(DCM_HighBit,7);
 pDataSet->putAndInsertUint16(DCM_PixelRepresentation,1);
 pDataSet->putAndInsertString(DCM_WindowCenter,"120");
 pDataSet->putAndInsertString(DCM_WindowWidth,"85");
 pDataSet->putAndInsertString(DCM_RescaleIntercept,"0");
 pDataSet->putAndInsertString(DCM_RescaleSlope,"1"); 

 
 //add the pixel data to dataset
 pDataSet->putAndInsertUint8Array(DCM_PixelData,pPixelData, bufsize); 

 
 // load all data in the memory :
 dcmFileFormat.loadAllDataIntoMemory();

 //Output the file
 statusSaveFile = dcmFileFormat.saveFile(pInfo->savefilefullpath, 
  EXS_LittleEndianExplicit,EET_ExplicitLength,EGL_withGL,EPD_noChange,0,0);  

 if (statusSaveFile.bad()) {
  FALSE;
 }

 // Return the success status
 return TRUE;
Thanks,
With best regards.

Yves Neumann
Posts: 30
Joined: Fri, 2005-12-02, 17:06
Location: Germany

#4 Post by Yves Neumann »

The problem is the value. The attribute 'patients age' has a value representation of AS.

From the standard (PS 3.5-2008):

A string of characters with one of the following formats -- nnnD, nnnW, nnnM, nnnY; where nnn shall contain the number of days for D, weeks for W, months for M, or years for Y. Example: “018M” would represent an age of 18 months.

If you change the value to '052Y' it works with PacsOne. Btw, PacsOne reports a failure 0xA700 in the response for the bad dataset.

Another thing: the value for 'specific character set' (0008,0005) in your samples is not correct, too. It has to be 'ISO_IR 100' (see PS 3.3-2008 C.12.1.1.2 ).

Masato
Posts: 31
Joined: Fri, 2009-03-13, 01:41
Location: United States

Solved the problem

#5 Post by Masato »

Hello,

I solved the problem !

I corrected the 'specific character set' (0008,0005) value to 'ISO_IR 100'. Moreover the attribute "PatientAge" is not actually necessary in SecondaryCaptureIOD as per the definition from Dicom standard document.

It was "PatientAge" attribute that created all the problems.

Anyways, thanks for the post.

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

#6 Post by Michael Onken »

Thanks Yves :-)

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest