當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。