com.pixelmed.apps
Class MultiModalitySimulator
java.lang.Object
com.pixelmed.apps.MultiModalitySimulator
public class MultiModalitySimulator
- extends Object
This class implements a multi-modality simulator that takes a database of
existing studies to provide a source of sample images and DICOM attributes, and
for each modality within the database, generates random new patients
and studies at random intervals using the current date and time.
For example:
try {
new MultiModalitySimulator("theirhost","11112","STORESCP","STORESCU","/tmp/testfile.dcm","1.2.840.10008.5.1.4.1.1.7","1.3.6.1.4.1.5962.1.1.0.0.0.1064923879.2077.3232235877",0,0);
}
catch (Exception e) {
e.printStackTrace(System.err);
}
From the command line:
java -cp pixelmed.jar:lib/additional/commons-codec-1.3.jar:lib/additional/excalibur-bzip2-1.0.jar com.pixelmed.network.MultiModalitySimulator theirhost 11112 STORESCP STORESCU - 0 0
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
modalities
protected static String[] modalities
sleepIntervalForModalityInMinutes
protected static int[] sleepIntervalForModalityInMinutes
sleepIntervalForModality
protected Map<String,Integer> sleepIntervalForModality
accessionNumberCounter
protected static long accessionNumberCounter
patientNames
protected String[] patientNames
debugLevel
protected int debugLevel
seriesLocalParentReferenceColumnName
protected String seriesLocalParentReferenceColumnName
localFileNameColumnName
protected String localFileNameColumnName
modalityColumnName
protected String modalityColumnName
databaseInformationModel
protected DatabaseInformationModel databaseInformationModel
hostname
protected String hostname
port
protected int port
calledAETitle
protected String calledAETitle
MultiModalitySimulator
public MultiModalitySimulator(String hostname,
int port,
String calledAETitle,
String databaseFileName,
int debugLevel)
throws DicomException
- Throws:
DicomException
getSleepIntervalForModalityInMilliseconds
protected int getSleepIntervalForModalityInMilliseconds(String modality)
findFilesToSend
protected void findFilesToSend(InformationEntity ie,
String localPrimaryKeyValue,
List<String> dicomFiles)
throws DicomException
- Throws:
DicomException
generateSyntheticStudyFromOriginal
protected SetOfDicomFiles generateSyntheticStudyFromOriginal(List<String> originalDicomFileNames,
String modality,
String aeTitleForMetaInformation,
String patientName,
String patientID,
String studyID,
String accessionNumber)
throws DicomException,
IOException
- Throws:
DicomException
IOException
deleteFiles
protected static void deleteFiles(SetOfDicomFiles dicomFiles)
main
public static void main(String[] arg)
Simulate modalities sending to the specified AE.
- Parameters:
arg - array of five strings - their hostname, their port, their AE Title,
the source database name,
and the debugging level