I would like to know, in Linux machin, is it possible to load two different DICOM files at the same time.
What I am trying to do is, I created a JNI library to read dicom dataset, but when I load more than one files at the same time, its crashing Java Virtual Machine.
Following is the crash log:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0x00002aaabc198a99, pid=22877, tid=1124096320
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_21-b01 mixed mode)
# Problematic frame:
# C [libdcmreaddataset.so.10+0x198a99] _ZN21DJDecoderRegistration7cleanupEv+0xa1
#
Could anyone please tell me what could be the problem?
I am using DCM4CHE's storescp program for tesing my library.
In this library, after reading the dataset, program is changing the compression of the DICOM image, if its compressed.
I identified that the problem is not related to any particular image.
The same image if I tried again, then its working.
And this problem is not happening always.
The question is probably: When and how often do you call the cleanup() function.
Btw, you are hopefully aware of the following comment inthe API documentation of the cleanup() function: "Attention: Must not be called while other threads might still use the registered codecs, e.g. because they are currently decoding DICOM data sets through dcmdata."
I am doing the codec registration and clean up for each image.
I suspect this could be the problem.
Is there any function in DCMTK, by which we can check whether the codec is already registered or not?