com.pixelmed.network
Class StorageSOPClassSCP

java.lang.Object
  extended by com.pixelmed.dicom.SOPClass
      extended by com.pixelmed.network.StorageSOPClassSCP
All Implemented Interfaces:
Runnable

public class StorageSOPClassSCP
extends SOPClass
implements Runnable

This class implements the SCP role of SOP Classes of the Storage Service Class, the Study Root Query Retrieve Information Model Find, Get and Move SOP Classes, and the Verification SOP Class.

The class has a constructor and a run() method. The constructor is passed a socket on which has been received a transport connection open indication. The run() method waits for an association to be initiated (i.e. acts as an association acceptor), then waits for storage or verification commands, storing data sets in Part 10 files in the specified folder.

Debugging messages with a varying degree of verbosity can be activated.

This class is not normally used directly, but rather is instantiated by the StorageSOPClassSCPDispatcher, which takes care of listening for transport connection open indications, and creates new threads and starts them to handle each incoming association request.

See Also:
StorageSOPClassSCPDispatcher

Field Summary
protected  StoredFilePathStrategy storedFilePathStrategy
           
 
Fields inherited from class com.pixelmed.dicom.SOPClass
AmbulatoryECGStorage, arrayOfQuerySOPClasses, arrayOfRetrieveWithGetSOPClasses, arrayOfRetrieveWithMoveSOPClasses, arrayOfStorageSOPClasses, ArterialPulseWaveformStorage, AutorefractionMeasurementsStorage, BasicStructuredDisplayStorage, BasicTextSRStorage, BasicVoiceStorage, BlendingSoftcopyPresentationStateStorage, BreastTomosynthesisImageStorage, CardiacElectrophysiologyWaveformStorage, ChestCADSRStorage, ColonCADSRStorage, ColorPaletteInformationModelFind, ColorPaletteInformationModelGet, ColorPaletteInformationModelMove, ColorPaletteStorage, ColorSoftcopyPresentationStateStorage, Comprehensive3DSRStorage, ComprehensiveSRStorage, ComputedRadiographyImageStorage, CTImageStorage, DeformableSpatialRegistrationStorage, DICOS2DAITStorage, DICOS3DAITStorage, DICOSCTImageStorage, DICOSDigitalXRayImageStorageForPresentation, DICOSDigitalXRayImageStorageForProcessing, DICOSQuadrupoleResonanceStorage, DICOSThreatDetectionReportStorage, DigitalIntraoralXRayImageStorageForPresentation, DigitalIntraoralXRayImageStorageForProcessing, DigitalMammographyXRayImageStorageForPresentation, DigitalMammographyXRayImageStorageForProcessing, DigitalXRayImageStorageForPresentation, DigitalXRayImageStorageForProcessing, EncapsulatedCDAStorage, EncapsulatedPDFStorage, EnhancedCTImageStorage, EnhancedMRColorImageStorage, EnhancedMRImageStorage, EnhancedPETImageStorage, EnhancedSRStorage, EnhancedUSVolumeStorage, EnhancedXAImageStorage, EnhancedXRFImageStorage, GeneralAudioWaveformStorage, GeneralECGStorage, GenericImplantTemplateStorage, GrayscaleSoftcopyPresentationStateStorage, HemodynamicWaveformStorage, ImplantAssemblyTemplateStorage, ImplantationPlanSRStorage, ImplantTemplateGroupStorage, IntraocularLensCalculationsStorage, IVOCTImageStorageForPresentation, IVOCTImageStorageForProcessing, KeratometryMeasurementsStorage, KeyObjectSelectionDocumentStorage, LensometryMeasurementsStorage, MacularGridThicknessAndVolumeReportStorage, MammographyCADSRStorage, MediaStorageDirectoryStorage, MRImageStorage, MRSpectroscopyStorage, MultiframeGrayscaleByteSecondaryCaptureImageStorage, MultiframeGrayscaleWordSecondaryCaptureImageStorage, MultiframeSingleBitSecondaryCaptureImageStorage, MultiframeTrueColorSecondaryCaptureImageStorage, NuclearMedicineImageStorage, NuclearMedicineImageStorageRetired, OphthalmicAxialMeasurementsStorage, OphthalmicPhotography16BitImageStorage, OphthalmicPhotography8BitImageStorage, OphthalmicThicknessMapStorage, OphthalmicTomographyImageStorage, OphthalmicVisualFieldStaticPerimetryMeasurementsStorage, PatientRootQueryRetrieveInformationModelFind, PatientRootQueryRetrieveInformationModelGet, PatientRootQueryRetrieveInformationModelMove, PatientStudyOnlyQueryRetrieveInformationModelFind, PatientStudyOnlyQueryRetrieveInformationModelGet, PatientStudyOnlyQueryRetrieveInformationModelMove, PETImageStorage, PrivateFujiCRImageStorage, PrivateGE3DModelStorage, PrivateGECollageStorage, PrivateGEeNTEGRAProtocolOrNMGenieStorage, PrivateGEPETRawDataStorage, PrivatePhilips3DObject2Storage, PrivatePhilips3DObjectStorage, PrivatePhilips3DPresentationStateStorage, PrivatePhilipsCompositeObjectStorage, PrivatePhilipsCTSyntheticImageStorage, PrivatePhilipsCXImageStorage, PrivatePhilipsCXSyntheticImageStorage, PrivatePhilipsLiveRunStorage, PrivatePhilipsMRCardio2Storage, PrivatePhilipsMRCardioAnalysis2Storage, PrivatePhilipsMRCardioAnalysisStorage, PrivatePhilipsMRCardioProfileStorage, PrivatePhilipsMRCardioStorage, PrivatePhilipsMRColorImageStorage, PrivatePhilipsMRExamcardStorage, PrivatePhilipsMRSeriesDataStorage, PrivatePhilipsMRSpectrumStorage, PrivatePhilipsMRSyntheticImageStorage, PrivatePhilipsPerfusionImageStorage, PrivatePhilipsPerfusionStorage, PrivatePhilipsPrivateXRayMFStorage, PrivatePhilipsReconstructionStorage, PrivatePhilipsRunStorage, PrivatePhilipsSpecialisedXAStorage, PrivatePhilipsSurface2Storage, PrivatePhilipsSurfaceStorage, PrivatePhilipsVolume2Storage, PrivatePhilipsVolumeSetStorage, PrivatePhilipsVolumeStorage, PrivatePhilipsVRMLStorage, PrivatePixelMedLegacyConvertedEnhancedCTImageStorage, PrivatePixelMedLegacyConvertedEnhancedMRImageStorage, PrivatePixelMedLegacyConvertedEnhancedPETImageStorage, PrivatePixelMedLegacyFloatingPointImageStorage, PrivatePMODMultiframeImageStorage, PrivateSiemensCSANonImageStorage, ProcedureLogStorage, PseudoColorSoftcopyPresentationStateStorage, RawDataStorage, RealWorldValueMappingStorage, RespiratoryWaveformStorage, RTBeamsDeliveryInstructionStorage, RTBeamsDeliveryInstructionStorageTrial, RTBeamsTreatmentRecordStorage, RTBrachyTreatmentRecordStorage, RTDoseStorage, RTImageStorage, RTIonBeamsTreatmentRecordStorage, RTIonPlanStorage, RTPlanStorage, RTStructureSetStorage, RTTreatmentSummaryRecordStorage, SecondaryCaptureImageStorage, SegmentationStorage, SpatialFiducialsStorage, SpatialRegistrationStorage, SpectaclePrescriptionReportStorage, StandaloneCurveStorage, StandaloneModalityLUTStorage, StandaloneOverlayStorage, StandalonePETCurveStorage, StandaloneVOILUTStorage, StereometricRelationshipStorage, StudyRootQueryRetrieveInformationModelFind, StudyRootQueryRetrieveInformationModelGet, StudyRootQueryRetrieveInformationModelMove, SubjectiveRefractionMeasurementsStorage, SurfaceScanMeshStorage, SurfaceScanPointCloudStorage, SurfaceSegmentationStorage, TwelveLeadECGStorage, UltrasoundImageStorage, UltrasoundImageStorageRetired, UltrasoundMultiframeImageStorage, UltrasoundMultiframeImageStorageRetired, Verification, VideoEndoscopicImageStorage, VideoMicroscopicImageStorage, VideoPhotographicImageStorage, VisibleLightDraftImageStorage, VisibleLightEndoscopicImageStorage, VisibleLightMicroscopicImageStorage, VisibleLightMultiFrameDraftImageStorage, VisibleLightPhotographicImageStorage, VisibleLightSlideCoordinatesMicroscopicImageStorage, VisualAcuityMeasurementsStorage, VLWholeSlideMicroscopyImageStorage, XAXRFGrayscaleSoftcopyPresentationStateStorage, XRay3DAngiographicImageStorage, XRay3DCraniofacialImageStorage, XRayAngiographicBiplaneImageStorage, XRayAngiographicImageStorage, XRayRadiationDoseSRStorage, XRayRadioFlouroscopicImageStorage
 
Constructor Summary
StorageSOPClassSCP(Socket socket, String calledAETitle, int ourMaximumLengthReceived, int socketReceiveBufferSize, int socketSendBufferSize, File savedImagesFolder, StoredFilePathStrategy storedFilePathStrategy, ReceivedObjectHandler receivedObjectHandler, AssociationStatusHandler associationStatusHandler, QueryResponseGeneratorFactory queryResponseGeneratorFactory, RetrieveResponseGeneratorFactory retrieveResponseGeneratorFactory, ApplicationEntityMap applicationEntityMap, PresentationContextSelectionPolicy presentationContextSelectionPolicy, int debugLevel)
          Construct an instance of an association acceptor and storage, query, retrieve and verification SCP to be passed to the constructor of a thread that will be started.
 
Method Summary
 void run()
          Waits for an association to be initiated (acts as an association acceptor), then waits for storage or verification commands, storing data sets in Part 10 files in the specified folder, until the association is released or the transport connection closes.
 
Methods inherited from class com.pixelmed.dicom.SOPClass
getPlausibleStandardSOPClassUIDsForModality, getSetOfStorageSOPClasses, isCompositeInstanceQuery, isCompositeInstanceRetrieve, isCompositeInstanceRetrieveWithGet, isCompositeInstanceRetrieveWithMove, isDICOSImageStorage, isDICOSNonImageStorage, isDirectory, isEncapsulatedDocument, isEnhancedMultiframeImageStorage, isEnhancedMultiframeImageWithPlanePositionOrientationAndMeasuresStorage, isImageStorage, isKeyObjectSelectionDocument, isMiscellaneousCompositeNonImageStorage, isMiscellaneousNonCompositeStorage, 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, isVerification, isWaveform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

storedFilePathStrategy

protected StoredFilePathStrategy storedFilePathStrategy
Constructor Detail

StorageSOPClassSCP

public StorageSOPClassSCP(Socket socket,
                          String calledAETitle,
                          int ourMaximumLengthReceived,
                          int socketReceiveBufferSize,
                          int socketSendBufferSize,
                          File savedImagesFolder,
                          StoredFilePathStrategy storedFilePathStrategy,
                          ReceivedObjectHandler receivedObjectHandler,
                          AssociationStatusHandler associationStatusHandler,
                          QueryResponseGeneratorFactory queryResponseGeneratorFactory,
                          RetrieveResponseGeneratorFactory retrieveResponseGeneratorFactory,
                          ApplicationEntityMap applicationEntityMap,
                          PresentationContextSelectionPolicy presentationContextSelectionPolicy,
                          int debugLevel)
                   throws DicomNetworkException,
                          DicomException,
                          IOException

Construct an instance of an association acceptor and storage, query, retrieve and verification SCP to be passed to the constructor of a thread that will be started.

Parameters:
socket - the socket on which a transport connection open indication has been received
calledAETitle - our AE Title
ourMaximumLengthReceived - the maximum PDU length that we will offer to receive
socketReceiveBufferSize - the TCP socket receive buffer size to set (if possible), 0 means leave at the default
socketSendBufferSize - the TCP socket send buffer size to set (if possible), 0 means leave at the default
savedImagesFolder - the folder in which to store received data sets (may be null, to ignore received data for testing)
storedFilePathStrategy - the strategy to use for naming received files and folders
receivedObjectHandler - the handler to call after each data set has been received and stored
associationStatusHandler - the handler to call when the Association is closed
queryResponseGeneratorFactory - a factory to make handlers to generate query responses from a supplied query message
retrieveResponseGeneratorFactory - a factory to make handlers to generate retrieve responses from a supplied retrieve message
applicationEntityMap - a map of application entity titles to presentation addresses
presentationContextSelectionPolicy - which SOP Classes and Transfer Syntaxes to accept and reject
debugLevel - zero for no debugging messages, higher values more verbose messages
Throws:
IOException
DicomException
DicomNetworkException
Method Detail

run

public void run()

Waits for an association to be initiated (acts as an association acceptor), then waits for storage or verification commands, storing data sets in Part 10 files in the specified folder, until the association is released or the transport connection closes.

Specified by:
run in interface Runnable