当前位置: 首页>>代码示例>>Java>>正文


Java PointRoi.setStrokeColor方法代码示例

本文整理汇总了Java中ij.gui.PointRoi.setStrokeColor方法的典型用法代码示例。如果您正苦于以下问题:Java PointRoi.setStrokeColor方法的具体用法?Java PointRoi.setStrokeColor怎么用?Java PointRoi.setStrokeColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ij.gui.PointRoi的用法示例。


在下文中一共展示了PointRoi.setStrokeColor方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addOverlay

import ij.gui.PointRoi; //导入方法依赖的package包/类
/**
 * Adds an ROI point overlay to the image using the specified colour
 * 
 * @param imp
 * @param list
 * @param color
 */
public static void addOverlay(ImagePlus imp, List<? extends Coordinate> list, Color color)
{
	if (list.isEmpty())
		return;

	Color strokeColor = color;
	Color fillColor = color;

	Overlay o = imp.getOverlay();
	PointRoi roi = (PointRoi) PointManager.createROI(list);
	roi.setStrokeColor(strokeColor);
	roi.setFillColor(fillColor);
	roi.setShowLabels(false);

	if (o == null)
	{
		imp.setOverlay(roi, strokeColor, 2, fillColor);
	}
	else
	{
		o.add(roi);
		imp.setOverlay(o);
	}
}
 
开发者ID:aherbert,项目名称:GDSC,代码行数:32,代码来源:FileMatchCalculator.java

示例2: add

import ij.gui.PointRoi; //导入方法依赖的package包/类
private void add(Overlay o, float x, float y, Color color)
{
	PointRoi p = new PointRoi(x, y);
	p.setStrokeColor(color);
	p.setFillColor(color);
	p.setPointType(1); //PointRoi.CROSSHAIR);
	p.setSize(1); //PointRoi.TINY);
	o.add(p);
}
 
开发者ID:aherbert,项目名称:GDSC-SMLM,代码行数:10,代码来源:PulseActivationAnalysis.java

示例3: setOverlay

import ij.gui.PointRoi; //导入方法依赖的package包/类
/**
 * Show the points as an overlay
 * 
 * @param nMaxima
 * @param xpoints
 * @param ypoints
 */
private void setOverlay(int nMaxima, int[] xpoints, int[] ypoints)
{
	PointRoi roi = new PointRoi(xpoints, ypoints, nMaxima);

	Color strokeColor = Color.yellow;
	Color fillColor = Color.green;

	roi.setStrokeColor(strokeColor);
	roi.setFillColor(fillColor);
	roi.setShowLabels(false);

	imp.setOverlay(roi, strokeColor, 2, fillColor);
}
 
开发者ID:aherbert,项目名称:GDSC-SMLM,代码行数:21,代码来源:GaussianFit.java

示例4: addToOverlay

import ij.gui.PointRoi; //导入方法依赖的package包/类
/**
 * Adds the to overlay.
 *
 * @param frame
 *            the frame
 * @param spots
 *            the spots
 * @param singles
 *            the singles
 * @param doublets
 *            the doublets
 * @param multiples
 *            the multiples
 * @param spotMatchCount
 *            the spot match count
 */
private void addToOverlay(int frame, Spot[] spots, int singles, int doublets, int multiples,
		int[] spotMatchCount)
{
	if (o != null)
	{
		// Create an output stack with coloured ROI overlay for each n=1, n=2, n=other
		// to check that the doublets are correctly identified.
		final int[] sx = new int[singles];
		final int[] sy = new int[singles];
		final int[] dx = new int[doublets];
		final int[] dy = new int[doublets];
		final int[] mx = new int[multiples];
		final int[] my = new int[multiples];
		final int[] count = new int[3];
		final int[][] coords = new int[][] { sx, dx, mx, sy, dy, my };
		final Color[] color = new Color[] { Color.red, Color.green, Color.blue };
		for (int j = 0; j < spotMatchCount.length; j++)
		{
			final int c = DoubletAnalysis.getClass(spotMatchCount[j]);
			if (c < 0)
				continue;
			coords[c][count[c]] = spots[j].x;
			coords[c + 3][count[c]] = spots[j].y;
			count[c]++;
		}
		for (int c = 0; c < 3; c++)
		{
			final PointRoi roi = new PointRoi(coords[c], coords[c + 3], count[c]);
			roi.setPosition(frame);
			roi.setShowLabels(false);
			roi.setFillColor(color[c]);
			roi.setStrokeColor(color[c]);
			// Overlay uses a vector which is synchronized already
			o.add(roi);
		}
	}
}
 
开发者ID:aherbert,项目名称:GDSC-SMLM,代码行数:54,代码来源:DoubletAnalysis.java

示例5: addRoi

import ij.gui.PointRoi; //导入方法依赖的package包/类
public static void addRoi(int frame, Overlay o, float[] x, float[] y, int n, Color colour, int pointType, int size)
{
	if (n == 0)
		return;
	PointRoi roi = new PointRoi(x, y, n);
	roi.setPointType(pointType);
	roi.setFillColor(colour);
	roi.setStrokeColor(colour);
	if (frame != 0)
		roi.setPosition(frame);
	if (size != 0)
		roi.setSize(size);
	o.add(roi);
}
 
开发者ID:aherbert,项目名称:GDSC-SMLM,代码行数:15,代码来源:SpotFinderPreview.java

示例6: addToOverlay

import ij.gui.PointRoi; //导入方法依赖的package包/类
private void addToOverlay(Overlay o, int frame, int[] x, int[] y, int c, Color color)
{
	PointRoi roi = new PointRoi(x, y, c);
	roi.setFillColor(color);
	roi.setStrokeColor(color);
	roi.setPosition(frame);
	roi.setShowLabels(false);
	o.add(roi);
}
 
开发者ID:aherbert,项目名称:GDSC-SMLM,代码行数:10,代码来源:BenchmarkSmartSpotRanking.java

示例7: add

import ij.gui.PointRoi; //导入方法依赖的package包/类
private void add(Overlay overlay, PointRoi roi, int slice, int frame, Color color)
{
	// Tie position to the frame but not the channel or slice
	//System.out.printf("Add %d to z=%d,t=%d\n", roi.getNCoordinates(), slice, frame);
	roi.setPosition(0, slice, frame);
	roi.setStrokeColor(color);
	roi.setFillColor(color);
	roi.setShowLabels(false);
	overlay.add(roi);
}
 
开发者ID:aherbert,项目名称:GDSC,代码行数:11,代码来源:FileMatchCalculator.java

示例8: addRoi

import ij.gui.PointRoi; //导入方法依赖的package包/类
private void addRoi(int[] x, int[] y, int n, Overlay o, Color color)
{
	PointRoi roi = new PointRoi(x, y, n);
	roi.setShowLabels(false);
	roi.setFillColor(color);
	roi.setStrokeColor(color);
	o.add(roi);
}
 
开发者ID:aherbert,项目名称:GDSC,代码行数:9,代码来源:AssignFociToObjects.java


注:本文中的ij.gui.PointRoi.setStrokeColor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。