public class SynchronizeFromRemoteSCP
extends java.lang.Object
A class for synchronizing the contents of a local database of DICOM objects with a remote SCP.
The class has no public methods other than the constructor and a main method that is useful as a utility. The constructor establishes an association, sends hierarchical C-FIND requests at the STUDY, SERIES and IMAGE levels to determine what is available on the remote AE, then attempts to retrieve anything not present locally at the highest level possible. E.g., if a study is not present, a retrieve of the entire study is requested.
The main method is also useful in its own right as a command-line utility. For example:
java -cp ./pixelmed.jar:./lib/additional/hsqldb.jar:./lib/additional/commons-codec-1.3.jar:./lib/additional/jmdns.jar \ com.pixelmed.apps.SynchronizeFromRemoteSCP \ /tmp/dicomsync/database /tmp/dicomsync \ graytoo 4006 GRAYTOO_DIV_4006 \ 11112 US \ MOVE ALL 1 0
Modifier and Type | Class and Description |
---|---|
protected static class |
SynchronizeFromRemoteSCP.OurReadTerminationStrategy |
Modifier and Type | Field and Description |
---|---|
protected static AttributeList.ReadTerminationStrategy |
terminateAfterRelationshipGroup |
Constructor and Description |
---|
SynchronizeFromRemoteSCP(DatabaseInformationModel databaseInformationModel,
java.io.File savedInstancesFolder,
java.lang.String remoteHost,
int remotePort,
java.lang.String remoteAE,
int localPort,
java.lang.String localAE,
boolean useGet,
boolean queryAll,
java.lang.String queryPatternFileName,
int verbosityLevel,
int debugLevel,
boolean anyTransferSyntax,
boolean retrieveStudy,
boolean reuseAssociations)
Synchronize the contents of a local database of DICOM objects with a remote SCP.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] arg)
Synchronize the contents of a local database of DICOM objects with a remote SCP.
|
protected static final AttributeList.ReadTerminationStrategy terminateAfterRelationshipGroup
public SynchronizeFromRemoteSCP(DatabaseInformationModel databaseInformationModel, java.io.File savedInstancesFolder, java.lang.String remoteHost, int remotePort, java.lang.String remoteAE, int localPort, java.lang.String localAE, boolean useGet, boolean queryAll, java.lang.String queryPatternFileName, int verbosityLevel, int debugLevel, boolean anyTransferSyntax, boolean retrieveStudy, boolean reuseAssociations) throws DicomException, DicomNetworkException, java.io.IOException, java.lang.InterruptedException
Synchronize the contents of a local database of DICOM objects with a remote SCP.
Queries the remote SCP for everything it has and retrieves all instances not already present in the specified local database.
databaseInformationModel
- the local database (will be created if does not already exist)savedInstancesFolder
- where to save retrieved instances (must already exist)remoteHost
- remotePort
- remoteAE
- localPort
- local port for DICOM listener ... must already be known to remote AE unless C-GETlocalAE
- local AET for DICOM listener ... must already be known to remote AE unless C-GETuseGet
- if true, use C-GET rather than C-MOVEqueryAll
- if true query for all patient names at once, rather than selectively by first letter, unless there is a queryPatternFileNamequeryPatternFileName
- a file containing a list of PatientName query patterns, one per lineverbosityLevel
- debugLevel
- anyTransferSyntax
- if true, accept any Transfer Syntax, not just uncompressed onesretrieveStudy
- if true, retrieve only at STUDY level, not confirming every instancereuseAssociations
- if true, keep alive and reuse AssociationsDicomException
DicomNetworkException
java.io.IOException
java.lang.InterruptedException
public static void main(java.lang.String[] arg)
Synchronize the contents of a local database of DICOM objects with a remote SCP.
Queries the remote SCP for everything it has and retrieves all instances not already present in the specified local database.
Will register the supplied local AE and port with Bonjour if supported (this is specific to the main() method; the constructor of the class itself does not do this).
arg
- array of 7 to 14 strings - the fully qualified path of the database file prefix, the fully qualified path of the saved incoming files folder,
the remote hostname, remote port, remote AE Title, our port (ignored if GET), our AE Title,
optionally GET or MOVE (defaults to MOVE),
optionally query by ALL or SELECTIVE patient name (defaults to ALL) or a filename containing a list of PatientName query patterns (one per line),
optionally a verbosity level, optionally an integer debug level,
optionally UNCOMPRESSED or ANY (defaults to UNCOMPRESSED)
optionally a retrieval level STUDY or INSTANCE (defaults to INSTANCE)
optionally REUSE or NEW associations for each query and retrieval (defaults to NEW)