org.dcm4che3.data.Attributes.setDouble()方法的使用及代码示例

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

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

Attributes.setDouble介绍

暂无

代码示例

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

public Object setDouble(int tag, VR vr, double... ds) {
  return setDouble(null, tag, vr, ds);
}

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

private static Attributes bluildLabelAndBounds(Rectangle2D bound, String text) {
  Attributes attributes = new Attributes(5);
  attributes.setString(Tag.BoundingBoxAnnotationUnits, VR.CS, PIXEL);
  attributes.setDouble(Tag.BoundingBoxTopLeftHandCorner, VR.FL,
    new double[] { bound.getMinX(), bound.getMinY() });
  attributes.setDouble(Tag.BoundingBoxBottomRightHandCorner, VR.FL,
    new double[] { bound.getMaxX(), bound.getMaxY() });
  // In text strings (value representation ST, LT, or UT) a new line shall be represented as CR LF.
  // see http://dicom.nema.org/medical/dicom/current/output/chtml/part05/chapter_6.html
  attributes.setString(Tag.UnformattedTextValue, VR.ST, text);
  return attributes;
}

代码示例来源:origin: org.dcm4che/dcm4che-emf

void setEchoTime(Attributes sf) {
  double echoTime = sf.getDouble(Tag.EffectiveEchoTime, 0);
  if (echoTime == 0)
    sf.setNull(Tag.EchoTime, VR.DS);
  else
    sf.setDouble(Tag.EchoTime, VR.DS, echoTime);
}

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

void setEchoTime(Attributes sf) {
  double echoTime = sf.getDouble(Tag.EffectiveEchoTime, 0);
  if (echoTime == 0)
    sf.setNull(Tag.EchoTime, VR.DS);
  else
    sf.setDouble(Tag.EchoTime, VR.DS, echoTime);
}

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

private static void addNewSubGraphic(Attributes dcm, Sequence graphicSeq, List<Point2D.Double> points) {
  if (dcm != null && dcm.getParent() == null) {
    dcm.setString(Tag.GraphicType, VR.CS, PrGraphicUtil.POLYLINE);
    dcm.setDouble(Tag.GraphicData, VR.FL, getGraphicsPoints(points));
    dcm.setInt(Tag.NumberOfGraphicPoints, VR.US, points.size());
    graphicSeq.add(dcm);
    points.clear();
  }
}

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

private static Attributes bluildLabelAndAnchor(AnnotationGraphic g) {
  Rectangle2D bound = g.getLabelBounds();
  Point2D anchor = g.getAnchorPoint();
  String text = Arrays.stream(g.getLabels()).collect(Collectors.joining("\r\n")); //$NON-NLS-1$
  Attributes attributes = new Attributes(7);
  attributes.setString(Tag.BoundingBoxAnnotationUnits, VR.CS, PIXEL);
  attributes.setFloat(Tag.AnchorPoint, VR.FL, (float) anchor.getX(), (float) anchor.getY());
  attributes.setString(Tag.AnchorPointVisibility, VR.CS, "Y"); //$NON-NLS-1$
  Sequence style = attributes.newSequence(Tag.LineStyleSequence, 1);
  Attributes styles = new Attributes();
  styles.setFloat(Tag.LineThickness, VR.FL, g.getLineThickness());
  if (g.getColorPaint() instanceof Color) {
    Color color = (Color) g.getColorPaint();
    float[] rgb = PresentationStateReader.colorToLAB(color);
    if (rgb != null) {
      styles.setInt(Tag.PatternOnColorCIELabValue, VR.US, CIELab.convertToDicomLab(rgb));
    }
  }
  style.add(styles);
  attributes.setDouble(Tag.BoundingBoxTopLeftHandCorner, VR.FL,
    new double[] { bound.getMinX(), bound.getMinY() });
  attributes.setDouble(Tag.BoundingBoxBottomRightHandCorner, VR.FL,
    new double[] { bound.getMaxX(), bound.getMaxY() });
  // In text strings (value representation ST, LT, or UT) a new line shall be represented as CR LF.
  // see http://dicom.nema.org/medical/dicom/current/output/chtml/part05/chapter_6.html
  attributes.setString(Tag.UnformattedTextValue, VR.ST, text);
  return attributes;
}

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

double unitRatio = imageElement.getPixelSize()
attrs.setDouble(Tag.PixelSpacing, VR.DS, unitRatio, unitRatio);

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

dcm.setDouble(Tag.GraphicData, VR.FL, getGraphicsPoints(pts));
dcm.setInt(Tag.NumberOfGraphicPoints, VR.US, pts.size());
graphicSeq.add(dcm);

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

dataset.setDouble(id, dic.vrOf(id), (Double) val);
} else if (val instanceof double[]) {
  dataset.setDouble(id, dic.vrOf(id), (double[]) val);

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

case FL:
case FD:
  attrs.setDouble(tag, el.vr, el.toDoubles());
  break;
case SL:

相关文章

微信公众号

最新文章

更多