public class CStoreSCUFactory extends SCUFactory
Constructor and Description |
---|
CStoreSCUFactory() |
Modifier and Type | Method and Description |
---|---|
static CStoreSCU |
createCStoreSCU(java.net.Socket socket,
java.lang.String callingAE,
java.lang.String calledAE,
SOPClassUID sopClassUID,
TransferSyntaxUID transferSyntaxUID)
tries to establish an association on the specified socket
and returns a newly created CStoreSCU object on the established
association.The socket must be newly created with no IO operations performed on it yet.
|
static CStoreSCU |
createCStoreSCU(java.lang.String host,
int port,
java.lang.String callingAE,
java.lang.String calledAE,
SOPClassUID sopClassUID,
TransferSyntaxUID transferSyntaxUID)
creates a Socket and calls
createCStoreSCU(Socket, String, String, SOPClassUID, TransferSyntaxUID) |
static MultiCStoreSCU |
createMultiCStoreSCU(java.lang.String host,
int port,
java.lang.String calledAETitle,
java.lang.String localAETitle,
CStoreItemRequest[] itemRequests)
creates a MultiCStoreSCU for a specified array of CStoreItemRequests.
|
static MultiCStoreSCU |
createMultiCStoreSCU(java.lang.String host,
int port,
java.lang.String calledAETitle,
java.lang.String localAETitle,
DicomObject dataset)
creates a MultiCStoreSCU for the specified DICOM SOP instance to be stored.
|
static MultiCStoreSCU |
createMultiCStoreSCU(java.lang.String host,
int port,
java.lang.String calledAETitle,
java.lang.String localAETitle,
DicomObject[] datasets)
creates a MultiCStoreSCU for an array of DICOM SOP instance to be stored.
|
static MultiCStoreSCU |
createMultiCStoreSCU(java.lang.String host,
int port,
java.lang.String calledAETitle,
java.lang.String localAETitle,
java.io.File[] files,
boolean recurse)
creates a MultiCStoreSCU for a an array of DICOM files and/or directories.
|
static MultiCStoreSCU |
createMultiCStoreSCU(java.lang.String host,
int port,
java.lang.String calledAETitle,
java.lang.String localAETitle,
java.io.File file,
boolean recurse)
creates a MultiCStoreSCU for a specified DICOM file or directory.
|
static MultiCStoreSCU |
createMultiCStoreSCU(java.lang.String host,
int port,
java.lang.String calledAETitle,
java.lang.String localAETitle,
java.util.Iterator<java.io.InputStream> dicomStreamIterator,
ImmutablePair<SOPClassUID,TransferSyntaxUID>[] proposedPresentationContexts)
creates a MultiCStoreSCU for the specified combinations of sop classes and transfer syntaxes and for an Iterator of InputStreams to DICOM Part 10 files.
|
static Command |
executeCStore(java.lang.String host,
int port,
java.lang.String callingAE,
java.lang.String calledAE,
DicomObject dataset,
TransferSyntaxUID transferSyntaxUID)
executes a complete C-STORE operation in one method call, including association
setup, the C-STORE message exchange and association release.
|
static Command |
executeCStore(java.lang.String host,
int port,
java.lang.String callingAE,
java.lang.String calledAE,
java.lang.String file) |
getMessageID, release, resetMessageID
protected static JdtLogger log
public static Command executeCStore(java.lang.String host, int port, java.lang.String callingAE, java.lang.String calledAE, java.lang.String file) throws SCUException, DicomException, java.io.IOException
SCUException
DicomException
java.io.IOException
public static Command executeCStore(java.lang.String host, int port, java.lang.String callingAE, java.lang.String calledAE, DicomObject dataset, TransferSyntaxUID transferSyntaxUID) throws SCUException, java.io.IOException
host
- Stringport
- intcallingAE
- StringcalledAE
- Stringdataset
- the dicom sop instance to be storedtransferSyntaxUID
- TransferSyntaxSCUException
java.io.IOException
public static CStoreSCU createCStoreSCU(java.lang.String host, int port, java.lang.String callingAE, java.lang.String calledAE, SOPClassUID sopClassUID, TransferSyntaxUID transferSyntaxUID) throws SCUException, java.io.IOException
createCStoreSCU(Socket, String, String, SOPClassUID, TransferSyntaxUID)
host
- Stringport
- intcallingAE
- StringcalledAE
- StringsopClassUID
- SOPClassUIDSCUException
java.io.IOException
public static CStoreSCU createCStoreSCU(java.net.Socket socket, java.lang.String callingAE, java.lang.String calledAE, SOPClassUID sopClassUID, TransferSyntaxUID transferSyntaxUID) throws SCUException, java.io.IOException
socket
- SocketcallingAE
- the local AE titlecalledAE
- the remote AE titlesopClassUID
- the SOP class for which an association should be establishedtransferSyntaxUID
- the transfer syntax for which an association should be establishedSCUException
java.io.IOException
public static MultiCStoreSCU createMultiCStoreSCU(java.lang.String host, int port, java.lang.String calledAETitle, java.lang.String localAETitle, java.io.File file, boolean recurse)
This method delegates to createMultiCStoreSCU(String, int, String, String, File[], boolean)
host
- remote hostport
- remote portcalledAETitle
- remote AE titlelocalAETitle
- local AE titlefile
- the DICOM file or directory which contains DICOM filesrecurse
- if true, the specified directory is recursively scanned for DICOM files to be storedpublic static MultiCStoreSCU createMultiCStoreSCU(java.lang.String host, int port, java.lang.String calledAETitle, java.lang.String localAETitle, java.io.File[] files, boolean recurse)
This method searches for all DICOM files in the specified directories and then calls upon
createMultiCStoreSCU(String, int, String, String, CStoreItemRequest[])
host
- remote hostport
- remote portcalledAETitle
- remote AE titlelocalAETitle
- local AE titlefiles
- array of files and directoriesrecurse
- if true, the specified directories are recursively scanned for DICOM files to be storedpublic static MultiCStoreSCU createMultiCStoreSCU(java.lang.String host, int port, java.lang.String calledAETitle, java.lang.String localAETitle, DicomObject dataset)
This method delegates to createMultiCStoreSCU(String, int, String, String, DicomObject[])
host
- remote hostport
- remote portcalledAETitle
- remote AE titlelocalAETitle
- local AE titledataset
- DICOM SOP instance to be storedpublic static MultiCStoreSCU createMultiCStoreSCU(java.lang.String host, int port, java.lang.String calledAETitle, java.lang.String localAETitle, DicomObject[] datasets)
This methods delegates to createMultiCStoreSCU(String, int, String, String, CStoreItemRequest[])
host
- remote hostport
- remote portcalledAETitle
- remote AE titlelocalAETitle
- local AE titledatasets
- array with DICOM SOP instances to be storedpublic static MultiCStoreSCU createMultiCStoreSCU(java.lang.String host, int port, java.lang.String calledAETitle, java.lang.String localAETitle, java.util.Iterator<java.io.InputStream> dicomStreamIterator, ImmutablePair<SOPClassUID,TransferSyntaxUID>[] proposedPresentationContexts)
creates a MultiCStoreSCU for the specified combinations of sop classes and transfer syntaxes and for an Iterator of InputStreams to DICOM Part 10 files.
This method creates a MultiCStoreSCU that will loop over the specified iterator and attempt to perform a c-store for every returned InputStream of the iterator. The implementation will read the Part 10 preamble and the file meta information (group 0x0002) and will then pipe the dataset of the SOP instance in a memory-efficient way without instantiating the DICOM dataset into memory onto the association. The presentation context to be used for every inputstream is determined from the SOP class and transfer syntax of the file meta information.
The implementation garantuees that the specified inputstreams in the iterator will be handled sequentially, meaning that every inputstream is read and handled completely before the following inputstream is accessed. This allows the caller to source the inputstreams from an underlying stream. No transfer syntax conversions are performed. The caller should assure that all possible sop class/transfer syntax combinations occuring in the Part 10 files of the iterator, are covered in the specified map argument of SOP class/transfer syntax combinations
For every combination in the array of proposedPresentationContexts a separate presentation context is proposed. The order of proposed presentation contexts and the generated presentation context id is determined by the order of the array
A MultiCStoreSCU instance created with this factory method will ignore any AssociationItem
s passed to it via its executeStore methods.
All items to be stored are determined by the specified Iterator of InputStreams
host
- remote hostport
- remote portcalledAETitle
- remote AE titlelocalAETitle
- local AE titledicomStreamIterator
- iterator of InputStreams to DICOM Part10 filesproposedPresentationContexts
- array with SOP class / transfer syntax combinations that will be negotiatedpublic static MultiCStoreSCU createMultiCStoreSCU(java.lang.String host, int port, java.lang.String calledAETitle, java.lang.String localAETitle, CStoreItemRequest[] itemRequests)
host
- remote hostport
- remote portcalledAETitle
- remote AE titlelocalAETitle
- local AE titleitemRequests
- array of CStoreItemRequests