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


Java Tools类代码示例

本文整理汇总了Java中ij.util.Tools的典型用法代码示例。如果您正苦于以下问题:Java Tools类的具体用法?Java Tools怎么用?Java Tools使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: updateMacroOptions

import ij.util.Tools; //导入依赖的package包/类
boolean updateMacroOptions()
{
	String options = Macro.getOptions();
	int index = options.indexOf("maximum=");
	if (index == -1)
		return false;
	index += 8;
	int len = options.length();
	while (index < len - 1 && options.charAt(index) != ' ')
		index++;
	if (index == len - 1)
		return false;
	int min = (int) Tools.parseDouble(Macro.getValue(options, "minimum", "1"));
	int max = (int) Tools.parseDouble(Macro.getValue(options, "maximum", "999999"));
	options = "size=" + min + "-" + max + options.substring(index, len);
	Macro.setOptions(options);
	return true;
}
 
开发者ID:aherbert,项目名称:GDSC,代码行数:19,代码来源:ParticleAnalyzerCopy.java

示例2: getCalibrationFromPrefs

import ij.util.Tools; //导入依赖的package包/类
private void getCalibrationFromPrefs() {
	final String defaults = DEF_VOXEL_SIZE + "," + DEF_VOXEL_SIZE + "," + DEF_VOXEL_SIZE + "," + DEF_VOXEL_UNIT;
	try {
		final String[] values = Tools.split(Prefs.get(PREFS_KEY + "voxelCalibration", defaults), ",");
		voxelWidth = Double.parseDouble(values[0]);
		voxelHeight = Double.parseDouble(values[1]);
		voxelDepth = Double.parseDouble(values[2]);
		voxelUnit = values[3];
	} catch (final Exception ignored) {
		applyCalibration(DEF_VOXEL_SIZE, DEF_VOXEL_SIZE, DEF_VOXEL_SIZE, DEF_VOXEL_UNIT);
	}
}
 
开发者ID:tferr,项目名称:hIPNAT,代码行数:13,代码来源:ImportTracings.java

示例3: i2hex

import ij.util.Tools; //导入依赖的package包/类
/** Converts an int to an 8 byte hex string. */
String i2hex(int i) {
	for (int pos=7; pos>=0; pos--) {
		buf8[pos] = Tools.hexDigits[i&0xf];
		i >>>= 4;
	}
	return new String(buf8);
}
 
开发者ID:akmaier,项目名称:CONRAD,代码行数:9,代码来源:DicomDecoder.java

示例4: tag2hex

import ij.util.Tools; //导入依赖的package包/类
String tag2hex(int tag) {
	if (buf10==null) {
		buf10 = new char[11];
		buf10[4] = ',';
		buf10[9] = ' ';
	}
	int pos = 8;
	while (pos>=0) {
		buf10[pos] = Tools.hexDigits[tag&0xf];
		tag >>>= 4;
			pos--;
			if (pos==4) pos--; // skip coma
	}
	return new String(buf10);
}
 
开发者ID:akmaier,项目名称:CONRAD,代码行数:16,代码来源:DicomDecoder.java

示例5: refreshDisplayStatistics

import ij.util.Tools; //导入依赖的package包/类
private DisplayStatistics refreshDisplayStatistics(DisplayStatistics displayStatistics, boolean showStatistics,
		FloatProcessor m1ValuesFP, float[] valuesForRandom, String histogramTitle, Color colour, String xTitle,
		double value, String locationKey)
{
	// Draw a plot of the values. This will be used within the DisplayStatistics chart
	PlotResults statsPlot = new PlotResults(value, histogramBins, Tools.toDouble(valuesForRandom), colour);

	statsPlot.setXTitle(xTitle);
	statsPlot.setYTitle(plotPDFYLabel);
	statsPlot.setTitle("CDA " + xTitle + " PDF");

	// This is needed to calculate the probability limits for the results table 
	// even if the plot is not shown
	statsPlot.calculate(pValue);

	// Generate the statistics needed for the plot
	FloatStatistics floatStatistics = new FloatStatistics(m1ValuesFP);

	Point point = null;
	if (displayStatistics == null)
	{
		displayStatistics = new DisplayStatistics(histogramTitle, xTitle);
		point = Prefs.getLocation(locationKey);
	}
	displayStatistics.setData(statsPlot, floatStatistics, value);

	// Show the new plot
	if (showStatistics)
	{
		displayStatistics.draw();
		// Restore the position if necessary
		restoreLocation(displayStatistics.getPlotWindow(), point);
	}
	else
	{
		closeDisplayStatistics(displayStatistics, locationKey);
	}

	return displayStatistics;
}
 
开发者ID:aherbert,项目名称:GDSC,代码行数:41,代码来源:CDA_Plugin.java


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