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

Failed to CSTORE #41

Closed
amilian opened this issue Jun 13, 2016 · 1 comment
Closed

Failed to CSTORE #41

amilian opened this issue Jun 13, 2016 · 1 comment

Comments

@amilian
Copy link

amilian commented Jun 13, 2016

Hi,
When I Send CSTORE it not work.
I use dcmtk storescp and this piece of code:

var obj = DICOMObject.Read(f);
var store = new DICOMSCU(new Entity(Config.SourceAET, ip, 21012));
var target = new Entity("AN_TEST", Config.TargetIP, Config.TargetPort);
var request = store.GenerateCStoreRequest(obj, Count);
store.SendMessage(request, target);

When debugger arrived to SendMessage it launch a IOException and said:

It has forced the interruption of an existing connection by the remote host

On the another hand the dcmtk storescp said:

W: DcmItem: Length of element (0002,0010) is odd
E: DcmElement: TransferSyntaxUID (0002,0010) larger (1198421) than remaining bytes (18) in file, premature end of stream
E: DIMSE failure (aborting association): 0006:020d DIMSE: receiveCommand: cmdSet->read() Failed
E: 0001:0004 Invalid stream

@amilian amilian changed the title Error to do CSTORE Failed to CSTORE Jun 13, 2016
@dolp1234
Copy link

dolp1234 commented Mar 10, 2017

Did you solved the error?
I use Evil-DICOM library 2 month ago. So I'm late to write a solution.
I tested C-ECHO and C-STORE Message 7 days ago. I find the error, too.
I solved the problem to use wire-shark with DICOM filter.
I can't convince to solve perfectly. But you can receive C-STORE Command on your DICOMSCP exactly.

You need to change source code to fix bug.
Please change to Line 33 of the file [EvilDICOM/Network/PDUs/PDataTF.cs] like this.
DICOMObjectWriter.Write(dw, settings, dicom);
-->
DICOMObjectWriter.Write(dw, settings, dicom, true);

When this DICOMObject of DICOM Command change Birnary Data, Transfer Syntax FileMeta is included incorrectly. The Transfer Syntax FileMeta is tag (0002, 0010).
But Transfer Syntax FileMeta isn't included if this DICOMObject impersonate Sequence.

Best Regards.

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

No branches or pull requests

3 participants