we have setup a dcm4chee over the network.here is the list of AE title
we have setup a dcm4chee over the network.here is the list of AE title
the findsuc command is working find but i amfacing issue with store scu here are my commands
findscu -aet MyAET -aec WORKLIST -v -k 0008,0060=OPV -k 0010,0010 -k 0010,0020 -k 0010,0030 -k 0010,0040 -k 0020,000D -k 0008,0020 -k 0008,0030 -k 0008,0050 -k 0008,1030 -k 0020,0010 -k 0008,0090 -k 0040,0100 myserverAddress 11112 +sr
here is my store scu command
storescu -v -aet WORKLIST -aec STORESCP myserveraddress 11112 /Users/Shoaib/Downloads/example.dcm
gettting this
I: checking input files ...
I: Requesting Association
F: Association Rejected:
F: Result: Rejected Permanent, Source: Service User
F: Reason: Called AE Title Not Recognized
my question do i need add this AE title ? if yes what will be the configurations? or there is issue with command itself?
plus with code i am doing something like this
public static void storedf() throws IOException,
InterruptedException, IncompatibleConnectionException, GeneralSecurityException {
// Create DICOM dataset
Attributes dataset = new Attributes();
dataset.setString(Tag.PatientName, VR.PN, "SMITHJANE");
dataset.setString(Tag.PatientID, VR.LO, "M6789");
dataset.setString(Tag.StudyInstanceUID, VR.UI, UIDUtils.createUID());
dataset.setString(Tag.SeriesInstanceUID, VR.UI, UIDUtils.createUID());
dataset.setString(Tag.SOPInstanceUID, VR.UI, UIDUtils.createUID());
dataset.setString(Tag.ScheduledProcedureStepID, VR.SH, "SCHEDULED_PROCEDURE_STEP_ID_2");
// Save dataset to DICOM file
File dicomFile = new File("output.dcm");
try (DicomOutputStream dos = new DicomOutputStream(dicomFile)) {
dos.writeDataset(null, dataset);
}
// Configure the DICOM client
Device device = new Device("storescu");
ApplicationEntity ae = new ApplicationEntity("STORESCU");
device.addApplicationEntity(ae);
device.setExecutor(Executors.newCachedThreadPool());
device.setScheduledExecutor(Executors.newSingleThreadScheduledExecutor());
// Configure local connection for STORESCU
Connection localConnection = new Connection();
localConnection.setHostname("127.0.0.1");
localConnection.setPort(7030); // Ensure this port is not used by another application
device.addConnection(localConnection);
ae.addConnection(localConnection);
// Configure remote connection for STORESCP
Connection remoteConnection = new Connection();
remoteConnection.setHostname("myserveraddress");
remoteConnection.setPort(11117); // Use the correct port for STORESCP
// Create A-ASSOCIATE-RQ
AAssociateRQ rq = new AAssociateRQ();
rq.addPresentationContext(new PresentationContext(1, UID.SecondaryCaptureImageStorage, UID.ImplicitVRLittleEndian));
// Create Association
Association association = ae.connect( remoteConnection, rq);
// Send C-STORE request
association.cstore(UID.SecondaryCaptureImageStorage, dataset.getString(Tag.SOPInstanceUID), 0, new DataWriterAdapter(dataset), UID.ImplicitVRLittleEndian);
// Release the association
association.release();
}
getting this error
Initiate connection from /127.0.0.1:0 to ec2-13-57-52-2.us-west-1.compute.amazonaws.com:11117
java.net.BindException: Can't assign requested address
at java.base/sun.nio.ch.Net.connect0(Native Method)
at java.base/sun.nio.ch.Net.connect(Net.java:589)
at java.base/sun.nio.ch.Net.connect(Net.java:578)
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:583)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
at java.base/java.net.Socket.connect(Socket.java:752)
at org.dcm4che3.net.Connection.connect(Connection.java:1047)
at org.dcm4che3.net.ApplicationEntity.connect(ApplicationEntity.java:629)
at org.dcm4che3.net.ApplicationEntity.connect(ApplicationEntity.java:649)
at DMWLUtil.storedf(DMWLUtil.java:181) at Main.main(Main.java:55)the findsuc command is working find but i amfacing issue with store scu here are my commands
findscu -aet MyAET -aec WORKLIST -v -k 0008,0060=OPV -k 0010,0010 -k 0010,0020 -k 0010,0030 -k 0010,0040 -k 0020,000D -k 0008,0020 -k 0008,0030 -k 0008,0050 -k 0008,1030 -k 0020,0010 -k 0008,0090 -k 0040,0100 myserverAddress 11112 +sr
here is my store scu command
storescu -v -aet WORKLIST -aec STORESCP myserveraddress 11112 /Users/Shoaib/Downloads/example.dcm
gettting this
I: checking input files ...
I: Requesting Association
F: Association Rejected:
F: Result: Rejected Permanent, Source: Service User
F: Reason: Called AE Title Not Recognized
my question do i need add this AE title ? if yes what will be the configurations? or there is issue with command itself?
plus with code i am doing something like this
public static void storedf() throws IOException,
InterruptedException, IncompatibleConnectionException, GeneralSecurityException {
// Create DICOM dataset
Attributes dataset = new Attributes();
dataset.setString(Tag.PatientName, VR.PN, "SMITHJANE");
dataset.setString(Tag.PatientID, VR.LO, "M6789");
dataset.setString(Tag.StudyInstanceUID, VR.UI, UIDUtils.createUID());
dataset.setString(Tag.SeriesInstanceUID, VR.UI, UIDUtils.createUID());
dataset.setString(Tag.SOPInstanceUID, VR.UI, UIDUtils.createUID());
dataset.setString(Tag.ScheduledProcedureStepID, VR.SH, "SCHEDULED_PROCEDURE_STEP_ID_2");
// Save dataset to DICOM file
File dicomFile = new File("output.dcm");
try (DicomOutputStream dos = new DicomOutputStream(dicomFile)) {
dos.writeDataset(null, dataset);
}
// Configure the DICOM client
Device device = new Device("storescu");
ApplicationEntity ae = new ApplicationEntity("STORESCU");
device.addApplicationEntity(ae);
device.setExecutor(Executors.newCachedThreadPool());
device.setScheduledExecutor(Executors.newSingleThreadScheduledExecutor());
// Configure local connection for STORESCU
Connection localConnection = new Connection();
localConnection.setHostname("127.0.0.1");
localConnection.setPort(7030); // Ensure this port is not used by another application
device.addConnection(localConnection);
ae.addConnection(localConnection);
// Configure remote connection for STORESCP
Connection remoteConnection = new Connection();
remoteConnection.setHostname("myserveraddress");
remoteConnection.setPort(11117); // Use the correct port for STORESCP
// Create A-ASSOCIATE-RQ
AAssociateRQ rq = new AAssociateRQ();
rq.addPresentationContext(new PresentationContext(1, UID.SecondaryCaptureImageStorage, UID.ImplicitVRLittleEndian));
// Create Association
Association association = ae.connect( remoteConnection, rq);
// Send C-STORE request
association.cstore(UID.SecondaryCaptureImageStorage, dataset.getString(Tag.SOPInstanceUID), 0, new DataWriterAdapter(dataset), UID.ImplicitVRLittleEndian);
// Release the association
association.release();
}
getting this error
Initiate connection from /127.0.0.1:0 to ec2-13-57-52-2.us-west-1.compute.amazonaws.com:11117
java.net.BindException: Can't assign requested address
at java.base/sun.nio.ch.Net.connect0(Native Method)
at java.base/sun.nio.ch.Net.connect(Net.java:589)
at java.base/sun.nio.ch.Net.connect(Net.java:578)
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:583)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
at java.base/java.net.Socket.connect(Socket.java:752)
at org.dcm4che3.net.Connection.connect(Connection.java:1047)
at org.dcm4che3.net.ApplicationEntity.connect(ApplicationEntity.java:629)
at org.dcm4che3.net.ApplicationEntity.connect(ApplicationEntity.java:649)
at DMWLUtil.storedf(DMWLUtil.java:181)
at Main.main(Main.java:55)