c++ - DICOM C_MOVE with gdcm's "CompositeNetworkFunctions" -
i trying dicoms server using gdcm's compositenetworkfunctions. test server set using "orthanc".
when run move request, get:
terminate called after throwing instance of 'gdcm::exception'
what(): /home/myname/builds/gdcm/source/source/common/gdcmexception.h:74 ():
when catch exception, find "unhandled exception", no more info. instead of catching it, run program using gdb. here's get:
0x00007ffff3e4dcc9 in __gi_raise (sig=sig@entry=6) @ ../nptl/sysdeps/unix/sysv/linux/raise.c:56 56 ../nptl/sysdeps/unix/sysv/linux/raise.c: no such file or directory. (gdb) bt #0 0x00007ffff3e4dcc9 in __gi_raise (sig=sig@entry=6) @ ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x00007ffff3e510d8 in __gi_abort () @ abort.c:89 #2 0x00007ffff44526b5 in __gnu_cxx::__verbose_terminate_handler() () /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #3 0x00007ffff4450836 in ?? () /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #4 0x00007ffff4450863 in std::terminate() () /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #5 0x00007ffff4450aa2 in __cxa_throw () /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #6 0x0000000000781772 in std::istream& gdcm::dataset::readwithlength<gdcm::explicitdataelement, gdcm::swappernoop>(std::istream&, gdcm::vl&) () #7 0x00000000007cd268 in gdcm::network::presentationdatavalue::concatenatepdvblobsasexplicit(std::vector<gdcm::network::presentationdatavalue, std::allocator<gdcm::network::presentationdatavalue> > const&) () #8 0x00000000007d6af1 in gdcm::network::ulconnectionmanager::runeventloop(gdcm::network::ulevent&, gdcm::network::ulconnection*, gdcm::network::ulconnectioncallback*, bool const&) () #9 0x00000000007d5190 in gdcm::network::ulconnectionmanager::runmoveeventloop(gdcm::network::ulevent&, gdcm::network::ulconnectioncallback*) () #10 0x00000000007d4acf in gdcm::network::ulconnectionmanager::sendmove(gdcm::baserootquery const*, gdcm::network::ulconnectioncallback*) () #11 0x00000000007c1750 in gdcm::compositenetworkfunctions::cmove(char const*, unsigned short, gdcm::baserootquery const*, unsigned short, char const*, char const*, char const*) () #12 0x0000000000666c5c in pacscmove::run (this=0x25a9dd0) @ /home/myname/projects/hiwi/source/src/pacscmove.cpp:67 #13 0x00007ffff4798384 in ?? () /home/myname/qt/5.4/gcc_64/lib/libqt5core.so.5 #14 0x00007ffff70fa182 in start_thread (arg=0x7fffd8cf5700) @ pthread_create.c:312 #15 0x00007ffff3f1147d in clone () @ ../sysdeps/unix/sysv/linux/x86_64/clone.s:111
here's code:
mquery.initializedataset( mquerylevel ); setsearchparameter( gdcm::tag( 0x20, 0x000d ), studyuid.tostdstring() ); // study uid setsearchparameter( gdcm::tag( 0x20, 0x000e ), seriesuid.tostdstring() ); // series uid std::cout << "new move query: " << mquery.validatequery(true) << std::endl; mquery.writequery("movequery.dcm"); bool res = gdcm::compositenetworkfunctions::cmove( "localhost", 4242, &mquery, 11110, "imhotep", null, "/home/myname/testpatient" );
mquerylevel gdcm::eseries
the interesting thing written query file "movequery.dcm", can download file fine using movescu:
movescu -v -p -aet imhotep -od /home/myname/testpatient/ --port 11110 localhost 4242 movequery.dcm
i've tried:
- different values aet , call
- relative , absolute paths
- different ports (although shouldn't - movescu call uses same ports, after all!)
- mquery of type gdcm::movepatientrootquery, i've tried movestudyrootquery, findpatientrootquery, findstudyrootquery
- diving gdcm code, following stacktrace - don't understand enough of what's going on
- adding value "patientid" query well, or supplying "seriesuid" (same result)
with patientid added query, here's contents of movequery.dcm:
$ dcmdump movequery.dcm # dicom-file-format # dicom-meta-information-header # used transfersyntax: unknown transfer syntax # dicom-data-set # used transfersyntax: little endian implicit (0008,0052) cs [series] # 6, 1 queryretrievelevel (0010,0020) lo [4589301] # 8, 1 patientid (0020,000d) ui [1.2.840.113619.2.55.1.1762893669.2104.1060778173.267] # 52, 1 studyinstanceuid (0020,000e) ui [1.2.840.113619.2.55.1.1762893669.2104.1060778173.271] # 52, 1 seriesinstanceuid
c-get service not retired in dicom standard. c-get uses same connection retrieve image scp c-move uses parallel connection server switches role scu (client) , try connect move destination ae (destination server). in case, need have dicom listener (scp) on side handle incoming connection.
i think saying calling ae title (c-move service requester) "imhotep" , should have dicom listener listening on port “11110”. requesting remote ae “orthanc” (called ae) move series c-move destination ae ( should side dicom listener (scp) "imhotep").
Comments
Post a Comment