Send one serie in one message

28 views
Skip to first unread message

Ludovic MICHON

unread,
Feb 6, 2020, 2:12:35 AM2/6/20
to ruby-dicom
Hello everybody,

I'm trying to send a group of images in one single message.

So for example if my dicom files are in this directory (received\201112524\20200127\CT), i do that:
dcm_serie_path = 'received\201112524\20200127\CT'
dcm_serie = DICOM::load_files(dcm_serie_path)
node = DClient.new(IPDicomNamer, 104)
node.host_ae = NameDicomNamer
node.send(dcm_serie)

I have this answer back:
I, [2020-02-05T20:08:02.072784 #7232]  INFO -- DICOM: Association successfully negotiated with host DICOM_namer (172.16.120.35).
I, [2020-02-05T20:08:02.072784 #7232]  INFO -- DICOM: All 2 presentation contexts were accepted by host DICOM_namer (172.16.120.35).
I, [2020-02-05T20:08:02.104062 #7232]  INFO -- DICOM: Association released properly from host DICOM_namer.
=> false

When i go to check my DICOM_namer server it tells me that 0 messages have been received.
It works very well with one single image.

Have you got some ideas?

(I want to send all these images in one single message beacause it is really to long one by one dicom image....)

Thank you so much for your answers

Best regards,

Ludo

Christoffer Lervåg

unread,
Feb 6, 2020, 2:21:22 AM2/6/20
to ruby-dicom
Hello Ludo

Thank you for using the ruby-dicom library!

I am a little bit puzzled by this, because what you describe should work, according to the documentation.

However, since it doesnt, could you try this workaround (sending files one by one):

dcm_serie.each {|file| node.send(file)}

Best regards
Christoffer
Message has been deleted

Ludovic MICHON

unread,
Feb 11, 2020, 2:51:04 PM2/11/20
to ruby-dicom
Hello Christoffer,

Thanks for your answer and this great library you made!

Sending files one by one works, but it's very long...
I found where the problem comes from: the "perform_send" method.
When I send many CT files at the same time, the @approved_syntaxes[sop_class] is empty.

Here is my presentation context:
{:presentation_item_type=>"21", :presentation_item_length=>27, :presentation_context_id=>27, :result=>0, :transfer_syntax_item_type=>"40", :transfer_syntax_item_length=>19, :transfer_syntax=>"1.2.840.10008.1.2.1"}

I have this value of @approved_syntaxes:
{{"1.2.840.10008.5.1.4.1.1.2"=>{537=>{:transfer_syntaxes=>["1.2.840.10008.1.2"]}, 539=>{:transfer_syntaxes=>["1.2.840.10008.1.2.1"]}}}=>[25, "1.2.840.10008.1.2"]}
So my @approved_syntaxes has a problem..

The problem comes from the fact that there is not any correspondence between the context_ids from the presentation context and from the def find_abstract_syntax(id) (the return is empty for this case) isn't it?


Do you know why?

Tusen takk Christoffer :)
Hilsen,

Ludo

Christoffer Lervåg

unread,
Feb 13, 2020, 9:31:41 AM2/13/20
to ruby-dicom
Hello Ludo

Sorry for the somewhat slow reply. I have started looking into it, but been somewhat distracted with other tasks. I will try to dig into it tomorrow and see if I spot anything wrong.

Best regards,
Christoffer

Christoffer Lervåg

unread,
Feb 17, 2020, 7:17:55 AM2/17/20
to ruby-dicom
Hello Ludo

I am happy to inform you that the bug has finally been identified, fixed and commited to github.

Thank you for letting me know about this bug!

Best regards,
Christoffer
Reply all
Reply to author
Forward
0 new messages