本文整理匯總了Java中net.imglib2.img.basictypeaccess.volatiles.array.VolatileIntArray類的典型用法代碼示例。如果您正苦於以下問題:Java VolatileIntArray類的具體用法?Java VolatileIntArray怎麽用?Java VolatileIntArray使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
VolatileIntArray類屬於net.imglib2.img.basictypeaccess.volatiles.array包,在下文中一共展示了VolatileIntArray類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: prepareCachedImage
import net.imglib2.img.basictypeaccess.volatiles.array.VolatileIntArray; //導入依賴的package包/類
/**
* (Almost) create a {@link CellImg} backed by the cache.
* The created image needs a {@link NativeImg#setLinkedType(net.imglib2.type.Type) linked type} before it can be used.
* The type should be either {@link ARGBType} and {@link VolatileARGBType}.
*/
protected < T extends NativeType< T > > CachedCellImg< T, VolatileIntArray > prepareCachedImage(
final int timepointId,
final int level,
final LoadingStrategy loadingStrategy )
{
final long[] dimensions = imageDimensions[ level ];
final int[] cellDimensions = new int[]{ tileWidth, tileHeight, 1 };
final int priority = 0;
final CacheHints cacheHints = new CacheHints( loadingStrategy, priority, false );
final CellCache< VolatileIntArray > c = cache.new VolatileCellCache< VolatileIntArray >( timepointId, setupId, level, cacheHints, arrayLoader );
final VolatileImgCells< VolatileIntArray > cells = new VolatileImgCells< VolatileIntArray >( c, new Fraction(), dimensions, cellDimensions );
final CachedCellImg< T, VolatileIntArray > img = new CachedCellImg< T, VolatileIntArray >( cells );
return img;
}
示例2: getImage
import net.imglib2.img.basictypeaccess.volatiles.array.VolatileIntArray; //導入依賴的package包/類
@Override
public RandomAccessibleInterval< ARGBType > getImage( final int timepointId, final int level, final ImgLoaderHint... hints )
{
final CachedCellImg< ARGBType, VolatileIntArray > img = prepareCachedImage( timepointId, level, LoadingStrategy.BLOCKING );
final ARGBType linkedType = new ARGBType( img );
img.setLinkedType( linkedType );
return img;
}
示例3: getVolatileImage
import net.imglib2.img.basictypeaccess.volatiles.array.VolatileIntArray; //導入依賴的package包/類
@Override
public RandomAccessibleInterval< VolatileARGBType > getVolatileImage( final int timepointId, final int level, final ImgLoaderHint... hints )
{
final CachedCellImg< VolatileARGBType, VolatileIntArray > img = prepareCachedImage( timepointId, level, LoadingStrategy.VOLATILE );
final VolatileARGBType linkedType = new VolatileARGBType( img );
img.setLinkedType( linkedType );
return img;
}
示例4: loadArray
import net.imglib2.img.basictypeaccess.volatiles.array.VolatileIntArray; //導入依賴的package包/類
@Override
public VolatileIntArray loadArray(
final int timepoint,
final int setup,
final int level,
final int[] dimensions,
final long[] min ) throws InterruptedException
{
final int[] data = new int[ dimensions[ 0 ] * dimensions[ 1 ] * dimensions[ 2 ] ];
try
{
final String urlString = makeUrl( min, dimensions );
// System.out.println( urlString + " " + data.length );
readBlock( urlString, data );
}
catch (final IOException e)
{
System.out.println(
"failed loading min = " +
Arrays.toString( min ) +
", dimensions = " +
Arrays.toString( dimensions ) );
}
return new VolatileIntArray( data, true );
}
示例5: loadArray
import net.imglib2.img.basictypeaccess.volatiles.array.VolatileIntArray; //導入依賴的package包/類
@Override
public VolatileIntArray loadArray( final int timepoint, final int setup, final int level, final int[] dimensions, final long[] min ) throws InterruptedException
{
final int channel = setup + 1;
final int slice = ( int ) min[ 2 ] + 1;
final int frame = timepoint + 1;
final int[] data = ( int[] ) imp.getStack().getProcessor( imp.getStackIndex( channel, slice, frame ) ).getPixels();
return new VolatileIntArray( data, true );
}
示例6: TrakEM2VolatileIntArrayLoader
import net.imglib2.img.basictypeaccess.volatiles.array.VolatileIntArray; //導入依賴的package包/類
/**
* <p>Create a {@link CacheArrayLoader} for a TrakEM2 source. Tiles are
* addressed by their pixel position and dimension.</p>
*
* @param
* @param tileWidth
* @param tileHeight
*/
public TrakEM2VolatileIntArrayLoader( final Loader loader, final LayerSet layerset, final int[] zScales )
{
theEmptyArray = new VolatileIntArray(1, false );
this.loader = loader;
this.layerset = layerset;
this.zScales = zScales;
}