public class GetSOPClassSCU extends SOPClass
This class implements the SCU role of C-GET SOP Classes.
The class has no methods other than the constructor (and a main method for testing). The
constructor establishes an association, sends the C-GET request, and releases the
association. Any identifiers received are handled by the supplied
IdentifierHandler
. Any objects received are handled by the supplied
ReceivedObjectHandler
.
Note the need to supply a list of supported Storage SOP Classes to be negotiated during association establishment - if the list is known a priori it should be supplied, otherwise a list of all known SOP Classes can be supplied; however, since the latter is rather large it can easily exceed the maximum number of presentation contexts allowed by the standard (128), hence considerable control is provided over the number of transfer syntaxes proposed, should it be necessary; when in doubt allow the SCP to choose from a list of multiple transfer syntaxes for each abstract syntax which consumes only a single presentation context.
Debugging messages with a varying degree of verbosity can be activated.
The main method is also useful in its own right as a command-line utility, which will store requested files in a specified directory.
For example, to have GETSCU command GETSCP to get a single image instance of unknown SOP Class to GETSCU using the transfer syntax of the SCP's choice:
try { AttributeList identifier = new AttributeList(); { AttributeTag t = TagFromName.QueryRetrieveLevel; Attribute a = new CodeStringAttribute(t); a.addValue("IMAGE"); identifier.put(t,a); } { AttributeTag t = TagFromName.StudyInstanceUID; Attribute a = new UniqueIdentifierAttribute(t); a.addValue("1.3.6.1.4.1.5962.1.2.0.1064923879.2077.3232235877"); identifier.put(t,a); } { AttributeTag t = TagFromName.SeriesInstanceUID; Attribute a = new UniqueIdentifierAttribute(t); a.addValue("1.3.6.1.4.1.5962.1.3.0.0.1064923879.2077.3232235877"); identifier.put(t,a); } { AttributeTag t = TagFromName.SOPInstanceUID; Attribute a = new UniqueIdentifierAttribute(t); a.addValue("1.3.6.1.4.1.5962.1.1.0.0.0.1064923879.2077.3232235877"); identifier.put(t,a); } new GetSOPClassSCU("theirhost","104","GETSCP","GETSCU",SOPClass.StudyRootQueryRetrieveInformationModelGet,identifier,new IdentifierHandler(),"/tmp",new OurReceivedObjectHandler(),SOPClass.getSetOfStorageSOPClasses(),true,false,false,1); } catch (Exception e) { slf4jlogger.error("",e); }
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
Constructor and Description |
---|
GetSOPClassSCU(java.lang.String hostname,
int port,
java.lang.String calledAETitle,
java.lang.String callingAETitle,
java.lang.String affectedSOPClass,
AttributeList identifier,
IdentifierHandler identifierHandler,
java.io.File savedImagesFolder,
StoredFilePathStrategy storedFilePathStrategy,
ReceivedObjectHandler receivedObjectHandler,
java.util.Set setOfStorageSOPClasses,
boolean theirChoice,
boolean ourChoice,
boolean asEncoded)
Perform a C-GET.
|
GetSOPClassSCU(java.lang.String hostname,
int port,
java.lang.String calledAETitle,
java.lang.String callingAETitle,
java.lang.String affectedSOPClass,
AttributeList identifier,
IdentifierHandler identifierHandler,
java.io.File savedImagesFolder,
StoredFilePathStrategy storedFilePathStrategy,
ReceivedObjectHandler receivedObjectHandler,
java.util.Set setOfStorageSOPClasses,
int compressionLevel,
boolean theirChoice,
boolean ourChoice,
boolean asEncoded)
Perform a C-GET.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] arg)
For testing, establish an association to the specified AE and perform a retrieve using a C-GET request.
|
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
public GetSOPClassSCU(java.lang.String hostname, int port, java.lang.String calledAETitle, java.lang.String callingAETitle, java.lang.String affectedSOPClass, AttributeList identifier, IdentifierHandler identifierHandler, java.io.File savedImagesFolder, StoredFilePathStrategy storedFilePathStrategy, ReceivedObjectHandler receivedObjectHandler, java.util.Set setOfStorageSOPClasses, boolean theirChoice, boolean ourChoice, boolean asEncoded) throws DicomNetworkException, DicomException, java.io.IOException
Perform a C-GET.
Uses compressionLevel of 0 for generation of Presentation Contexts (i.e., propose only standard uncompressed Transfer Syntaxes)
hostname
- their hostname or IP addressport
- their portcalledAETitle
- their AE TitlecallingAETitle
- our AE TitleaffectedSOPClass
- the SOP Class defining which query model, e.g. SOPClass.StudyRootQueryRetrieveInformationModelGet
identifier
- the list of unique keys and move levelidentifierHandler
- the handler to use for each returned identifiersavedImagesFolder
- 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 foldersreceivedObjectHandler
- the handler to call after each data set has been received and storedsetOfStorageSOPClasses
- the Set
of Storage SOP Class UIDs (as String
) that are acceptabletheirChoice
- propose a single presentation context with all transfer syntaxes to allow them to chooseourChoice
- propose separate presentation contexts for each transfer syntax to allow us to chooseasEncoded
- propose a separate presentation context for the specified transfer syntax in which the data set is known to be encodedjava.io.IOException
DicomException
DicomNetworkException
public GetSOPClassSCU(java.lang.String hostname, int port, java.lang.String calledAETitle, java.lang.String callingAETitle, java.lang.String affectedSOPClass, AttributeList identifier, IdentifierHandler identifierHandler, java.io.File savedImagesFolder, StoredFilePathStrategy storedFilePathStrategy, ReceivedObjectHandler receivedObjectHandler, java.util.Set setOfStorageSOPClasses, int compressionLevel, boolean theirChoice, boolean ourChoice, boolean asEncoded) throws DicomNetworkException, DicomException, java.io.IOException
Perform a C-GET.
hostname
- their hostname or IP addressport
- their portcalledAETitle
- their AE TitlecallingAETitle
- our AE TitleaffectedSOPClass
- the SOP Class defining which query model, e.g. SOPClass.StudyRootQueryRetrieveInformationModelGet
identifier
- the list of unique keys and move levelidentifierHandler
- the handler to use for each returned identifiersavedImagesFolder
- 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 foldersreceivedObjectHandler
- the handler to call after each data set has been received and storedsetOfStorageSOPClasses
- the Set
of Storage SOP Class UIDs (as String
) that are acceptablecompressionLevel
- 0=none,1=propose deflate,2=propose deflate and bzip2,3=propose all known lossless,4-all propose all known lossless and lossytheirChoice
- propose a single presentation context with all transfer syntaxes to allow them to chooseourChoice
- propose separate presentation contexts for each transfer syntax to allow us to chooseasEncoded
- propose a separate presentation context for the specified transfer syntax in which the data set is known to be encodedjava.io.IOException
DicomException
DicomNetworkException
public static void main(java.lang.String[] arg)
For testing, establish an association to the specified AE and perform a retrieve using a C-GET request.
arg
- array of seven, eight or nine strings - their hostname, their port, their AE Title, our AE Title, the directory in which to store the incoming files,
the retrieve level (STUDY, SERIES or IMAGE), then the Study Instance UID,
optionally the Series Instance UID (if SERIES) and optionally the SOP Instance UID (if IMAGE)