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


Java ImageJFunctions.wrapShort方法代码示例

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


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

示例1: getImage

import net.imglib2.img.display.imagej.ImageJFunctions; //导入方法依赖的package包/类
@Override
public ImgPlus< UnsignedShortType > getImage( final int timepointId, final ImgLoaderHint... hints )
{
	ensureExpIsOpen();

	final int channel = setup.getChannel().getId();
	final int illumination = setup.getIllumination().getId();
	final int angle = setup.getAngle().getId();

	final ImagePlus imp = getImagePlus( timepointId );
	final Img< UnsignedShortType > img = ImageJFunctions.wrapShort( imp );

	final String name = getBasename( timepointId, angle, channel, illumination );

	final AxisType[] axes = new AxisType[] { Axes.X, Axes.Y, Axes.Z };

	final float zStretching = ( float ) ( exp.pd / exp.pw );
	final double[] calibration = new double[] { 1, 1, zStretching };

	return new ImgPlus<>( img, name, axes, calibration );
}
 
开发者ID:bigdataviewer,项目名称:bigdataviewer_fiji,代码行数:22,代码来源:HuiskenImageLoader.java

示例2: wrapImagePlus

import net.imglib2.img.display.imagej.ImageJFunctions; //导入方法依赖的package包/类
public static Img<? extends RealType<?>> wrapImagePlus( ImagePlus imp){
	
	Img<? extends RealType<?>> img = null;
	int type = imp.getType(); 
	
	switch( type ){
	case ImagePlus.GRAY8:
		img = ImageJFunctions.wrapByte(imp);
		break;
	case ImagePlus.GRAY16:
		img = ImageJFunctions.wrapShort(imp);
		break;
	case ImagePlus.GRAY32:
		img = ImageJFunctions.wrapFloat(imp);
		break;
	case ImagePlus.COLOR_256:
		IJ.error("image type ("+type+") not handled. "+imp.toString() );
		//img = ImageJFunctions.wrapRGBA(imp);			
		break;
	case ImagePlus.COLOR_RGB:
		IJ.error("image type ("+type+") not handled. "+imp.toString() );
		//img = ImageJFunctions.wrapRGBA(imp);			
		break;
	default:
		IJ.error("image type ("+type+") not handled. "+imp.toString() );
		break;
	}
	return img;
}
 
开发者ID:mpicbg-scicomp,项目名称:Interactive-H-Watershed,代码行数:30,代码来源:Utils.java

示例3: getImage

import net.imglib2.img.display.imagej.ImageJFunctions; //导入方法依赖的package包/类
@Override
public RandomAccessibleInterval< UnsignedShortType > getImage( final ViewId view )
{
	final String fn = filenames.get( view );
	if ( useImageJOpener )
	{
		final ImagePlus imp = new ImagePlus( fn );
		if ( imp.getType() == ImagePlus.GRAY16 )
			return new ImgPlus<>( ImageJFunctions.wrapShort( imp ) );
		else if ( imp.getType() == ImagePlus.GRAY8 )
		{
			System.out.println( "wrapping" );
			return new ImgPlus<>(
				new ImgView<>(
						Converters.convert(
								( RandomAccessibleInterval<UnsignedByteType> ) ImageJFunctions.wrapByte( imp ),
								new Converter< UnsignedByteType, UnsignedShortType >() {
									@Override
									public void convert( final UnsignedByteType input, final UnsignedShortType output )
									{
										output.set( input.get() );
									}
								},
								new UnsignedShortType()
						), null ) );
		}
		else
			useImageJOpener = false;
	}

	try
	{
		return opener.openImg( fn, factory, type );
	}
	catch ( final ImgIOException e )
	{
		throw new RuntimeException( e );
	}
}
 
开发者ID:bigdataviewer,项目名称:bigdataviewer_fiji,代码行数:40,代码来源:LegacyStackImageLoader.java

示例4: load

import net.imglib2.img.display.imagej.ImageJFunctions; //导入方法依赖的package包/类
@Override
public RandomAccessibleInterval< UnsignedShortType > load( final String fn )
{
	return ImageJFunctions.wrapShort( new ImagePlus( fn ) );
}
 
开发者ID:bigdataviewer,项目名称:bigdataviewer_fiji,代码行数:6,代码来源:FusionImageLoader.java


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