Hello guys,
i am really new to DICOM and dcm4che so i am a bit struggling on how to get things work together.
Here is the full scenario i would like to implement:
I would like to implement a DICOM listener (server) which will accept DICOM sent requests by a DICOM client (e.g. an MRI) ...
From the moment that i will have dicom series/images saved locally, i should anonymize them, compress them to zip format and send them via https (secured soap) over the network.
So the fist part is implementing a DICOM listener.
I have built a simple gui with two buttons (start/stop listener) and a log file (showing the listener status).
I want to implement three java methods for starting dicom listener, stopping dicom listener and checking its status.
I have also noticed that DcmRcv is actually an already implemented DICOM listener so i am trying to use its interface for starting/stopping the listener as follows:
//my GUI controller class
public class FXMLDocumentController implements Initializable {
...
private Boolean dcmRcvStatus;
...
public void initialize() {
...
...
//call method to check status "checkDcmrcvService"
// if listener dcmRcv is down, start it!
}
public void startDcmrcvService (ActionEvent event) {
System.out.println("Going to start DICOM receiver service");
try {
dcmRcv.setAEtitle("DCM4CHE1");
dcmRcv.setHostname("127.0.0.1");
dcmRcv.setPort(435);
dcmRcv.setDestination("C:\\yyy\\xxx\\Development\\DevDir");
dcmRcv.start();
} catch (IOException ex) {
Logger.getLogger(FXMLDocumentController.class.getName()).log(Level.ALL, null, ex);
}
}
public void stopDcmrcvService (ActionEvent event) {
System.out.println("Going to stop DICOM receiver service");
this.dcmRcv.stop();
}
public boolean checkDcmrcvService () {
System.out.println("Going to check DICOM receiver service");
// ...
// IMPLEMENT LOGIC ON HOW TO CHECK listener status
// ...
return dcmRcvStatus;
}
...
}
I can start/stop DcmRcv from the command line and verify its status successfully by using Mayam client. I am starting listener as: dcmrcv
DCM4...@127.0.0.1:435
I am trying to achieve the same with the code listed in method "startDcmrcvService" but i think something is going wrong! I can not verify the connection via Mayam (using the exact AETitle@hostname:port) ...
Any ideas on what i have been missing?
And a last question! Does DcmRcv provides any methods on checking listener status? How am i going to check its status?
Any help would be really useful since i would like to move on fast with this project and DICOM/dcm4che seems to require a lot of digging ...
Thanks!