Examples of DicomServiceException


Examples of org.dcm4che3.net.service.DicomServiceException

                    Attributes.createFileMetaInformation(iuid, cuid,
                            UID.ExplicitVRLittleEndian),
                    eventInfo);
        } catch (IOException e) {
            LOG.warn(as + ": Failed to store Storage Commitment Result:", e);
            throw new DicomServiceException(Status.ProcessingFailure, e);
        } finally {
            SafeClose.close(out);
        }
        return null;
    }
View Full Code Here

Examples of org.dcm4che3.net.service.DicomServiceException

    @Override
    public void process(Exchange exchange) throws Exception {
        DicomMessage in = exchange.getIn(DicomMessage.class);
        Dimse dimse = in.getHeader("dimse", Dimse.class);
        if (dimse != Dimse.C_ECHO_RQ)
            throw new DicomServiceException(Status.UnrecognizedOperation);
        DicomMessage out = new DicomMessage(
                Dimse.C_ECHO_RSP,
                Commands.mkEchoRSP(in.getCommand(), Status.Success));
        exchange.setOut(out);
    }
View Full Code Here

Examples of org.dcm4che3.net.service.DicomServiceException

        @Override
        public void done(boolean doneSync) {
            Attributes cmd;
            Attributes data;
            if (exchange.getException() != null) {
                DicomServiceException dse;
                Exception ex = exchange.getException();
                if (ex instanceof DicomServiceException) {
                    dse = (DicomServiceException) ex;
                } else {
                    dse = new DicomServiceException(Status.ProcessingFailure, ex);
                }
                cmd = dse.mkRSP(dimse.commandFieldOfRSP(), msgId);
                data = dse.getDataset();
            } else {
                DicomMessage out = exchange.getOut(DicomMessage.class);
                cmd = out.getCommand();
                data = out.getBody(Attributes.class);
            }
View Full Code Here

Examples of org.dcm4che3.net.service.DicomServiceException

            return null;
        String cuid = rq.getString(Tag.AffectedSOPClassUID);
        String iuid = rq.getString(Tag.AffectedSOPInstanceUID);
        File file = new File(storageDir, iuid);
        if (file.exists())
            throw new DicomServiceException(Status.DuplicateSOPinstance).
                setUID(Tag.AffectedSOPInstanceUID, iuid);
        DicomOutputStream out = null;
        LOG.info("{}: M-WRITE {}", as, file);
        try {
            out = new DicomOutputStream(file);
            out.writeDataset(
                    Attributes.createFileMetaInformation(iuid, cuid,
                            UID.ExplicitVRLittleEndian),
                    rqAttrs);
        } catch (IOException e) {
            LOG.warn(as + ": Failed to store Instance Available Notification:", e);
            throw new DicomServiceException(Status.ProcessingFailure, e);
        } finally {
            SafeClose.close(out);
        }
        return null;
    }
View Full Code Here

Examples of org.dcm4che3.net.service.DicomServiceException

   
                    patRec = ddr.findNextPatientRecord(patRec, patIDs);
            }
            return list;
        } catch (IOException e) {
            throw new DicomServiceException(Status.UnableToCalculateNumberOfMatches, e);
        }
    }
View Full Code Here

Examples of org.dcm4che3.net.service.DicomServiceException

                }
                patRec = ddr.findNextPatientRecord(patRec);
            }
        } catch (IOException e) {
            LOG.info("Failed to M-READ " + dicomDir, e);
            throw new DicomServiceException(Status.ProcessingFailure, e);
        }
        for (Map.Entry<String, String> entry : map.entrySet()) {
            failedSeq.add(refSOP(entry.getKey(), entry.getValue(), Status.NoSuchObjectInstance));
        }
        if (failedSeq.isEmpty())
View Full Code Here

Examples of org.dcm4che3.net.service.DicomServiceException

                    deleteFile(as, file);
                }
               
            } catch (Exception e) {
                deleteFile(as, file);
                throw new DicomServiceException(Status.ProcessingFailure, e);
            }
        }
View Full Code Here

Examples of org.dcm4che3.net.service.DicomServiceException

        @Override
        public void onDimseRQ(Association as, PresentationContext pc, Dimse dimse,
                Attributes rq, Attributes actionInfo) throws IOException {
            if (dimse != Dimse.N_ACTION_RQ)
                throw new DicomServiceException(Status.UnrecognizedOperation);

            int actionTypeID = rq.getInt(Tag.ActionTypeID, 0);
            if (actionTypeID != 1)
                throw new DicomServiceException(Status.NoSuchActionType)
                            .setActionTypeID(actionTypeID);

            Attributes rsp = Commands.mkNActionRSP(rq, Status.Success);
            String callingAET = as.getCallingAET();
            String calledAET = as.getCalledAET();
            Connection remoteConnection = getRemoteConnection(callingAET);
            if (remoteConnection == null)
                throw new DicomServiceException(Status.ProcessingFailure,
                        "Unknown Calling AET: " + callingAET);
            Attributes eventInfo =
                    calculateStorageCommitmentResult(calledAET, actionInfo);
            try {
                as.writeDimseRSP(pc, rsp, null);
View Full Code Here

Examples of org.dcm4che3.net.service.DicomServiceException

            QueryRetrieveLevel level = QueryRetrieveLevel.valueOf(keys, qrLevels);
            level.validateRetrieveKeys(keys, rootLevel, relational(as, rq));
            String moveDest = rq.getString(Tag.MoveDestination);
            final Connection remote = getRemoteConnection(moveDest);
            if (remote == null)
                throw new DicomServiceException(Status.MoveDestinationUnknown,
                        "Move Destination: " + moveDest + " unknown");
            List<InstanceLocator> matches = DcmQRSCP.this.calculateMatches(keys);
            if (matches.isEmpty())
                return null;
View Full Code Here

Examples of org.dcm4che3.net.service.DicomServiceException

                Connection remote, AAssociateRQ aarq) throws DicomServiceException {
            try {
                return as.getApplicationEntity().connect(
                        as.getConnection(), remote, aarq);
            } catch (Exception e) {
                throw new DicomServiceException(Status.UnableToPerformSubOperations, e);
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.