public class StorageSOPClassSCU extends SOPClass
This class implements the SCU role of SOP Classes of the Storage Service Class.
The class has no methods other than the constructor (and a main method for testing). The constructor establishes an association, sends the C-STORE request, and releases the association.
Debugging messages with a varying degree of verbosity can be activated.
For example:
try { new StorageSOPClassSCU("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) { slf4jlogger.error("",e); }
From the command line, sending multiple files:
find /tmp -name '*.dcm' | java -cp pixelmed.jar:lib/additional/commons-codec-1.3.jar:lib/additional/commons-compress-1.12.jar com.pixelmed.network.StorageSOPClassSCU theirhost 11112 STORESCP STORESCU -
Modifier and Type | Class and Description |
---|---|
protected class |
StorageSOPClassSCU.CStoreResponseHandler |
Modifier and Type | Field and Description |
---|---|
protected boolean |
trappedExceptions |
AcquisitionContextSRStorage, AdvancedBlendingPresentationStateStorage, AmbulatoryECGStorage, arrayOfQuerySOPClasses, arrayOfRetrieveWithGetSOPClasses, arrayOfRetrieveWithMoveSOPClasses, arrayOfStorageSOPClasses, ArterialPulseWaveformStorage, AudioSRStorageTrialRetired, AutorefractionMeasurementsStorage, BasicStructuredDisplayStorage, BasicTextSRStorage, BasicVoiceStorage, BlendingSoftcopyPresentationStateStorage, BodyPositionWaveformStorage, BreastProjectionXRayImageStorageForPresentation, BreastProjectionXRayImageStorageForProcessing, BreastTomosynthesisImageStorage, CardiacElectrophysiologyWaveformStorage, CArmPhotonElectronRadiationRecordStorage, CArmPhotonElectronRadiationStorage, ChestCADSRStorage, ColonCADSRStorage, ColorPaletteInformationModelFind, ColorPaletteInformationModelGet, ColorPaletteInformationModelMove, ColorPaletteStorage, ColorSoftcopyPresentationStateStorage, CompositingPlanarMPRVolumetricPresentationStateStorage, Comprehensive3DSRStorage, ComprehensiveSRStorage, ComprehensiveSRStorageTrialRetired, ComputedRadiographyImageStorage, CornealTopographyMapStorage, CTImageStorage, DeformableSpatialRegistrationStorage, DermoscopicPhotographyImageStorage, DetailSRStorageTrialRetired, DICONDEEddyCurrentImageStorage, DICONDEEddyCurrentMultiframeImageStorage, DICOS2DAITStorage, DICOS3DAITStorage, DICOSCTImageStorage, DICOSDigitalXRayImageStorageForPresentation, DICOSDigitalXRayImageStorageForProcessing, DICOSQuadrupoleResonanceStorage, DICOSThreatDetectionReportStorage, DigitalIntraoralXRayImageStorageForPresentation, DigitalIntraoralXRayImageStorageForProcessing, DigitalMammographyXRayImageStorageForPresentation, DigitalMammographyXRayImageStorageForProcessing, DigitalXRayImageStorageForPresentation, DigitalXRayImageStorageForProcessing, ElectromyogramWaveformStorage, ElectrooculogramWaveformStorage, EncapsulatedCDAStorage, EncapsulatedPDFStorage, EncapsulatedSTLStorage, EnhancedCTImageStorage, EnhancedMRColorImageStorage, EnhancedMRImageStorage, EnhancedPETImageStorage, EnhancedSRStorage, EnhancedUSVolumeStorage, EnhancedXAImageStorage, EnhancedXRFImageStorage, ExtensibleSRStorage, GeneralAudioWaveformStorage, GeneralECGStorage, GenericImplantTemplateStorage, GrayscalePlanarMPRVolumetricPresentationStateStorage, GrayscaleSoftcopyPresentationStateStorage, HemodynamicWaveformStorage, ImplantAssemblyTemplateStorage, ImplantationPlanSRStorage, ImplantTemplateGroupStorage, IntraocularLensCalculationsStorage, IVOCTImageStorageForPresentation, IVOCTImageStorageForProcessing, KeratometryMeasurementsStorage, KeyObjectSelectionDocumentStorage, LegacyConvertedEnhancedCTImageStorage, LegacyConvertedEnhancedMRImageStorage, LegacyConvertedEnhancedPETImageStorage, LensometryMeasurementsStorage, MacularGridThicknessAndVolumeReportStorage, MammographyCADSRStorage, MediaStorageDirectoryStorage, MRImageStorage, MRSpectroscopyStorage, MultichannelRespiratoryWaveformStorage, MultiframeGrayscaleByteSecondaryCaptureImageStorage, MultiframeGrayscaleWordSecondaryCaptureImageStorage, MultiframeSingleBitSecondaryCaptureImageStorage, MultiframeTrueColorSecondaryCaptureImageStorage, MultipleVolumeRenderingVolumetricPresentationStateStorage, NuclearMedicineImageStorage, NuclearMedicineImageStorageRetired, OphthalmicAxialMeasurementsStorage, OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage, OphthalmicOpticalCoherenceTomographyEnFaceImageStorage, OphthalmicPhotography16BitImageStorage, OphthalmicPhotography8BitImageStorage, OphthalmicThicknessMapStorage, OphthalmicTomographyImageStorage, OphthalmicVisualFieldStaticPerimetryMeasurementsStorage, ParametricMapStorage, PatientRadiationDoseSRStorage, PatientRootQueryRetrieveInformationModelFind, PatientRootQueryRetrieveInformationModelGet, PatientRootQueryRetrieveInformationModelMove, PatientStudyOnlyQueryRetrieveInformationModelFind, PatientStudyOnlyQueryRetrieveInformationModelGet, PatientStudyOnlyQueryRetrieveInformationModelMove, PETImageStorage, PrivateAcusonStructuredReportDetailStorage, PrivateAgfaBasicAttributePresentationStateStorage, PrivateDcm4cheEncapsulatedDocumentStorage, PrivateDcm4cheUpgradedCTImageStorage, PrivateDcm4cheUpgradedMRImageStorage, PrivateDcm4cheUpgradedPETImageStorage, PrivateERADPracticeBuilderReportDictationStorage, PrivateERADPracticeBuilderReportTextStorage, PrivateFujiCRImageStorage, PrivateGE3DModelStorage, PrivateGECollageStorage, PrivateGEDicomCTImageInfoObject, PrivateGEDicomDisplayImageInfoObject, PrivateGEDicomMRImageInfoObject, PrivateGEeNTEGRAProtocolOrNMGenieStorage, PrivateGEPETRawDataStorage, PrivateGERTPlanStorage, PrivateMedicalInsight3DSoftcopyPresentationStateStorage, PrivatePhilips3DObject2Storage, PrivatePhilips3DObjectStorage, PrivatePhilips3DPresentationStateStorage, PrivatePhilipsCompositeObjectStorage, PrivatePhilipsCTSyntheticImageStorage, PrivatePhilipsCXImageStorage, PrivatePhilipsCXSyntheticImageStorage, PrivatePhilipsHPLive3D01Storage, PrivatePhilipsHPLive3D02Storage, PrivatePhilipsLiveRunStorage, PrivatePhilipsMRCardio2Storage, PrivatePhilipsMRCardioAnalysis2Storage, PrivatePhilipsMRCardioAnalysisStorage, PrivatePhilipsMRCardioProfileStorage, PrivatePhilipsMRCardioStorage, PrivatePhilipsMRColorImageStorage, PrivatePhilipsMRExamcardStorage, PrivatePhilipsMRSeriesDataStorage, PrivatePhilipsMRSpectrumStorage, PrivatePhilipsMRSyntheticImageStorage, PrivatePhilipsPerfusionImageStorage, PrivatePhilipsPerfusionStorage, PrivatePhilipsReconstructionStorage, PrivatePhilipsRunStorage, PrivatePhilipsSpecialisedXAStorage, PrivatePhilipsSurface2Storage, PrivatePhilipsSurfaceStorage, PrivatePhilipsVolume2Storage, PrivatePhilipsVolumeSetStorage, PrivatePhilipsVolumeStorage, PrivatePhilipsVRMLStorage, PrivatePhilipsXRayMFStorage, PrivatePixelMedFloatingPointImageStorage, PrivatePixelMedLegacyConvertedEnhancedCTImageStorage, PrivatePixelMedLegacyConvertedEnhancedMRImageStorage, PrivatePixelMedLegacyConvertedEnhancedPETImageStorage, PrivatePMODMultiframeImageStorage, PrivateSiemensAXFrameSetsStorage, PrivateSiemensCSANonImageStorage, PrivateSiemensCTMRVolumeStorage, PrivateTomTecAnnotationStorage, PrivateToshibaUSImageStorage, ProcedureLogStorage, PseudoColorSoftcopyPresentationStateStorage, RadiopharmaceuticalRadiationDoseSRStorage, RawDataStorage, RealWorldValueMappingStorage, RespiratoryWaveformStorage, RoboticArmRadiationStorage, RoboticRadiationRecordStorage, RoutineScalpElectroencephalogramWaveformStorage, RTBeamsDeliveryInstructionStorage, RTBeamsDeliveryInstructionStorageTrial, RTBeamsTreatmentRecordStorage, RTBrachyTreatmentRecordStorage, RTDoseStorage, RTImageStorage, RTIonBeamsTreatmentRecordStorage, RTIonPlanStorage, RTPhysicianIntentStorage, RTPlanStorage, RTRadiationRecordSetStorage, RTRadiationSalvageRecordStorage, RTRadiationSetStorage, RTSegmentAnnotationStorage, RTStructureSetStorage, RTTreatmentSummaryRecordStorage, SecondaryCaptureImageStorage, SegmentationStorage, SegmentedVolumeRenderingVolumetricPresentationStateStorage, SimplifiedAdultEchoSRStorage, SleepElectroencephalogramWaveformStorage, SpatialFiducialsStorage, SpatialRegistrationStorage, SpectaclePrescriptionReportStorage, StandaloneCurveStorage, StandaloneModalityLUTStorage, StandaloneOverlayStorage, StandalonePETCurveStorage, StandaloneVOILUTStorage, StereometricRelationshipStorage, StudyRootQueryRetrieveInformationModelFind, StudyRootQueryRetrieveInformationModelGet, StudyRootQueryRetrieveInformationModelMove, SubjectiveRefractionMeasurementsStorage, SurfaceScanMeshStorage, SurfaceScanPointCloudStorage, SurfaceSegmentationStorage, TextSRStorageTrialRetired, TomotherapeuticRadiationRecordStorage, TomotherapeuticRadiationStorage, TractographyResultsStorage, TwelveLeadECGStorage, UltrasoundImageStorage, UltrasoundImageStorageRetired, UltrasoundMultiframeImageStorage, UltrasoundMultiframeImageStorageRetired, Verification, VideoEndoscopicImageStorage, VideoMicroscopicImageStorage, VideoPhotographicImageStorage, VisibleLightDraftImageStorage, VisibleLightEndoscopicImageStorage, VisibleLightMicroscopicImageStorage, VisibleLightMultiFrameDraftImageStorage, VisibleLightPhotographicImageStorage, VisibleLightSlideCoordinatesMicroscopicImageStorage, VisualAcuityMeasurementsStorage, VLWholeSlideMicroscopyImageStorage, VolumeRenderingVolumetricPresentationStateStorage, WideFieldOphthalmicPhotography3DCoordinatesImageStorage, WideFieldOphthalmicPhotographyStereographicProjectionImageStorage, XAXRFGrayscaleSoftcopyPresentationStateStorage, XRay3DAngiographicImageStorage, XRay3DCraniofacialImageStorage, XRayAngiographicBiplaneImageStorage, XRayAngiographicImageStorage, XRayRadiationDoseSRStorage, XRayRadioFlouroscopicImageStorage
Modifier | Constructor and Description |
---|---|
protected |
StorageSOPClassSCU()
Dummy constructor allows testing subclasses to use different constructor.
|
|
StorageSOPClassSCU(Association association,
SetOfDicomFiles dicomFiles,
MultipleInstanceTransferStatusHandler multipleInstanceTransferStatusHandler)
Send the specified instances contained in the files over an existing association.
|
|
StorageSOPClassSCU(Association association,
SetOfDicomFiles dicomFiles,
MultipleInstanceTransferStatusHandler multipleInstanceTransferStatusHandler,
java.lang.String moveOriginatorApplicationEntityTitle,
int moveOriginatorMessageID)
Send the specified instances contained in the files over an existing association.
|
|
StorageSOPClassSCU(java.lang.String hostname,
int port,
java.lang.String calledAETitle,
java.lang.String callingAETitle,
int ourMaximumLengthReceived,
int socketReceiveBufferSize,
int socketSendBufferSize,
SetOfDicomFiles dicomFiles,
int compressionLevel,
MultipleInstanceTransferStatusHandler multipleInstanceTransferStatusHandler)
Establish an association to the specified AE, send the instances contained in the files, and release the association.
|
|
StorageSOPClassSCU(java.lang.String hostname,
int port,
java.lang.String calledAETitle,
java.lang.String callingAETitle,
int ourMaximumLengthReceived,
int socketReceiveBufferSize,
int socketSendBufferSize,
SetOfDicomFiles dicomFiles,
int compressionLevel,
MultipleInstanceTransferStatusHandler multipleInstanceTransferStatusHandler,
java.lang.String moveOriginatorApplicationEntityTitle,
int moveOriginatorMessageID)
Establish an association to the specified AE, send the instances contained in the files, and release the association.
|
|
StorageSOPClassSCU(java.lang.String hostname,
int port,
java.lang.String calledAETitle,
java.lang.String callingAETitle,
int ourMaximumLengthReceived,
int socketReceiveBufferSize,
int socketSendBufferSize,
java.lang.String fileName,
java.lang.String affectedSOPClass,
java.lang.String affectedSOPInstance,
int compressionLevel)
Establish an association to the specified AE, send the instance contained in the file, and release the association.
|
|
StorageSOPClassSCU(java.lang.String hostname,
int port,
java.lang.String calledAETitle,
java.lang.String callingAETitle,
int ourMaximumLengthReceived,
int socketReceiveBufferSize,
int socketSendBufferSize,
java.lang.String fileName,
java.lang.String affectedSOPClass,
java.lang.String affectedSOPInstance,
int compressionLevel,
java.lang.String moveOriginatorApplicationEntityTitle,
int moveOriginatorMessageID)
Establish an association to the specified AE, send the instance contained in the file, and release the association.
|
|
StorageSOPClassSCU(java.lang.String hostname,
int port,
java.lang.String calledAETitle,
java.lang.String callingAETitle,
SetOfDicomFiles dicomFiles,
int compressionLevel,
MultipleInstanceTransferStatusHandler multipleInstanceTransferStatusHandler)
Establish an association to the specified AE, send the instances contained in the files, and release the association.
|
|
StorageSOPClassSCU(java.lang.String hostname,
int port,
java.lang.String calledAETitle,
java.lang.String callingAETitle,
SetOfDicomFiles dicomFiles,
int compressionLevel,
MultipleInstanceTransferStatusHandler multipleInstanceTransferStatusHandler,
java.lang.String moveOriginatorApplicationEntityTitle,
int moveOriginatorMessageID)
Establish an association to the specified AE, send the instances contained in the files, and release the association.
|
|
StorageSOPClassSCU(java.lang.String hostname,
int port,
java.lang.String calledAETitle,
java.lang.String callingAETitle,
java.lang.String fileName,
java.lang.String affectedSOPClass,
java.lang.String affectedSOPInstance,
int compressionLevel)
Establish an association to the specified AE, send the instance contained in the file, and release the association.
|
|
StorageSOPClassSCU(java.lang.String hostname,
int port,
java.lang.String calledAETitle,
java.lang.String callingAETitle,
java.lang.String fileName,
java.lang.String affectedSOPClass,
java.lang.String affectedSOPInstance,
int compressionLevel,
java.lang.String moveOriginatorApplicationEntityTitle,
int moveOriginatorMessageID)
Establish an association to the specified AE, send the instance contained in the file, and release the association.
|
Modifier and Type | Method and Description |
---|---|
boolean |
encounteredTrappedExceptions() |
static void |
main(java.lang.String[] arg)
For testing, establish an association to the specified AE and send one or more DICOM instances (C-STORE requests).
|
protected void |
sendMultipleSOPInstances(Association association,
AttributeList[] lists,
MultipleInstanceTransferStatusHandler multipleInstanceTransferStatusHandler,
java.lang.String moveOriginatorApplicationEntityTitle,
int moveOriginatorMessageID)
Send the specified instances contained in the attribute lists over an existing association.
|
protected void |
sendMultipleSOPInstances(Association association,
SetOfDicomFiles dicomFiles,
MultipleInstanceTransferStatusHandler multipleInstanceTransferStatusHandler,
java.lang.String moveOriginatorApplicationEntityTitle,
int moveOriginatorMessageID)
Send the specified instances contained in the files over an existing association.
|
protected boolean |
sendOneSOPInstance(Association association,
java.lang.String affectedSOPClass,
java.lang.String affectedSOPInstance,
AttributeList list,
byte presentationContextID,
java.lang.String outputTransferSyntaxUID,
java.lang.String moveOriginatorApplicationEntityTitle,
int moveOriginatorMessageID) |
protected boolean |
sendOneSOPInstance(Association association,
java.lang.String affectedSOPClass,
java.lang.String affectedSOPInstance,
java.lang.String inputTransferSyntaxUID,
DicomInputStream din,
byte presentationContextID,
java.lang.String outputTransferSyntaxUID) |
protected boolean |
sendOneSOPInstance(Association association,
java.lang.String affectedSOPClass,
java.lang.String affectedSOPInstance,
java.lang.String inputTransferSyntaxUID,
DicomInputStream din,
byte presentationContextID,
java.lang.String outputTransferSyntaxUID,
java.lang.String moveOriginatorApplicationEntityTitle,
int moveOriginatorMessageID) |
getPlausibleStandardSOPClassUIDsForModality, getSetOfStorageSOPClasses, isCompositeInstanceQuery, isCompositeInstanceRetrieve, isCompositeInstanceRetrieveWithGet, isCompositeInstanceRetrieveWithMove, isDICONDEImageStorage, isDICOSImageStorage, isDICOSNonImageStorage, isDirectory, isEncapsulatedDocument, isEnhancedMultiframeImageStorage, isEnhancedMultiframeImageWithPlanePositionOrientationAndMeasuresStorage, isImageStorage, isImageWithFrameOfReferenceStorage, isImageWithSynchronizationStorage, isKeyObjectSelectionDocument, isLegacyConvertedEnhancedImageStorage, isMiscellaneousCompositeNonImageStorage, isMiscellaneousNonCompositeStorage, isMultiframeImageStorage, isMultiframeSecondaryCaptureImageStorage, isNonImageStorage, isOphthalmicMeasurementStorage, isPatientRootCompositeInstanceQuery, isPatientRootCompositeInstanceRetrieve, isPatientRootCompositeInstanceRetrieveWithGet, isPatientRootCompositeInstanceRetrieveWithMove, isPatientStudyOnlyCompositeInstanceQuery, isPatientStudyOnlyCompositeInstanceRetrieve, isPatientStudyOnlyCompositeInstanceRetrieveWithGet, isPatientStudyOnlyCompositeInstanceRetrieveWithMove, isPresentationState, isPrivateImageStorage, isPrivateNonImageStorage, isRadiotherapy, isRawData, isSecondaryCaptureImageStorage, isSpectroscopy, isStandalone, isStandardImageStorage, isStorage, isStructuredReport, isStudyRootCompositeInstanceQuery, isStudyRootCompositeInstanceRetrieve, isStudyRootCompositeInstanceRetrieveWithGet, isStudyRootCompositeInstanceRetrieveWithMove, isTiledImageStorage, isTrialRetiredStructuredReport, isVerification, isWaveform, selectModalityForSOPClass
protected StorageSOPClassSCU() throws DicomNetworkException, DicomException, java.io.IOException
Dummy constructor allows testing subclasses to use different constructor.
DicomNetworkException
DicomException
java.io.IOException
public StorageSOPClassSCU(Association association, SetOfDicomFiles dicomFiles, MultipleInstanceTransferStatusHandler multipleInstanceTransferStatusHandler)
Send the specified instances contained in the files over an existing association.
association
- already existing association to SCPdicomFiles
- the set of DICOM files containing names, SOP Class UIDs, SOP Instance UIDs and optionally Transfer SyntaxesmultipleInstanceTransferStatusHandler
- public StorageSOPClassSCU(Association association, SetOfDicomFiles dicomFiles, MultipleInstanceTransferStatusHandler multipleInstanceTransferStatusHandler, java.lang.String moveOriginatorApplicationEntityTitle, int moveOriginatorMessageID)
Send the specified instances contained in the files over an existing association.
association
- already existing association to SCPdicomFiles
- the set of DICOM files containing names, SOP Class UIDs, SOP Instance UIDs and optionally Transfer SyntaxesmoveOriginatorApplicationEntityTitle
- the AET of the C-MOVE that originated this C-STORE, or null if nonemoveOriginatorMessageID
- the MessageID of the C-MOVE that originated this C-STORE, or -1 if nonepublic StorageSOPClassSCU(java.lang.String hostname, int port, java.lang.String calledAETitle, java.lang.String callingAETitle, int ourMaximumLengthReceived, int socketReceiveBufferSize, int socketSendBufferSize, SetOfDicomFiles dicomFiles, int compressionLevel, MultipleInstanceTransferStatusHandler multipleInstanceTransferStatusHandler)
Establish an association to the specified AE, send the instances contained in the files, and release the association.
hostname
- their hostname or IP addressport
- their portcalledAETitle
- their AE TitlecallingAETitle
- our AE TitleourMaximumLengthReceived
- the maximum PDU length that we will offer to receivesocketReceiveBufferSize
- the TCP socket receive buffer size to set (if possible), 0 means leave at the defaultsocketSendBufferSize
- the TCP socket send buffer size to set (if possible), 0 means leave at the defaultdicomFiles
- the set of DICOM files containing names, SOP Class UIDs, SOP Instance UIDs and optionally Transfer SyntaxescompressionLevel
- 0=none,1=propose deflate,2=propose deflate and bzip2multipleInstanceTransferStatusHandler
- transfer handler for reporting pending status (may be null if not required)public StorageSOPClassSCU(java.lang.String hostname, int port, java.lang.String calledAETitle, java.lang.String callingAETitle, int ourMaximumLengthReceived, int socketReceiveBufferSize, int socketSendBufferSize, SetOfDicomFiles dicomFiles, int compressionLevel, MultipleInstanceTransferStatusHandler multipleInstanceTransferStatusHandler, java.lang.String moveOriginatorApplicationEntityTitle, int moveOriginatorMessageID)
Establish an association to the specified AE, send the instances contained in the files, and release the association.
hostname
- their hostname or IP addressport
- their portcalledAETitle
- their AE TitlecallingAETitle
- our AE TitleourMaximumLengthReceived
- the maximum PDU length that we will offer to receivesocketReceiveBufferSize
- the TCP socket receive buffer size to set (if possible), 0 means leave at the defaultsocketSendBufferSize
- the TCP socket send buffer size to set (if possible), 0 means leave at the defaultdicomFiles
- the set of DICOM files containing names, SOP Class UIDs, SOP Instance UIDs and optionally Transfer SyntaxescompressionLevel
- 0=none,1=propose deflate,2=propose deflate and bzip2multipleInstanceTransferStatusHandler
- transfer handler for reporting pending status (may be null if not required)moveOriginatorApplicationEntityTitle
- the AET of the C-MOVE that originated this C-STORE, or null if nonemoveOriginatorMessageID
- the MessageID of the C-MOVE that originated this C-STORE, or -1 if nonepublic StorageSOPClassSCU(java.lang.String hostname, int port, java.lang.String calledAETitle, java.lang.String callingAETitle, int ourMaximumLengthReceived, int socketReceiveBufferSize, int socketSendBufferSize, java.lang.String fileName, java.lang.String affectedSOPClass, java.lang.String affectedSOPInstance, int compressionLevel) throws DicomNetworkException, DicomException, java.io.IOException
Establish an association to the specified AE, send the instance contained in the file, and release the association.
hostname
- their hostname or IP addressport
- their portcalledAETitle
- their AE TitlecallingAETitle
- our AE TitleourMaximumLengthReceived
- the maximum PDU length that we will offer to receivesocketReceiveBufferSize
- the TCP socket receive buffer size to set (if possible), 0 means leave at the defaultsocketSendBufferSize
- the TCP socket send buffer size to set (if possible), 0 means leave at the defaultfileName
- the name of the file containing the data set to sendaffectedSOPClass
- must be the same as the SOP Class UID contained within the data set, may be null if file has a meta information headeraffectedSOPInstance
- must be the same as the SOP Instance UID contained within the data set, may be null if file has a meta information headercompressionLevel
- 0=none,1=propose deflate,2=propose deflate and bzip2java.io.IOException
DicomException
DicomNetworkException
public StorageSOPClassSCU(java.lang.String hostname, int port, java.lang.String calledAETitle, java.lang.String callingAETitle, int ourMaximumLengthReceived, int socketReceiveBufferSize, int socketSendBufferSize, java.lang.String fileName, java.lang.String affectedSOPClass, java.lang.String affectedSOPInstance, int compressionLevel, java.lang.String moveOriginatorApplicationEntityTitle, int moveOriginatorMessageID) throws DicomNetworkException, DicomException, java.io.IOException
Establish an association to the specified AE, send the instance contained in the file, and release the association.
hostname
- their hostname or IP addressport
- their portcalledAETitle
- their AE TitlecallingAETitle
- our AE TitleourMaximumLengthReceived
- the maximum PDU length that we will offer to receivesocketReceiveBufferSize
- the TCP socket receive buffer size to set (if possible), 0 means leave at the defaultsocketSendBufferSize
- the TCP socket send buffer size to set (if possible), 0 means leave at the defaultfileName
- the name of the file containing the data set to sendaffectedSOPClass
- must be the same as the SOP Class UID contained within the data set, may be null if file has a meta information headeraffectedSOPInstance
- must be the same as the SOP Instance UID contained within the data set, may be null if file has a meta information headercompressionLevel
- 0=none,1=propose deflate,2=propose deflate and bzip2moveOriginatorApplicationEntityTitle
- the AET of the C-MOVE that originated this C-STORE, or null if nonemoveOriginatorMessageID
- the MessageID of the C-MOVE that originated this C-STORE, or -1 if nonejava.io.IOException
DicomException
DicomNetworkException
public StorageSOPClassSCU(java.lang.String hostname, int port, java.lang.String calledAETitle, java.lang.String callingAETitle, SetOfDicomFiles dicomFiles, int compressionLevel, MultipleInstanceTransferStatusHandler multipleInstanceTransferStatusHandler)
Establish an association to the specified AE, send the instances contained in the files, and release the association.
hostname
- their hostname or IP addressport
- their portcalledAETitle
- their AE TitlecallingAETitle
- our AE TitledicomFiles
- the set of DICOM files containing names, SOP Class UIDs, SOP Instance UIDs and optionally Transfer SyntaxescompressionLevel
- 0=none,1=propose deflate,2=propose deflate and bzip2multipleInstanceTransferStatusHandler
- transfer handler for reporting pending status (may be null if not required)public StorageSOPClassSCU(java.lang.String hostname, int port, java.lang.String calledAETitle, java.lang.String callingAETitle, SetOfDicomFiles dicomFiles, int compressionLevel, MultipleInstanceTransferStatusHandler multipleInstanceTransferStatusHandler, java.lang.String moveOriginatorApplicationEntityTitle, int moveOriginatorMessageID)
Establish an association to the specified AE, send the instances contained in the files, and release the association.
hostname
- their hostname or IP addressport
- their portcalledAETitle
- their AE TitlecallingAETitle
- our AE TitledicomFiles
- the set of DICOM files containing names, SOP Class UIDs, SOP Instance UIDs and optionally Transfer SyntaxescompressionLevel
- 0=none,1=propose deflate,2=propose deflate and bzip2multipleInstanceTransferStatusHandler
- transfer handler for reporting pending status (may be null if not required)moveOriginatorApplicationEntityTitle
- the AET of the C-MOVE that originated this C-STORE, or null if nonemoveOriginatorMessageID
- the MessageID of the C-MOVE that originated this C-STORE, or -1 if nonepublic StorageSOPClassSCU(java.lang.String hostname, int port, java.lang.String calledAETitle, java.lang.String callingAETitle, java.lang.String fileName, java.lang.String affectedSOPClass, java.lang.String affectedSOPInstance, int compressionLevel) throws DicomNetworkException, DicomException, java.io.IOException
Establish an association to the specified AE, send the instance contained in the file, and release the association.
hostname
- their hostname or IP addressport
- their portcalledAETitle
- their AE TitlecallingAETitle
- our AE TitlefileName
- the name of the file containing the data set to sendaffectedSOPClass
- must be the same as the SOP Class UID contained within the data set, may be null if file has a meta information headeraffectedSOPInstance
- must be the same as the SOP Instance UID contained within the data set, may be null if file has a meta information headercompressionLevel
- 0=none,1=propose deflate,2=propose deflate and bzip2java.io.IOException
DicomException
DicomNetworkException
public StorageSOPClassSCU(java.lang.String hostname, int port, java.lang.String calledAETitle, java.lang.String callingAETitle, java.lang.String fileName, java.lang.String affectedSOPClass, java.lang.String affectedSOPInstance, int compressionLevel, java.lang.String moveOriginatorApplicationEntityTitle, int moveOriginatorMessageID) throws DicomNetworkException, DicomException, java.io.IOException
Establish an association to the specified AE, send the instance contained in the file, and release the association.
hostname
- their hostname or IP addressport
- their portcalledAETitle
- their AE TitlecallingAETitle
- our AE TitlefileName
- the name of the file containing the data set to sendaffectedSOPClass
- must be the same as the SOP Class UID contained within the data set, may be null if file has a meta information headeraffectedSOPInstance
- must be the same as the SOP Instance UID contained within the data set, may be null if file has a meta information headercompressionLevel
- 0=none,1=propose deflate,2=propose deflate and bzip2moveOriginatorApplicationEntityTitle
- the AET of the C-MOVE that originated this C-STORE, or null if nonemoveOriginatorMessageID
- the MessageID of the C-MOVE that originated this C-STORE, or -1 if nonejava.io.IOException
DicomException
DicomNetworkException
public boolean encounteredTrappedExceptions()
public static void main(java.lang.String[] arg)
For testing, establish an association to the specified AE and send one or more DICOM instances (C-STORE requests).
arg
- array of five, six, seven or eight strings - their hostname, their port, their AE Title, our AE Title,
the filename containing the instance to send (or a hyphen '-' if a list of one or more filenames is to be read from stdin)
optionally the SOP Class and the SOP Instance (otherwise will be read from the file(s); if multiple files use an empty string for the SOP Instance),
the compression level (0=none,1=propose deflate,2=propose deflate and bzip2)protected void sendMultipleSOPInstances(Association association, AttributeList[] lists, MultipleInstanceTransferStatusHandler multipleInstanceTransferStatusHandler, java.lang.String moveOriginatorApplicationEntityTitle, int moveOriginatorMessageID) throws AReleaseException, DicomNetworkException, java.io.IOException
Send the specified instances contained in the attribute lists over an existing association.
association
- already existing association to SCPlists
- the array of attribute lists to sendmultipleInstanceTransferStatusHandler
- handler called after each transfer (may be null if not required)moveOriginatorApplicationEntityTitle
- the AET of the C-MOVE that originated this C-STORE, or null if nonemoveOriginatorMessageID
- the MessageID of the C-MOVE that originated this C-STORE, or -1 if noneAReleaseException
DicomNetworkException
java.io.IOException
protected void sendMultipleSOPInstances(Association association, SetOfDicomFiles dicomFiles, MultipleInstanceTransferStatusHandler multipleInstanceTransferStatusHandler, java.lang.String moveOriginatorApplicationEntityTitle, int moveOriginatorMessageID) throws AReleaseException, DicomNetworkException, java.io.IOException
Send the specified instances contained in the files over an existing association.
association
- already existing association to SCPdicomFiles
- the set of DICOM files containing names, SOP Class UIDs, SOP Instance UIDs and optionally Transfer SyntaxesmultipleInstanceTransferStatusHandler
- handler called after each transfer (may be null if not required)moveOriginatorApplicationEntityTitle
- the AET of the C-MOVE that originated this C-STORE, or null if nonemoveOriginatorMessageID
- the MessageID of the C-MOVE that originated this C-STORE, or -1 if noneAReleaseException
DicomNetworkException
java.io.IOException
protected boolean sendOneSOPInstance(Association association, java.lang.String affectedSOPClass, java.lang.String affectedSOPInstance, AttributeList list, byte presentationContextID, java.lang.String outputTransferSyntaxUID, java.lang.String moveOriginatorApplicationEntityTitle, int moveOriginatorMessageID) throws AReleaseException, DicomNetworkException, DicomException, java.io.IOException
association
- affectedSOPClass
- affectedSOPInstance
- list
- presentationContextID
- outputTransferSyntaxUID
- moveOriginatorApplicationEntityTitle
- the AET of the C-MOVE that originated this C-STORE, or null if nonemoveOriginatorMessageID
- the MessageID of the C-MOVE that originated this C-STORE, or -1 if nonejava.io.IOException
DicomException
DicomNetworkException
AReleaseException
protected boolean sendOneSOPInstance(Association association, java.lang.String affectedSOPClass, java.lang.String affectedSOPInstance, java.lang.String inputTransferSyntaxUID, DicomInputStream din, byte presentationContextID, java.lang.String outputTransferSyntaxUID) throws AReleaseException, DicomNetworkException, DicomException, java.io.IOException
association
- affectedSOPClass
- affectedSOPInstance
- inputTransferSyntaxUID
- din
- presentationContextID
- outputTransferSyntaxUID
- java.io.IOException
DicomException
DicomNetworkException
AReleaseException
protected boolean sendOneSOPInstance(Association association, java.lang.String affectedSOPClass, java.lang.String affectedSOPInstance, java.lang.String inputTransferSyntaxUID, DicomInputStream din, byte presentationContextID, java.lang.String outputTransferSyntaxUID, java.lang.String moveOriginatorApplicationEntityTitle, int moveOriginatorMessageID) throws AReleaseException, DicomNetworkException, DicomException, java.io.IOException
association
- affectedSOPClass
- affectedSOPInstance
- inputTransferSyntaxUID
- din
- presentationContextID
- outputTransferSyntaxUID
- moveOriginatorApplicationEntityTitle
- the AET of the C-MOVE that originated this C-STORE, or null if nonemoveOriginatorMessageID
- the MessageID of the C-MOVE that originated this C-STORE, or -1 if nonejava.io.IOException
DicomException
DicomNetworkException
AReleaseException