org.dcm4che3.net.Association类的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(269)

本文整理了Java中org.dcm4che3.net.Association类的一些代码示例,展示了Association类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Association类的具体详情如下:
包路径:org.dcm4che3.net.Association
类名称:Association

Association介绍

暂无

代码示例

代码示例来源:origin: dcm4che/dcm4che

public void close() throws IOException, InterruptedException {
  if (as != null && as.isReadyForDataTransfer()) {
    as.waitForOutstandingRSP();
    as.release();
  }
}

代码示例来源:origin: dcm4che/dcm4che

@Override
  public DimseRSPHandler createDimseRSPHandler(final File f) {
    return new DimseRSPHandler(as.nextMessageID()) {
      @Override
      public void onDimseRSP(Association as, Attributes cmd,
          Attributes data) {
        super.onDimseRSP(as, cmd, data);
        StoreSCU.this.onCStoreRSP(cmd, f);
      }
    };
  }
};

代码示例来源:origin: dcm4che/dcm4che

public DimseRSP cecho() throws IOException, InterruptedException {
  return cecho(UID.VerificationSOPClass);
}

代码示例来源:origin: dcm4che/dcm4che

public void close() throws IOException, InterruptedException {
  if (as != null) {
    if (as.isReadyForDataTransfer())
      as.release();
    as.waitForSocketClose();
  }
}

代码示例来源:origin: dcm4che/dcm4che

public void close() throws IOException, InterruptedException {
  if (as != null) {
    as.waitForOutstandingRSP();
    as.release();
    as.waitForSocketClose();
  }
}

代码示例来源:origin: dcm4che/dcm4che

public void close() throws IOException, InterruptedException {
  if (as != null) {
    if (as.isReadyForDataTransfer()) {
      as.waitForOutstandingRSP();
      if (keepAlive)
        waitForOutstandingResults();
      as.release();
    }
    as.waitForSocketClose();
  }
  waitForOutstandingResults();
}

代码示例来源:origin: nroduit/Weasis

try {
  dimseRSPHandler(as.ncreate(printManagementSOPClass, UID.BasicFilmSessionSOPClass, filmSessionUID,
    filmSessionAttrs, UID.ImplicitVRLittleEndian));
  DimseRSP ncreateFilmBoxRSP = as.ncreate(printManagementSOPClass, UID.BasicFilmBoxSOPClass, filmBoxUID,
    filmBoxAttrs, UID.ImplicitVRLittleEndian);
  dimseRSPHandler(ncreateFilmBoxRSP);
    ncreateFilmBoxRSP.getDataset().getNestedDataset(Tag.ReferencedImageBoxSequence);
  dimseRSPHandler(as.nset(printManagementSOPClass, imageBoxSOPClass,
    imageBoxSequence.getString(Tag.ReferencedSOPInstanceUID), imageBoxAttrs, UID.ImplicitVRLittleEndian));
  dimseRSPHandler(as.naction(printManagementSOPClass, UID.BasicFilmBoxSOPClass, filmBoxUID, 1, null,
    UID.ImplicitVRLittleEndian));
  as.ndelete(printManagementSOPClass, UID.BasicFilmBoxSOPClass, filmBoxUID);
  as.ndelete(printManagementSOPClass, UID.BasicFilmSessionSOPClass, filmSessionUID);
} finally {
  if (as != null && as.isReadyForDataTransfer()) {
    as.waitForOutstandingRSP();
    as.release();

代码示例来源:origin: dcm4che/dcm4che

public DimseRSP ncreate(String asuid, String cuid, String iuid,
    Attributes data, String tsuid)
    throws IOException, InterruptedException {
  FutureDimseRSP rsp = new FutureDimseRSP(nextMessageID());
  ncreate(asuid, cuid, iuid, data, tsuid, rsp);
  return rsp;
}

代码示例来源:origin: dcm4che/dcm4che

protected void cstore(Association storeas, T inst, String tsuid, 
    DataWriter dataWriter) throws IOException, InterruptedException {
  DimseRSPHandler rspHandler =
      new CStoreRSPHandler(storeas.nextMessageID(), inst);
  if (isCMove())
    storeas.cstore(inst.cuid, inst.iuid, priority,
        rqas.getRemoteAET(), msgId,
        dataWriter, tsuid, rspHandler);
  else
    storeas.cstore(inst.cuid, inst.iuid, priority,
        dataWriter, tsuid, rspHandler);
  synchronized (outstandingRSPLock) {
    outstandingRSP++;
  }
}

代码示例来源:origin: dcm4che/dcm4che

public DimseRSP cstore(String cuid, String iuid, int priority,
    DataWriter data, String tsuid)
    throws IOException, InterruptedException {
  FutureDimseRSP rsp = new FutureDimseRSP(nextMessageID());
  cstore(cuid, iuid, priority, data, tsuid, rsp);
  return rsp;
}

代码示例来源:origin: dcm4che/dcm4che

private void retrieve(Attributes keys) throws IOException, InterruptedException {
   DimseRSPHandler rspHandler = new DimseRSPHandler(as.nextMessageID()) {
    @Override
    public void onDimseRSP(Association as, Attributes cmd,
        Attributes data) {
      super.onDimseRSP(as, cmd, data);
    }
  };
  as.cmove(model.cuid, priority, keys, null, destination, rspHandler);
}

代码示例来源:origin: dcm4che/dcm4che

public DimseRSP naction(String asuid, String cuid, String iuid,
    int actionTypeId, Attributes data, String tsuid)
    throws IOException, InterruptedException {
  FutureDimseRSP rsp = new FutureDimseRSP(nextMessageID());
  naction(asuid, cuid, iuid, actionTypeId, data, tsuid, rsp);
  return rsp;
}

代码示例来源:origin: dcm4che/dcm4che

protected void releaseStoreAssociation(Association storeas) {
  try {
    storeas.release();
  } catch (IOException e) {
    LOG.warn("{}: failed to release association to {}",
        rqas, storeas.getRemoteAET(), e);
  }
}

代码示例来源:origin: dcm4che/dcm4che

@Override
public void run() {
  if (sameAssoc) {
    try {
      neventReport(as);
      return;
    } catch (Exception e) {
      DcmQRSCP.LOG.info(
          "Failed to return Storage Commitment Result in same Association:", e);
    }
  }
  try {
    Association diffAssoc = as.getApplicationEntity().connect(
        as.getConnection(), remoteConn, makeAAssociateRQ());
    neventReport(diffAssoc);
    diffAssoc.release();
  } catch (Exception e) {
    DcmQRSCP.LOG.error(
        "Failed to return Storage Commitment Result in new Association:", e);
  }
}

代码示例来源:origin: dcm4che/dcm4che

public void sendFiles() throws IOException {
  BufferedReader fileInfos = new BufferedReader(new InputStreamReader(
      new FileInputStream(tmpFile)));
  try {
    String line;
    while (as.isReadyForDataTransfer()
        && (line = fileInfos.readLine()) != null) {
      String[] ss = StringUtils.split(line, '\t');
      try {
        send(new File(ss[4]), Long.parseLong(ss[3]), ss[1], ss[0],
            ss[2]);
      } catch (Exception e) {
        e.printStackTrace();
      }
    }
    try {
      as.waitForOutstandingRSP();
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
  } finally {
    SafeClose.close(fileInfos);
  }
}

代码示例来源:origin: dcm4che/dcm4che

public DimseRSP nset(String asuid, String cuid, String iuid,
    DataWriter data, String tsuid)
    throws IOException, InterruptedException {
  FutureDimseRSP rsp = new FutureDimseRSP(nextMessageID());
  nset(asuid, cuid, iuid, data, tsuid, rsp);
  return rsp;
}

代码示例来源: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 close() throws IOException, InterruptedException {
  if (as != null) {
    as.release();
  }
}

代码示例来源:origin: dcm4che/dcm4che

public DimseRSP neventReport(String asuid, String cuid, String iuid,
    int eventTypeId, Attributes data, String tsuid)
    throws IOException, InterruptedException {
  FutureDimseRSP rsp = new FutureDimseRSP(nextMessageID());
  neventReport(asuid, cuid, iuid, eventTypeId, data, tsuid, rsp);
  return rsp;
}

代码示例来源:origin: dcm4che/dcm4che

public DimseRSP cget(String cuid, int priority, Attributes data,
    String tsuid) throws IOException,
    InterruptedException {
  FutureDimseRSP rsp = new FutureDimseRSP(nextMessageID());
  cget(cuid, priority, data, tsuid, rsp);
  return rsp;
}

相关文章