本文整理汇总了Java中net.imglib2.img.planar.PlanarImg类的典型用法代码示例。如果您正苦于以下问题:Java PlanarImg类的具体用法?Java PlanarImg怎么用?Java PlanarImg使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PlanarImg类属于net.imglib2.img.planar包,在下文中一共展示了PlanarImg类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createUnsignedByteInstance
import net.imglib2.img.planar.PlanarImg; //导入依赖的package包/类
@SuppressWarnings( "unchecked" )
public static BigWarpImageStackImageLoader< UnsignedByteType, ByteArray > createUnsignedByteInstance( final ImagePlus imp, int[] ids )
{
return new BigWarpImageStackImageLoader< UnsignedByteType, ByteArray >( new UnsignedByteType(), imp, ids )
{
@Override
protected ByteArray wrapPixels( final Object array )
{
return new ByteArray( ( byte[] ) array );
}
@Override
protected void linkType( final PlanarImg< UnsignedByteType, ByteArray > img )
{
img.setLinkedType( new UnsignedByteType( img ) );
}
};
}
开发者ID:saalfeldlab,项目名称:bigwarp,代码行数:19,代码来源:BigWarpImageStackImageLoader.java
示例2: createUnsignedShortInstance
import net.imglib2.img.planar.PlanarImg; //导入依赖的package包/类
@SuppressWarnings( "unchecked" )
public static BigWarpImageStackImageLoader< UnsignedShortType, ShortArray > createUnsignedShortInstance( final ImagePlus imp, int[] ids )
{
return new BigWarpImageStackImageLoader< UnsignedShortType, ShortArray >( new UnsignedShortType(), imp, ids )
{
@Override
protected ShortArray wrapPixels( final Object array )
{
return new ShortArray( ( short[] ) array );
}
@Override
protected void linkType( final PlanarImg< UnsignedShortType, ShortArray > img )
{
img.setLinkedType( new UnsignedShortType( img ) );
}
};
}
开发者ID:saalfeldlab,项目名称:bigwarp,代码行数:19,代码来源:BigWarpImageStackImageLoader.java
示例3: createFloatInstance
import net.imglib2.img.planar.PlanarImg; //导入依赖的package包/类
@SuppressWarnings( "unchecked" )
public static BigWarpImageStackImageLoader< FloatType, FloatArray > createFloatInstance( final ImagePlus imp, int[] ids )
{
return new BigWarpImageStackImageLoader< FloatType, FloatArray >( new FloatType(), imp, ids )
{
@Override
protected FloatArray wrapPixels( final Object array )
{
return new FloatArray( ( float[] ) array );
}
@Override
protected void linkType( final PlanarImg< FloatType, FloatArray > img )
{
img.setLinkedType( new FloatType( img ) );
}
};
}
开发者ID:saalfeldlab,项目名称:bigwarp,代码行数:19,代码来源:BigWarpImageStackImageLoader.java
示例4: createARGBInstance
import net.imglib2.img.planar.PlanarImg; //导入依赖的package包/类
@SuppressWarnings( "unchecked" )
public static BigWarpImageStackImageLoader< ARGBType, IntArray > createARGBInstance( final ImagePlus imp, int[] ids )
{
return new BigWarpImageStackImageLoader< ARGBType, IntArray >( new ARGBType(), imp, ids )
{
@Override
protected IntArray wrapPixels( final Object array )
{
return new IntArray( ( int[] ) array );
}
@Override
protected void linkType( final PlanarImg< ARGBType, IntArray > img )
{
img.setLinkedType( new ARGBType( img ) );
}
};
}
开发者ID:saalfeldlab,项目名称:bigwarp,代码行数:19,代码来源:BigWarpImageStackImageLoader.java
示例5: createUnsignedByteInstance
import net.imglib2.img.planar.PlanarImg; //导入依赖的package包/类
public static ImageStackImageLoader< UnsignedByteType, ByteArray > createUnsignedByteInstance( final ImagePlus imp )
{
return new ImageStackImageLoader< UnsignedByteType, ByteArray >( new UnsignedByteType(), imp )
{
@Override
protected ByteArray wrapPixels( final Object array )
{
return new ByteArray( ( byte[] ) array );
}
@Override
protected void linkType( final PlanarImg< UnsignedByteType, ByteArray > img )
{
img.setLinkedType( new UnsignedByteType( img ) );
}
};
}
开发者ID:bigdataviewer,项目名称:bigdataviewer_fiji,代码行数:18,代码来源:ImageStackImageLoader.java
示例6: createUnsignedShortInstance
import net.imglib2.img.planar.PlanarImg; //导入依赖的package包/类
public static ImageStackImageLoader< UnsignedShortType, ShortArray > createUnsignedShortInstance( final ImagePlus imp )
{
return new ImageStackImageLoader< UnsignedShortType, ShortArray >( new UnsignedShortType(), imp )
{
@Override
protected ShortArray wrapPixels( final Object array )
{
return new ShortArray( ( short[] ) array );
}
@Override
protected void linkType( final PlanarImg< UnsignedShortType, ShortArray > img )
{
img.setLinkedType( new UnsignedShortType( img ) );
}
};
}
开发者ID:bigdataviewer,项目名称:bigdataviewer_fiji,代码行数:18,代码来源:ImageStackImageLoader.java
示例7: createFloatInstance
import net.imglib2.img.planar.PlanarImg; //导入依赖的package包/类
public static ImageStackImageLoader< FloatType, FloatArray > createFloatInstance( final ImagePlus imp )
{
return new ImageStackImageLoader< FloatType, FloatArray >( new FloatType(), imp )
{
@Override
protected FloatArray wrapPixels( final Object array )
{
return new FloatArray( ( float[] ) array );
}
@Override
protected void linkType( final PlanarImg< FloatType, FloatArray > img )
{
img.setLinkedType( new FloatType( img ) );
}
};
}
开发者ID:bigdataviewer,项目名称:bigdataviewer_fiji,代码行数:18,代码来源:ImageStackImageLoader.java
示例8: createARGBInstance
import net.imglib2.img.planar.PlanarImg; //导入依赖的package包/类
public static ImageStackImageLoader< ARGBType, IntArray > createARGBInstance( final ImagePlus imp )
{
return new ImageStackImageLoader< ARGBType, IntArray >( new ARGBType(), imp )
{
@Override
protected IntArray wrapPixels( final Object array )
{
return new IntArray( ( int[] ) array );
}
@Override
protected void linkType( final PlanarImg< ARGBType, IntArray > img )
{
img.setLinkedType( new ARGBType( img ) );
}
};
}
开发者ID:bigdataviewer,项目名称:bigdataviewer_fiji,代码行数:18,代码来源:ImageStackImageLoader.java
示例9: getImage
import net.imglib2.img.planar.PlanarImg; //导入依赖的package包/类
@Override
public RandomAccessibleInterval< T > getImage( final int timepointId, final ImgLoaderHint... hints )
{
return new PlanarImg< T, A >( dim, type.getEntitiesPerPixel() )
{
private PlanarImg< T, A > init()
{
final int channel = setupId + 1;
final int frame = timepointId + 1;
for ( int slice = 1; slice <= dim[ 2 ]; ++slice )
mirror.set( slice - 1, wrapPixels( imp.getStack().getPixels( imp.getStackIndex( channel, slice, frame ) ) ) );
linkType( this );
return this;
}
}.init();
}
开发者ID:bigdataviewer,项目名称:bigdataviewer_fiji,代码行数:17,代码来源:ImageStackImageLoader.java
示例10: getPlaneCount
import net.imglib2.img.planar.PlanarImg; //导入依赖的package包/类
/**
* @return The number of planes in the provided {@link Img}.
*/
private int getPlaneCount(final Img<?> img) {
// PlanarImg case
if (PlanarImg.class.isAssignableFrom(img.getClass())) {
final PlanarImg<?, ?> planarImg = (PlanarImg<?, ?>) img;
return planarImg.numSlices();
}
// General case
int count = 1;
for (int d = 2; d < img.numDimensions(); d++) {
count *= img.dimension(d);
}
return count;
}
开发者ID:scifio,项目名称:scifio,代码行数:19,代码来源:ImgSaver.java
示例11: getImage
import net.imglib2.img.planar.PlanarImg; //导入依赖的package包/类
@Override
public RandomAccessibleInterval< T > getImage( final int timepointId, final ImgLoaderHint... hints )
{
return new PlanarImg< T, A >( dim, type.getEntitiesPerPixel() )
{
private PlanarImg< T, A > init()
{
final int frame = timepointId + 1;
for ( int slice = 1; slice <= dim[ 2 ]; ++slice )
mirror.set( slice - 1, wrapPixels( imp.getStack().getPixels( imp.getStackIndex( channel + 1, slice, frame ) ) ) );
linkType( this );
return this;
}
}.init();
}
开发者ID:saalfeldlab,项目名称:bigwarp,代码行数:16,代码来源:BigWarpImageStackImageLoader.java
示例12: extractArray2d
import net.imglib2.img.planar.PlanarImg; //导入依赖的package包/类
static private final ArrayDataAccess<?> extractArray2d(final Img<?> img) {
if (img.getClass() == ArrayImg.class) {
return (ArrayDataAccess<?>) ((ArrayImg<?,?>)img).update(null);
}
if (img.getClass() == ImgPlus.class) {
return extractArray2d(((ImgPlus<?>)img).getImg());
}
if (img.getClass() == PlanarImg.class) {
return ((PlanarImg<?,?>)img).getPlane(0);
}
if (img.getClass() == ImgProxy.class) {
return extractArray2d(((ImgProxy<?>)img).image());
}
return null;
}
开发者ID:imglib,项目名称:imglib2-script,代码行数:16,代码来源:FastIntegralImg.java
示例13: createPlanarImage
import net.imglib2.img.planar.PlanarImg; //导入依赖的package包/类
private Img<UnsignedByteType> createPlanarImage(final byte[] data,
final int w, final int h)
{
// return createImage(data, width, height, new PlanarContainerFactory());
// NB: Avoid copying the data.
final PlanarImg<UnsignedByteType, ByteArray> planarContainer =
new PlanarImg<UnsignedByteType, ByteArray>(new long[] { w, h }, new Fraction());
planarContainer.setPlane(0, new ByteArray(data));
planarContainer.setLinkedType(new UnsignedByteType(planarContainer));
return planarContainer;
}
开发者ID:imglib,项目名称:imglib2-tests,代码行数:12,代码来源:PerformanceBenchmark.java
示例14: invertPlanarImage
import net.imglib2.img.planar.PlanarImg; //导入依赖的package包/类
/** Explicit planar version. */
private void invertPlanarImage(final PlanarImg<UnsignedByteType, ByteArray> img) {
final PlanarCursor<UnsignedByteType> c = img.cursor();
while ( c.hasNext() ) {
final UnsignedByteType t = c.next();
final int value = t.get();
final int result = 255 - value;
t.set(result);
}
}
开发者ID:imglib,项目名称:imglib2-tests,代码行数:11,代码来源:ImglibBenchmark.java
示例15: randomizePlanarImage
import net.imglib2.img.planar.PlanarImg; //导入依赖的package包/类
/** Explicit planar version. */
private void randomizePlanarImage(final PlanarImg<UnsignedByteType, ByteArray> img) {
final PlanarCursor<UnsignedByteType> c = img.cursor();
while ( c.hasNext() ) {
final UnsignedByteType t = c.next();
final int value = t.get();
final double result = expensiveOperation(value);
t.set((int) result);
}
}
开发者ID:imglib,项目名称:imglib2-tests,代码行数:11,代码来源:ImglibBenchmark.java
示例16: add
import net.imglib2.img.planar.PlanarImg; //导入依赖的package包/类
@OpMethod(ops = { net.imagej.ops.math.ConstantToPlanarImage.AddByte.class,
net.imagej.ops.math.ConstantToPlanarImage.AddUnsignedByte.class })
public <B extends GenericByteType<B>> PlanarImg<B, ByteArray> add(
final PlanarImg<B, ByteArray> image, final byte value)
{
@SuppressWarnings("unchecked")
final PlanarImg<B, ByteArray> result = (PlanarImg<B, ByteArray>) ops().run(
Ops.Math.Add.NAME, image, value);
return result;
}
开发者ID:imagej,项目名称:imagej-ops,代码行数:11,代码来源:MathNamespace.java
示例17: divide
import net.imglib2.img.planar.PlanarImg; //导入依赖的package包/类
@OpMethod(ops = { net.imagej.ops.math.ConstantToPlanarImage.DivideByte.class,
net.imagej.ops.math.ConstantToPlanarImage.DivideUnsignedByte.class })
public <B extends GenericByteType<B>> PlanarImg<B, ByteArray> divide(
final PlanarImg<B, ByteArray> image, final byte value)
{
@SuppressWarnings("unchecked")
final PlanarImg<B, ByteArray> result = (PlanarImg<B, ByteArray>) ops().run(
Ops.Math.Divide.NAME, image, value);
return result;
}
开发者ID:imagej,项目名称:imagej-ops,代码行数:11,代码来源:MathNamespace.java
示例18: multiply
import net.imglib2.img.planar.PlanarImg; //导入依赖的package包/类
@OpMethod(ops = {
net.imagej.ops.math.ConstantToPlanarImage.MultiplyByte.class,
net.imagej.ops.math.ConstantToPlanarImage.MultiplyUnsignedByte.class })
public <B extends GenericByteType<B>> PlanarImg<B, ByteArray> multiply(
final PlanarImg<B, ByteArray> image, final byte value)
{
@SuppressWarnings("unchecked")
final PlanarImg<B, ByteArray> result = (PlanarImg<B, ByteArray>) ops().run(
Ops.Math.Divide.NAME, image, value);
return result;
}
开发者ID:imagej,项目名称:imagej-ops,代码行数:12,代码来源:MathNamespace.java
示例19: subtract
import net.imglib2.img.planar.PlanarImg; //导入依赖的package包/类
@OpMethod(ops = {
net.imagej.ops.math.ConstantToPlanarImage.SubtractByte.class,
net.imagej.ops.math.ConstantToPlanarImage.SubtractUnsignedByte.class })
public <B extends GenericByteType<B>> PlanarImg<B, ByteArray> subtract(
final PlanarImg<B, ByteArray> image, final byte value)
{
@SuppressWarnings("unchecked")
final PlanarImg<B, ByteArray> result = (PlanarImg<B, ByteArray>) ops().run(
Ops.Math.Subtract.NAME, image, value);
return result;
}
开发者ID:imagej,项目名称:imagej-ops,代码行数:12,代码来源:MathNamespace.java
示例20: ops
import net.imglib2.img.planar.PlanarImg; //导入依赖的package包/类
@OpMethod(ops = {
net.imagej.ops.math.ConstantToPlanarImage.SubtractLong.class,
net.imagej.ops.math.ConstantToPlanarImage.SubtractUnsignedLong.class })
public <N extends NativeType<N>, A extends ArrayDataAccess<A>> PlanarImg<N, A>
subtract(final PlanarImg<N, A> image, final long value)
{
@SuppressWarnings("unchecked")
final PlanarImg<N, A> result = (PlanarImg<N, A>) ops().run(
Ops.Math.Subtract.NAME, image, value);
return result;
}
开发者ID:imagej,项目名称:imagej-ops,代码行数:12,代码来源:MathNamespace.java
注:本文中的net.imglib2.img.planar.PlanarImg类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论