本文整理了Java中ij.gui.Overlay.add()
方法的一些代码示例,展示了Overlay.add()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Overlay.add()
方法的具体详情如下:
包路径:ij.gui.Overlay
类名称:Overlay
方法名:add
[英]Adds an ROI to this Overlay.
[中]
代码示例来源:origin: net.imagej/ij
/** Adds an ROI to this Overlay using the specified name. */
public void add(Roi roi, String name) {
roi.setName(name);
add(roi);
}
代码示例来源:origin: ca.mcgill/Sholl_Analysis
private void validateShells() {
if (shellsAdded && shells != null)
return;
if (shells == null)
assembleShells();
for (final Roi shell : shells)
overlay.add(shell);
shellsAdded = true;
}
代码示例来源:origin: ca.mcgill/Sholl_Analysis
private void validatePoints() {
if (pointsAdded && points != null)
return;
if (points == null)
assembleIntersPoints();
for (final Roi point : points)
overlay.add(point);
pointsAdded = true;
}
代码示例来源:origin: ijpb/MorphoLibJ
private static final void addRoiToOverlay(Overlay overlay, Roi roi, Color color)
{
roi.setStrokeColor(color);
overlay.add(roi);
}
代码示例来源:origin: imagej/ImageJA
/** Adds an ROI to this Overlay using the specified name. */
public void add(Roi roi, String name) {
roi.setName(name);
add(roi);
}
代码示例来源:origin: zitmen/thunderstorm
public static Overlay addPointsToOverlay(double[] xCoord, double[] yCoord, Overlay overlay, int slice, Color c, int markerType) {
assert xCoord.length == yCoord.length;
float[] xs = new float[xCoord.length];
float[] ys = new float[yCoord.length];
for(int i = 0; i < xCoord.length; i++) {
xs[i] = (float) xCoord[i];
ys[i] = (float) yCoord[i];
}
overlay.add(new MultiplePointsRoi(xs, ys, slice, c, markerType));
return overlay;
}
代码示例来源:origin: sc.fiji/TrackMate_
public void addOverlay( final Roi overlay )
{
imp.getOverlay().add( overlay );
}
代码示例来源:origin: net.imagej/ij
/** Returns a clone of this Overlay. */
public Overlay duplicate() {
Roi[] rois = toArray();
Overlay overlay2 = create();
for (int i=0; i<rois.length; i++)
overlay2.add((Roi)rois[i].clone());
return overlay2;
}
代码示例来源:origin: net.imagej/ij
/**
* @deprecated
* replaced by ImagePlus.setOverlay(Roi, Color, int, Color)
*/
public void setDisplayList(Roi roi, Color color) {
roi.setStrokeColor(color);
Overlay list = new Overlay();
list.add(roi);
setOverlay(list);
}
代码示例来源:origin: imagej/ImageJA
/**
* @deprecated
* replaced by ImagePlus.setOverlay(Roi, Color, int, Color)
*/
public void setDisplayList(Roi roi, Color color) {
roi.setStrokeColor(color);
Overlay list = new Overlay();
list.add(roi);
setOverlay(list);
}
代码示例来源:origin: imagej/ImageJA
/** Returns a clone of this Overlay. */
public Overlay duplicate() {
Roi[] rois = toArray();
Overlay overlay2 = create();
for (int i=0; i<rois.length; i++)
overlay2.add((Roi)rois[i].clone());
return overlay2;
}
代码示例来源:origin: ijpb/MorphoLibJ
public void drawPaths(ImagePlus target, Map<Integer, GeodesicDiameter.Result> geodDiams)
{
Overlay overlay = new Overlay();
Calibration calib = target.getCalibration();
for (GeodesicDiameter.Result result : geodDiams.values())
{
Roi roi = createPathRoi(result.path, calib);
roi.setStrokeColor(Color.RED);
overlay.add(roi);
}
target.setOverlay(overlay);
}
代码示例来源:origin: ijpb/MorphoLibJ
public void drawDiameters(ImagePlus target, Map<Integer, PointPair2D> geodDiams)
{
Overlay overlay = new Overlay();
Calibration calib = target.getCalibration();
for (PointPair2D result : geodDiams.values())
{
Roi roi = createDiametersRoi(result, calib);
roi.setStrokeColor(Color.BLUE);
overlay.add(roi);
}
target.setOverlay(overlay);
}
代码示例来源:origin: ca.mcgill/Sholl_Analysis
public void addCenter() {
final PointRoi cRoi = new PointRoi(centerRawX, centerRawY);
cRoi.setPointType(1);
cRoi.setStrokeColor(baseColor);
cRoi.setProperty(TYPE, CENTER);
setROIposition(cRoi, channel, centerRawZ, frame, hyperStack);
overlay.add(cRoi, "center");
}
代码示例来源:origin: net.imagej/imagej-legacy
private void addROIs(final TreeNode<?> rois, final Overlay overlay) {
if (rois.data() instanceof MaskPredicate) {
final ij.gui.Roi ijRoi = convertService.convert(rois.data(),
ij.gui.Roi.class);
overlay.add(ijRoi);
}
if (rois.children() == null || rois.children().isEmpty()) return;
for (final TreeNode<?> roi : rois.children())
addROIs(roi, overlay);
}
代码示例来源:origin: net.imagej/ij
void updateRoiList(Rectangle rect) {
if (gel==null)
return;
if (overlay==null) {
overlay = new Overlay();
overlay.drawLabels(true);
overlay.setLabelColor(Color.white);
overlay.drawBackgrounds(true);
}
overlay.add(new Roi(rect.x, rect.y, rect.width, rect.height, null));
gel.setOverlay(overlay);
}
代码示例来源:origin: imagej/ImageJA
void updateRoiList(Rectangle rect) {
if (gel==null)
return;
if (overlay==null) {
overlay = new Overlay();
overlay.drawLabels(true);
overlay.setLabelColor(Color.white);
overlay.drawBackgrounds(true);
}
overlay.add(new Roi(rect.x, rect.y, rect.width, rect.height, null));
gel.setOverlay(overlay);
}
代码示例来源:origin: net.imagej/ij
/**
* @deprecated
* replaced by ImagePlus.setOverlay(Shape, Color, BasicStroke)
*/
public void setDisplayList(Shape shape, Color color, BasicStroke stroke) {
if (shape==null)
{setOverlay(null); return;}
Roi roi = new ShapeRoi(shape);
roi.setStrokeColor(color);
roi.setStroke(stroke);
Overlay list = new Overlay();
list.add(roi);
setOverlay(list);
}
代码示例来源:origin: net.imagej/ij
void addRoi(ImagePlus imp, Roi roi){
Overlay overlay = imp.getOverlay();
if (overlay==null || overlay.size()==0) {
if (offscreenOverlay==null)
offscreenOverlay = new Overlay();
overlay = offscreenOverlay;
}
if (defaultColor!=null)
roi.setStrokeColor(defaultColor);
roi.setStrokeWidth(getProcessor().getLineWidth());
overlay.add(roi);
}
代码示例来源:origin: imagej/ImageJA
void addRoi(ImagePlus imp, Roi roi){
Overlay overlay = imp.getOverlay();
if (overlay==null || overlay.size()==0) {
if (offscreenOverlay==null)
offscreenOverlay = new Overlay();
overlay = offscreenOverlay;
}
if (defaultColor!=null)
roi.setStrokeColor(defaultColor);
roi.setStrokeWidth(getProcessor().getLineWidth());
overlay.add(roi);
}
内容来源于网络,如有侵权,请联系作者删除!