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


Java ZProjector.doProjection方法代码示例

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


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

示例1: showConvolvedImages

import ij.plugin.ZProjector; //导入方法依赖的package包/类
/**
 * Debugging method to show the results of convolution
 * 
 * @param convolved
 */
@SuppressWarnings("unused")
private void showConvolvedImages(HashMap<Integer, FloatProcessor> convolved)
{
	ImageProcessor ip = convolved.get(0);
	ImageStack stack = new ImageStack(ip.getWidth(), ip.getHeight());
	for (int rotation : rotationAngles)
		stack.addSlice("Rotation " + rotation, convolved.get(rotation));

	ImagePlus imp = new ImagePlus("Membrane filter", stack);
	imp.show();

	// Output different projections of the results
	ZProjector projector = new ZProjector(imp);
	for (int projectionMethod = 0; projectionMethod < ZProjector.METHODS.length; projectionMethod++)
	{
		IJ.showStatus("Projecting " + ZProjector.METHODS[projectionMethod]);
		projector.setMethod(projectionMethod);
		projector.doProjection();
		ImagePlus projImp = projector.getProjection();
		projImp.show();
	}
}
 
开发者ID:aherbert,项目名称:GDSC,代码行数:28,代码来源:Cell_Outliner.java

示例2: getBackgroundLevel

import ij.plugin.ZProjector; //导入方法依赖的package包/类
private float getBackgroundLevel(AssignedPoint[] points)
{
	// Get a maximum intensity project of the image
	ZProjector projector = new ZProjector(imp);
	projector.setMethod(ZProjector.MAX_METHOD);
	projector.doProjection();

	ImageProcessor ip = projector.getProjection().getProcessor();

	// Set background using the lowest currently picked point
	float background = Float.POSITIVE_INFINITY;
	for (AssignedPoint point : points)
	{
		final float v = ip.getf(point.getXint(), point.getYint());
		if (background > v)
			background = v;
	}

	// Subtract the image Std.Dev. to get a buffer for error.
	ImageStatistics stats = ip.getStatistics();
	background -= stats.stdDev;

	return background;
}
 
开发者ID:aherbert,项目名称:GDSC,代码行数:25,代码来源:PointAlignerPlugin.java

示例3: getSkeletonizedProjection

import ij.plugin.ZProjector; //导入方法依赖的package包/类
/**
 * Retrieves a MIP of skeletonized paths.
 *
 * @throws RuntimeException
 *             if called before successfully loading a file
 * @return a MIP projection of an untagged skeleton (8-bit binary image)
 */
public ImageProcessor getSkeletonizedProjection() {
	final ImagePlus imp = renderPathsAsSkeleton(false);
	final ZProjector zp = new ZProjector(imp);
	zp.setMethod(ZProjector.MAX_METHOD);
	zp.setStartSlice(1);
	zp.setStopSlice(imp.getNSlices());
	zp.doProjection();
	return zp.getProjection().getProcessor();
}
 
开发者ID:tferr,项目名称:hIPNAT,代码行数:17,代码来源:ImportTracings.java

示例4: runProjection

import ij.plugin.ZProjector; //导入方法依赖的package包/类
public void runProjection(int methodProj){
    IJ.showProgress((progressbar));
    ZProjector zproject = new ZProjector();
    zproject.setImage(rawImage.duplicate());
    zproject.setMethod(methodProj);
    zproject.doProjection();
    projImage = zproject.getProjection();
}
 
开发者ID:biocompibens,项目名称:SME,代码行数:9,代码来源:SME_Plugin_Get_Manifold.java

示例5: getProjection

import ij.plugin.ZProjector; //导入方法依赖的package包/类
private ImageProcessor getProjection()
{
	// Get median intensity projection
	ZProjector p = new ZProjector(imp);
	p.setMethod(ZProjector.MEDIAN_METHOD);
	p.doProjection();
	ImageProcessor median = p.getProjection().getProcessor();
	return median;
}
 
开发者ID:aherbert,项目名称:GDSC-SMLM,代码行数:10,代码来源:ImageBackground.java

示例6: runDetection

import ij.plugin.ZProjector; //导入方法依赖的package包/类
@Override
		public Collection<PathObject> runDetection(final ImageData<BufferedImage> imageData, ParameterList params, ROI pathROI) {
					
			double fullCoreDiameterPx;
			ImageServer<BufferedImage> server = imageData.getServer();
			if (server.hasPixelSizeMicrons())
				fullCoreDiameterPx = params.getDoubleParameterValue("coreDiameterMM") / server.getAveragedPixelSizeMicrons() * 1000;
			else
				fullCoreDiameterPx = params.getDoubleParameterValue("coreDiameterPixels");

			String horizontalLabels = params.getStringParameterValue("labelsHorizontal").trim();
			String verticalLabels = params.getStringParameterValue("labelsVertical").trim();
			
			boolean horizontalLabelFirst = params.getChoiceParameterValue("labelOrder").toString().startsWith("Column");
			// TODO: Consider fluorescence mode in TMA dearraying
			boolean isFluorescence = imageData.isFluorescence();
		
			double densityThreshold = params.getIntParameterValue("densityThreshold") * 0.01;
			double roiScaleFactor = params.getIntParameterValue("boundsScale") * 0.01;
			logger.trace("ROI scale: " + roiScaleFactor);
		

			double maxDimLength = Math.max(server.getWidth(), server.getHeight());
			double dimRequested = 1200;
			double downsample = Math.pow(2, Math.round(Math.log(maxDimLength / dimRequested)/Math.log(2)));
			
//			// Compute alternative downsample factor based on requested pixel size
//			// This is likely to be a bit more reproducible - so use it instead
//			if (server.hasPixelSizeMicrons()) {
//				double preferredCoreDiameterPixels = 60;
//				double downsample2 = Math.round(fullCoreDiameterPx / preferredCoreDiameterPixels);
//				if (downsample2 > 1 && (maxDimLength / downsample2 < dimRequested*2)) {
//					downsample = downsample2;
//				}
//			}

			// Compute alternative downsample factor based on requested pixel size
			// This is likely to be a bit more reproducible - so use it instead
			if (server.hasPixelSizeMicrons()) {
				double preferredPixelSizeMicrons = 25;
				double downsample2 = Math.round(preferredPixelSizeMicrons / server.getAveragedPixelSizeMicrons());
				if (downsample2 > 1 && (maxDimLength / downsample2 < dimRequested*2))
					downsample = downsample2;
			}

			// Read the image
			PathImage<ImagePlus> pathImage = PathImagePlus.createPathImage(server, downsample);
			ImagePlus imp = pathImage.getImage();

			if (imp.getType() == ImagePlus.COLOR_RGB || imp.getNChannels() == 1)
				ip = imp.getProcessor();
			else {
				ZProjector zProjector = new ZProjector(imp);
				zProjector.setMethod(ZProjector.AVG_METHOD);
				zProjector.doProjection();
				ip = zProjector.getProjection().getProcessor();
			}
			bp = null;
				
			String[] hLabelsSplit = PathObjectTools.parseTMALabelString(horizontalLabels);
			String[] vLabelsSplit = PathObjectTools.parseTMALabelString(verticalLabels);

			updateGrid(tmaGrid, downsample);
			tmaGrid = doDearraying(fullCoreDiameterPx, downsample, densityThreshold, roiScaleFactor, isFluorescence, hLabelsSplit, vLabelsSplit, horizontalLabelFirst);
			
			return tmaGrid == null ? null : new ArrayList<>(tmaGrid.getTMACoreList());
		}
 
开发者ID:qupath,项目名称:qupath,代码行数:68,代码来源:TMADearrayerPluginIJ.java


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