Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CStore fail on this dicom file #581

Closed
hashitha opened this issue Aug 11, 2017 · 4 comments
Closed

CStore fail on this dicom file #581

hashitha opened this issue Aug 11, 2017 · 4 comments

Comments

@hashitha
Copy link

CSTORE fails when sending the attached file. It is a structured report generated by Ultrasound Toshiba Aplio 500. All other files work fine and I can figure out what is causing this problem.

File
test.zip

I have tried v3.1.0-alpha and 3.0.2

the exception I am getting
$exception {"Association Abort [source: Unknown; reason: NotSpecified]"}

The code I am using

var dicomPath = @"test.dcm";
var dicomFile = Dicom.DicomFile.Open(dicomPath); 

var client = new DicomClient();
DicomCStoreRequest cStore = new DicomCStoreRequest(dicomPath);
cStore.OnResponseReceived = (request, response) =>
{
    Console.WriteLine(request.ToString());
    Console.WriteLine(response.ToString());
};

client.AddRequest(cStore);
client.Send("localhost", 4096, false, "PACS", "OSIRIX");
@anders9ustafsson
Copy link
Contributor

@hashitha Please provide a log from the server also. Are you sending structured reports and this is the only one that fails? Is it reproducible?

@hashitha
Copy link
Author

I don't have any more logs. Yes it works with other structured reports only this one fails. Yes it is reproducible, If you download the attach file and try to send it using the code I provided it will fail.

@anders9ustafsson
Copy link
Contributor

@hashitha Here is the log I get when trying to sent the file to DCMTK's sandbox image server dcmqrscp. As far as I can tell there are some inconsistencies or errors in the datafile that is probably also not accepted by the server you are sending to, hence the abort.

I: Association Received (MAIN:STORESCU -> COMMON) Mon Aug 14 12:42:27 2017
I:
I: Association Acknowledged (Max Send PDV: 16372)
I: Received Store SCP:
I: ===================== INCOMING DIMSE MESSAGE ====================
I: Message Type : C-STORE RQ
I: Message ID : 1
I: Affected SOP Class UID : EnhancedSRStorage
I: Affected SOP Instance UID : 1.2.392.200036.9116.6.18.14535235.6199.20170811021741263.4.183
I: Data Set : present
I: Priority : medium
I: ======================= END DIMSE MESSAGE =======================
RECV: ..W: DcmItem: Dataset not in ascending tag order, at element (7015,1060)
.W: DcmItem: Non-standard VR 'a}' (61\7d) encountered while parsing element (8b13,52bd), assuming 2 byte length field
W: DcmItem: Length of element (8b13,52bd) is odd
.W: DcmItem: Non-standard VR ' ' (01\1e) encountered while parsing element (e69b,e176), assuming 2 byte length field
W: DcmItem: Length of element (e69b,e176) is odd
.W: DcmItem: Non-standard VR '¦╠' (dd\cc) encountered while parsing element (d3e3,aeab), assuming 2 byte length field
W: DcmItem: Length of element (d3e3,aeab) is odd
W: DcmItem: Dataset not in ascending tag order, at element (d3e3,aeab)
.W: DcmItem: Non-standard VR 'à»' (85\af) encountered while parsing element (4b77,3c08), assuming 2 byte length field
W: DcmItem: Dataset not in ascending tag order, at element (4b77,3c08)
.W: DcmItem: Non-standard VR '"M' (22\4d) encountered while parsing element (52f8,f31b), assuming 2 byte length field
W: DcmItem: Dataset not in ascending tag order, at element (52f8,f31b)
W: DcmItem: Non-standard VR 'Û ' (ea\0d) encountered while parsing element (8b60,94f1), assuming 2 byte length field
W: DcmItem: Length of element (8b60,94f1) is odd
W: DcmItem: Dataset not in ascending tag order, at element (8b60,94f1)
.W: DcmItem: Non-standard VR ' �' (11\7f) encountered while parsing element (daa5,ff5a), assuming 2 byte length field
W: DcmItem: Dataset not in ascending tag order, at element (daa5,ff5a)
W: DcmItem: Non-standard VR ' Î' (08\d7) encountered while parsing element (da50,6b1b), assuming 2 byte length field
W: DcmItem: Dataset not in ascending tag order, at element (da50,6b1b)
.W: DcmItem: Non-standard VR '÷ ' (f6\10) encountered while parsing element (81a5,cd79), assuming 2 byte length field
W: DcmItem: Length of element (81a5,cd79) is odd
W: DcmItem: Dataset not in ascending tag order, at element (81a5,cd79)
.W: DcmItem: Non-standard VR ' ' (1f\09) encountered while parsing element (03ff,5d9a), assuming 2 byte length field
W: DcmItem: Length of element (03ff,5d9a) is odd
W: DcmItem: Dataset not in ascending tag order, at element (03ff,5d9a)
.W: DcmItem: Non-standard VR '©|' (b8\7c) encountered while parsing element (9b94,4407), assuming 2 byte length field
W: DcmItem: Dataset not in ascending tag order, at element (9b94,4407)
W: DcmItem: Non-standard VR '¶[' (f4\5b) encountered while parsing element (8a21,4463), assuming 2 byte length field
W: DcmItem: Dataset not in ascending tag order, at element (8a21,4463)
.W: DcmItem: Non-standard VR 'mç' (6d\87) encountered while parsing element (2436,f62e), assuming 2 byte length field
W: DcmItem: Length of element (2436,f62e) is odd
W: DcmItem: Dataset not in ascending tag order, at element (2436,f62e)
W: DcmItem: Non-standard VR 'ä█' (84\db) encountered while parsing element (cecc,85c0), assuming 2 byte length field
W: DcmItem: Dataset not in ascending tag order, at element (cecc,85c0)
.W: DcmItem: Non-standard VR '¦w' (dd\77) encountered while parsing element (5c16,110d), assuming 2 byte length field
W: DcmItem: Length of element (5c16,110d) is odd
W: DcmItem: Dataset not in ascending tag order, at element (5c16,110d)
.W: DcmItem: Non-standard VR 'øù' (9b\97) encountered while parsing element (658a,a13d), assuming 2 byte length field
W: DcmItem: Dataset not in ascending tag order, at element (658a,a13d)
.W: DcmItem: Non-standard VR ' ð' (15\d0) encountered while parsing element (8a82,d708), assuming 2 byte length field
W: DcmItem: Length of element (8a82,d708) is odd
W: DcmItem: Dataset not in ascending tag order, at element (8a82,d708)
.W: DcmItem: Non-standard VR 'ʬ' (ca\ac) encountered while parsing element (dbfc,4e16), assuming 2 byte length field
W: DcmItem: Length of element (dbfc,4e16) is odd
W: DcmItem: Dataset not in ascending tag order, at element (dbfc,4e16)
.W: DcmItem: Non-standard VR '╝p' (bc\70) encountered while parsing element (e2f2,44ed), assuming 2 byte length field
W: DcmItem: Dataset not in ascending tag order, at element (e2f2,44ed)
.W: DcmItem: Non-standard VR 'GÎ' (47\d7) encountered while parsing element (efbb,a047), assuming 2 byte length field
...W: DcmItem: Non-standard VR 'Ƚ' (d4\ab) encountered while parsing element (76b6,2344), assuming 2 byte length field
W: DcmItem: Length of element (76b6,2344) is odd
W: DcmItem: Dataset not in ascending tag order, at element (76b6,2344)
.W: DcmItem: Non-standard VR 'rÉ' (72\90) encountered while parsing element (1104,4ed7), assuming 2 byte length field
W: DcmItem: Length of element (1104,4ed7) is odd
W: DcmItem: Dataset not in ascending tag order, at element (1104,4ed7)
.W: DcmItem: Non-standard VR 'Ù¾' (eb\f3) encountered while parsing element (026d,e6f8), assuming 2 byte length field
W: DcmItem: Dataset not in ascending tag order, at element (026d,e6f8)
.W: DcmItem: Non-standard VR ' J' (20\4a) encountered while parsing element (231b,5059), assuming 2 byte length field
W: DcmItem: Length of element (231b,5059) is odd
E: DcmElement: Unknown Tag & Data (231b,5059) larger (11269) than remaining bytes (4486) in file, premature end of stream
W: DcmItem: Dataset not in ascending tag order, at element (231b,5059)
W: DIMSE Warning: (STORESCU,COMMON): DIMSE receiveDataSetInMemory: dset->read() Failed (Invalid stream)
E: Store SCP Failed: 0006:020d DIMSE Failed to receive message
I: Store SCP: Deleting Image File: %sE:\Applications\dcmtk-3.6.0-win32-i386\bin\DB\COMMON\SRe_59917e93dff36ec9.dcm
E: DIMSE Failure (aborting association): 0006:020d DIMSE Failed to receive message

@anders9ustafsson
Copy link
Contributor

@hashitha I'll withdraw my previous statement. The problem is in fo-dicom, and is caused by an invalid sorting of private tags. This was recently recognized in #570 and fixed in #577, but the fix has not yet made it to any release. So either download the source code and build your own assemblies, or wait for a new release where the fix is included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants