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


Java ComputeMinMax类代码示例

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


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

示例1: Histogram

import net.imglib2.algorithm.stats.ComputeMinMax; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public Histogram(final Object fn, final int nBins) throws Exception {
	this.img = AlgorithmUtil.wrap(fn);
	
	T min = img.firstElement().createVariable();
	T max = min.copy();
	
	min.setReal( min.getMinValue() );
	max.setReal( max.getMinValue() );
	
	ComputeMinMax<T> cmm = new ComputeMinMax<T>(this.img, min, max);
	cmm.process();
	this.min = cmm.getMin().getRealDouble();
	this.max = cmm.getMax().getRealDouble();
	this.increment = process(this, img, nBins, this.min, this.max);
}
 
开发者ID:imglib,项目名称:imglib2-script,代码行数:17,代码来源:Histogram.java

示例2: computeMinMax

import net.imglib2.algorithm.stats.ComputeMinMax; //导入依赖的package包/类
private void computeMinMax(){
	if( min.getRealFloat() > max.getRealFloat() )
		ComputeMinMax.computeMinMax(imgIN, min, max);
}
 
开发者ID:mpicbg-scicomp,项目名称:Interactive-H-Watershed,代码行数:5,代码来源:HWatershed_Plugin.java

示例3: ImagePlusImgLoader

import net.imglib2.algorithm.stats.ComputeMinMax; //导入依赖的package包/类
protected < S extends RealType< S > & NativeType< S > > ImagePlusImgLoader( final ImagePlus imp,
		final TypedBasicImgLoader< S > loader,
		final MinMaxOption minMaxOption,
		final double min,
		final double max,
		final T type,
		final ConverterFactory< T > converterFactory )
{
	this.imp = imp;
	this.loader = loader;
	this.type = type;
	this.converterFactory = converterFactory;

	final int numSetups = imp.getNChannels();
	setupImgLoaders = new ArrayList<>();
	for ( int setupId = 0; setupId < numSetups; ++setupId )
		setupImgLoaders.add( new SetupImgLoader<>( loader.getSetupImgLoader( setupId ) ) );

	if ( loader instanceof VirtualStackImageLoader )
		this.loadercache = ( ( VirtualStackImageLoader< ?, ?, ? > ) loader ).getCacheControl();
	else
		this.loadercache = null;

	if ( minMaxOption == MinMaxOption.COMPUTE )
	{
		impMin = Double.POSITIVE_INFINITY;
		impMax = Double.NEGATIVE_INFINITY;
		final S minT = loader.getSetupImgLoader( 0 ).getImageType().createVariable();
		final S maxT = minT.createVariable();
		final int numTimepoints = imp.getNFrames();
		for ( int t = 0; t < numTimepoints; t++ )
			for ( int s = 0; s < numSetups; ++s )
			{
				ComputeMinMax.computeMinMax( loader.getSetupImgLoader( s ).getImage( t ), minT, maxT );
				impMin = Math.min( minT.getRealDouble(), impMin );
				impMax = Math.max( maxT.getRealDouble(), impMax );
				if ( loadercache != null )
					loadercache.clearCache();
			}
		System.out.println( "COMPUTE" );
		System.out.println( impMin + "  " + impMax );
	}
	else if ( minMaxOption == MinMaxOption.TAKE_FROM_IMAGEPROCESSOR )
	{
		impMin = imp.getDisplayRangeMin();
		impMax = imp.getDisplayRangeMax();
		System.out.println( "TAKE_FROM_IMAGEPROCESSOR" );
		System.out.println( impMin + "  " + impMax );
	}
	else
	{
		impMin = min;
		impMax = max;
		System.out.println( "SET" );
		System.out.println( impMin + "  " + impMax );
	}
}
 
开发者ID:bigdataviewer,项目名称:bigdataviewer_fiji,代码行数:58,代码来源:ImagePlusImgLoader.java


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