Codota Logo
Commands
Code IndexAdd Codota to your IDE (free)

How to use
Commands
in
org.dcm4che3.net

Best Java code snippets using org.dcm4che3.net.Commands (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: dcm4che/dcm4che

    @Override
    public void onDimseRQ(Association as, PresentationContext pc,
        Dimse dimse, Attributes cmd, Attributes data)
        throws IOException {
      if (dimse != Dimse.N_CREATE_RQ)
        throw new DicomServiceException(Status.UnrecognizedOperation);
      Attributes rsp = Commands.mkNCreateRSP(cmd, status);
      Attributes rspAttrs = IanSCP.this.create(as, cmd, data);
      as.tryWriteDimseRSP(pc, rsp, rspAttrs);
    }
};
origin: dcm4che/dcm4che

void cancel(PresentationContext pc, int msgId) throws IOException {
  Attributes cmd = Commands.mkCCancelRQ(msgId);
  encoder.writeDIMSE(pc, cmd, null);
}
origin: dcm4che/dcm4che

public void cget(String cuid, int priority, Attributes data,
    String tsuid, DimseRSPHandler rspHandler)
    throws IOException, InterruptedException {
  PresentationContext pc = pcFor(cuid, tsuid);
  checkIsSCU(cuid);
  Attributes cgetrq = Commands.mkCGetRQ(rspHandler.getMessageID(),
      cuid, priority);
  invoke(pc, cgetrq, new DataWriterAdapter(data), rspHandler,
      conn.getRetrieveTimeout(), !conn.isRetrieveTimeoutTotal());
}
origin: dcm4che/dcm4che

public void cmove(String cuid, int priority, Attributes data,
    String tsuid, String destination, DimseRSPHandler rspHandler)
    throws IOException, InterruptedException {
  PresentationContext pc = pcFor(cuid, tsuid);
  checkIsSCU(cuid);
  Attributes cmoverq = Commands.mkCMoveRQ(rspHandler.getMessageID(),
      cuid, priority, destination);
  invoke(pc, cmoverq, new DataWriterAdapter(data), rspHandler,
      conn.getRetrieveTimeout(), !conn.isRetrieveTimeoutTotal());
}
origin: dcm4che/dcm4che

public void cfind(String cuid, int priority, Attributes data,
    String tsuid, DimseRSPHandler rspHandler) throws IOException,
    InterruptedException {
  PresentationContext pc = pcFor(cuid, tsuid);
  checkIsSCU(cuid);
  Attributes cfindrq =
      Commands.mkCFindRQ(rspHandler.getMessageID(), cuid, priority);
  invoke(pc, cfindrq, new DataWriterAdapter(data), rspHandler,
      conn.getResponseTimeout());
}
origin: dcm4che/dcm4che

@Override
public void onDimseRQ(Association as, PresentationContext pc, Dimse dimse,
    Attributes cmd, Attributes keys) throws IOException {
  if (dimse != Dimse.C_GET_RQ)
    throw new DicomServiceException(Status.UnrecognizedOperation);
  RetrieveTask retrieveTask = calculateMatches(as, pc, cmd, keys);
  if (retrieveTask != null)
    as.getApplicationEntity().getDevice().execute(retrieveTask);
  else
    as.tryWriteDimseRSP(pc, Commands.mkCGetRSP(cmd, Status.Success));
}
origin: dcm4che/dcm4che

public DimseRSP cecho(String cuid) throws IOException, InterruptedException {
  FutureDimseRSP rsp = new FutureDimseRSP(nextMessageID());
  PresentationContext pc = pcFor(cuid, null);
  checkIsSCU(cuid);
  Attributes cechorq = Commands.mkCEchoRQ(rsp.getMessageID(), cuid);
  invoke(pc, cechorq, null, rsp, conn.getResponseTimeout());
  return rsp;
}
origin: dcm4che/dcm4che

public void writeDimseRSP(PresentationContext pc, Attributes cmd,
    Attributes data) throws IOException {
  DataWriter writer = null;
  int datasetType = Commands.NO_DATASET;
  if (data != null) {
    writer = new DataWriterAdapter(data);
    datasetType = Commands.getWithDatasetType();
  }
  cmd.setInt(Tag.CommandDataSetType, VR.US, datasetType);
  encoder.writeDIMSE(pc, cmd, writer);
  if (!Status.isPending(cmd.getInt(Tag.Status, 0))) {
    decPerforming();
    startIdleTimeout();
  }
}
origin: dcm4che/dcm4che

@Override
public void run() {
  try {
    int msgId = rq.getInt(Tag.MessageID, -1);
    as.addCancelRQHandler(msgId, this);
    try {
      while (!canceled && hasMoreMatches()) {
        Attributes match = adjust(nextMatch());
        if (match != null) {
          int status = optionalKeysNotSupported
              ? Status.PendingWarning
              : Status.Pending;
          as.writeDimseRSP(pc, Commands.mkCFindRSP(rq, status), match);
        }
      }
      int status = canceled ? Status.Cancel : Status.Success;
      as.writeDimseRSP(pc, Commands.mkCFindRSP(rq, status));
    } catch (DicomServiceException e) {
      Attributes rsp = e.mkRSP(0x8020, msgId);
      as.writeDimseRSP(pc, rsp, e.getDataset());
    } finally {
      as.removeCancelRQHandler(msgId);
      close();
    }
  } catch (IOException e) {
    // handled by Association
  }
}
origin: dcm4che/dcm4che

} else if (Commands.hasDataset(cmd)) {
  nextPDV(PDVType.DATA, pcid);
  if (dimse.isRSP()) {
origin: org.dcm4che/dcm4che-net

public void cget(String cuid, int priority, Attributes data,
    String tsuid, DimseRSPHandler rspHandler)
    throws IOException, InterruptedException {
  PresentationContext pc = pcFor(cuid, tsuid);
  checkIsSCU(cuid);
  Attributes cgetrq = Commands.mkCGetRQ(rspHandler.getMessageID(),
      cuid, priority);
  invoke(pc, cgetrq, new DataWriterAdapter(data), rspHandler,
      conn.getRetrieveTimeout(), !conn.isRetrieveTimeoutTotal());
}
origin: org.dcm4che/dcm4che-net

public void cmove(String cuid, int priority, Attributes data,
    String tsuid, String destination, DimseRSPHandler rspHandler)
    throws IOException, InterruptedException {
  PresentationContext pc = pcFor(cuid, tsuid);
  checkIsSCU(cuid);
  Attributes cmoverq = Commands.mkCMoveRQ(rspHandler.getMessageID(),
      cuid, priority, destination);
  invoke(pc, cmoverq, new DataWriterAdapter(data), rspHandler,
      conn.getRetrieveTimeout(), !conn.isRetrieveTimeoutTotal());
}
origin: org.dcm4che/dcm4che-net

public void cfind(String cuid, int priority, Attributes data,
    String tsuid, DimseRSPHandler rspHandler) throws IOException,
    InterruptedException {
  PresentationContext pc = pcFor(cuid, tsuid);
  checkIsSCU(cuid);
  Attributes cfindrq =
      Commands.mkCFindRQ(rspHandler.getMessageID(), cuid, priority);
  invoke(pc, cfindrq, new DataWriterAdapter(data), rspHandler,
      conn.getResponseTimeout());
}
origin: org.dcm4che/dcm4che-net

@Override
public void onDimseRQ(Association as, PresentationContext pc, Dimse dimse,
    Attributes cmd, Attributes keys) throws IOException {
  if (dimse != Dimse.C_GET_RQ)
    throw new DicomServiceException(Status.UnrecognizedOperation);
  RetrieveTask retrieveTask = calculateMatches(as, pc, cmd, keys);
  if (retrieveTask != null)
    as.getApplicationEntity().getDevice().execute(retrieveTask);
  else
    as.tryWriteDimseRSP(pc, Commands.mkCGetRSP(cmd, Status.Success));
}
origin: org.dcm4che/dcm4che-net

public DimseRSP cecho(String cuid) throws IOException, InterruptedException {
  FutureDimseRSP rsp = new FutureDimseRSP(nextMessageID());
  PresentationContext pc = pcFor(cuid, null);
  checkIsSCU(cuid);
  Attributes cechorq = Commands.mkCEchoRQ(rsp.getMessageID(), cuid);
  invoke(pc, cechorq, null, rsp, conn.getResponseTimeout());
  return rsp;
}
origin: org.dcm4che/dcm4che-net

public void writeDimseRSP(PresentationContext pc, Attributes cmd,
    Attributes data) throws IOException {
  DataWriter writer = null;
  int datasetType = Commands.NO_DATASET;
  if (data != null) {
    writer = new DataWriterAdapter(data);
    datasetType = Commands.getWithDatasetType();
  }
  cmd.setInt(Tag.CommandDataSetType, VR.US, datasetType);
  encoder.writeDIMSE(pc, cmd, writer);
  if (!Status.isPending(cmd.getInt(Tag.Status, 0))) {
    decPerforming();
    startIdleTimeout();
  }
}
origin: org.dcm4che/dcm4che-net

@Override
public void run() {
  try {
    int msgId = rq.getInt(Tag.MessageID, -1);
    as.addCancelRQHandler(msgId, this);
    try {
      while (!canceled && hasMoreMatches()) {
        Attributes match = adjust(nextMatch());
        if (match != null) {
          int status = optionalKeysNotSupported
              ? Status.PendingWarning
              : Status.Pending;
          as.writeDimseRSP(pc, Commands.mkCFindRSP(rq, status), match);
        }
      }
      int status = canceled ? Status.Cancel : Status.Success;
      as.writeDimseRSP(pc, Commands.mkCFindRSP(rq, status));
    } catch (DicomServiceException e) {
      Attributes rsp = e.mkRSP(0x8020, msgId);
      as.writeDimseRSP(pc, rsp, e.getDataset());
    } finally {
      as.removeCancelRQHandler(msgId);
      close();
    }
  } catch (IOException e) {
    // handled by Association
  }
}
origin: org.dcm4che/dcm4che-net

} else if (Commands.hasDataset(cmd)) {
  nextPDV(PDVType.DATA, pcid);
  if (dimse.isRSP()) {
origin: org.dcm4che/dcm4che-net

protected void onNCreateRQ(Association as, PresentationContext pc,
    Attributes rq, Attributes rqAttrs) throws IOException {
  Attributes rsp = Commands.mkNCreateRSP(rq, Status.Success);
  Attributes rspAttrs = create(as, rq, rqAttrs, rsp);
  as.tryWriteDimseRSP(pc, rsp, rspAttrs);
}
origin: org.dcm4che/dcm4che-net

void cancel(PresentationContext pc, int msgId) throws IOException {
  Attributes cmd = Commands.mkCCancelRQ(msgId);
  encoder.writeDIMSE(pc, cmd, null);
}
org.dcm4che3.netCommands

Most used methods

  • mkNCreateRSP
  • getWithDatasetType
  • hasDataset
  • mkCCancelRQ
  • mkCEchoRQ
  • mkCFindRQ
  • mkCFindRSP
  • mkCGetRQ
  • mkCGetRSP
  • mkCMoveRQ
  • mkCMoveRSP
  • mkCStoreRQ
  • mkCMoveRSP,
  • mkCStoreRQ,
  • mkCStoreRSP,
  • mkEchoRSP,
  • mkNActionRQ,
  • mkNActionRSP,
  • mkNCreateRQ,
  • mkNDeleteRQ,
  • mkNEventReportRQ,
  • mkNEventReportRSP

Popular in Java

  • Running tasks concurrently on multiple threads
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (Timer)
  • requestLocationUpdates (LocationManager)
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now