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


Java Util.getArrayFromValue方法代码示例

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


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

示例1: makeXZProjection

import net.imglib2.util.Util; //导入方法依赖的package包/类
public static final AffineTransform3D makeXZProjection( final ImagePlus imp )
{
	final AffineTransform3D transform = new AffineTransform3D();
	final double[] calibration = Util.getArrayFromValue( 1d, 3 );
	calibration[ 0 ] = imp.getCalibration().pixelWidth;
	calibration[ 1 ] = imp.getCalibration().pixelHeight;
	if ( imp.getNSlices() > 1 )
		calibration[ 2 ] = imp.getCalibration().pixelDepth;
	transform.set( 1 / calibration[ 0 ], 0, 0, 0, 0, 0, -1 / calibration[ 1 ], imp.getHeight(), 0, 1 / calibration[ 2 ], 0, 0 );
	return transform;
}
 
开发者ID:fiji,项目名称:MaMuT,代码行数:12,代码来源:TransformUtils.java

示例2: makeYZProjection

import net.imglib2.util.Util; //导入方法依赖的package包/类
public static final AffineTransform3D makeYZProjection( final ImagePlus imp )
{
	final AffineTransform3D transform = new AffineTransform3D();
	final double[] calibration = Util.getArrayFromValue( 1d, 3 );
	calibration[ 0 ] = imp.getCalibration().pixelWidth;
	calibration[ 1 ] = imp.getCalibration().pixelHeight;
	if ( imp.getNSlices() > 1 )
		calibration[ 2 ] = imp.getCalibration().pixelDepth;
	transform.set( 0, 0, 1 / calibration[ 0 ], 0, 0, 1 / calibration[ 1 ], 0, 0, -1 / calibration[ 2 ], 0, 0, imp.getNSlices() );
	return transform;
}
 
开发者ID:fiji,项目名称:MaMuT,代码行数:12,代码来源:TransformUtils.java

示例3: getTransformFromCalibration

import net.imglib2.util.Util; //导入方法依赖的package包/类
public static final AffineTransform3D getTransformFromCalibration( final ImagePlus imp )
{
	final AffineTransform3D transform = new AffineTransform3D();
	final double[] calibration = Util.getArrayFromValue( 1d, 3 );
	calibration[ 0 ] = imp.getCalibration().pixelWidth;
	calibration[ 1 ] = imp.getCalibration().pixelHeight;
	if ( imp.getNSlices() > 1 )
		calibration[ 2 ] = imp.getCalibration().pixelDepth;
	transform.set( 1 / calibration[ 0 ], 0, 0, 0, 0, 1 / calibration[ 1 ], 0, 0, 0, 0, 1 / calibration[ 2 ], 0 );
	return transform;
}
 
开发者ID:fiji,项目名称:MaMuT,代码行数:12,代码来源:TransformUtils.java

示例4: openVirtuallyFused

import net.imglib2.util.Util; //导入方法依赖的package包/类
public static <S extends AbstractSequenceDescription< ?,? extends BasicViewDescription<? extends BasicViewSetup>, ?  >>
	List<RandomAccessibleInterval< FloatType >> openVirtuallyFused(
			S sd,
			ViewRegistrations vrs,
			Collection<? extends Collection<ViewId>> views,
			Interval boundingBox,
			double[] downsamplingFactors)
{
	final BasicImgLoader imgLoader = sd.getImgLoader();
	
	final List<RandomAccessibleInterval< FloatType >> openImgs = new ArrayList<>();
	final Interval bbSc = TransformVirtual.scaleBoundingBox( new FinalInterval( boundingBox ), inverse( downsamplingFactors ));
	
	final long[] dim = new long[ bbSc.numDimensions() ];
	bbSc.dimensions( dim );
	
	
	for (Collection<ViewId> viewGroup : views)
	{
		final ArrayList< RandomAccessibleInterval< FloatType > > images = new ArrayList<>();
		final ArrayList< RandomAccessibleInterval< FloatType > > weights = new ArrayList<>();
		
		for ( final ViewId viewId : viewGroup )
		{
			final ViewRegistration vr = vrs.getViewRegistration( viewId );
			vr.updateModel();
			AffineTransform3D model = vr.getModel();

			final float[] blending = Util.getArrayFromValue( FusionTools.defaultBlendingRange, 3 );
			final float[] border = Util.getArrayFromValue( FusionTools.defaultBlendingBorder, 3 );

			model = model.copy();
			TransformVirtual.scaleTransform( model, inverse(downsamplingFactors) );

			final RandomAccessibleInterval inputImg = DownsampleTools.openDownsampled( imgLoader, viewId, model );

			System.out.println( model.inverse() );

			FusionTools.adjustBlending( sd.getViewDescriptions().get( viewId ), blending, border, model );

			images.add( TransformView.transformView( inputImg, model, bbSc, 0, 1 ) );
			weights.add( TransformWeight.transformBlending( inputImg, border, blending, model, bbSc ) );
		}
		
		openImgs.add( new FusedRandomAccessibleInterval( new FinalInterval( dim ), images, weights ) );
		
	}		
	
	return openImgs;
	
}
 
开发者ID:PreibischLab,项目名称:BigStitcher,代码行数:52,代码来源:DisplayOverlapTestPopup.java


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