Example #1
0
 // Get and initialize the DICOM Storage SCP
 private static DicomStorageScp getDicomStore() {
   String aetitle, port;
   Properties p = new Properties();
   aetitle = TrialConfig.getDicomStoreAETitle();
   port = TrialConfig.getDicomStorePort();
   p.setProperty("storage-scp-aet", aetitle);
   p.setProperty("port", port);
   p.setProperty("dest", TrialConfig.basepath + TrialConfig.dicomStoreDir);
   Dicom.initialize(p);
   return Dicom.getStorageScp();
 }
Example #2
0
 // Load the anonymizer.properties file.
 // This function is called whenever the Clinical Trial Service is restarted,
 // allowing new anonymization scripts to be loaded.
 private void initialize() {
   reinitialize = false;
   try {
     File propFile = new File(TrialConfig.basepath + TrialConfig.dicomAnonymizerFilename);
     dicomAnonymizerProperties = new Properties();
     dicomAnonymizerProperties.load(new FileInputStream(propFile));
     File lkupFile = new File(TrialConfig.basepath + TrialConfig.lookupTableFilename);
     lookupTableProperties = new Properties();
     try {
       lookupTableProperties.load(new FileInputStream(lkupFile));
     } catch (Exception ex) {
       lookupTableProperties = null;
     }
     if (TrialConfig.dicomImportAnonymizerEnabled())
       Log.message(processorServiceName + ": DicomAnonymizer initialized");
     else Log.message(processorServiceName + ": DicomAnonymizer not enabled");
   } catch (Exception e) {
     Log.message(processorServiceName + ": Unable to configure the DicomAnonymizer");
   }
 }