本文整理汇总了Java中bdv.img.cache.CacheArrayLoader类的典型用法代码示例。如果您正苦于以下问题:Java CacheArrayLoader类的具体用法?Java CacheArrayLoader怎么用?Java CacheArrayLoader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CacheArrayLoader类属于bdv.img.cache包,在下文中一共展示了CacheArrayLoader类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AbstractKnossosImageLoader
import bdv.img.cache.CacheArrayLoader; //导入依赖的package包/类
public AbstractKnossosImageLoader(
final KnossosConfig config,
final String urlFormat,
final T type,
final V volatileType,
final CacheArrayLoader< A > loader,
final VolatileGlobalCellCache cache )
{
super(
0,
config.createDimensions(),
config.createCellDimensions(),
config.createMipmapResolutions(),
type,
volatileType,
loader,
cache );
this.config = config;
}
示例2: AbstractDvidSetupImageLoader
import bdv.img.cache.CacheArrayLoader; //导入依赖的package包/类
protected AbstractDvidSetupImageLoader(
final int setupId,
final T t,
final V v,
final ConstructorParameters parameters,
final CacheArrayLoader< A > loader ) throws JsonSyntaxException, JsonIOException, IOException
{
super(
setupId,
new long[][]{ parameters.dimensions },
new int[][]{ parameters.cellDimensions },
new double[][]{ parameters.resolutions },
t,
v,
loader,
new VolatileGlobalCellCache( 1, 10 ) );
}
示例3: typedLoader
import bdv.img.cache.CacheArrayLoader; //导入依赖的package包/类
static private CacheArrayLoader< VolatileLabelMultisetArray > typedLoader(
final IHDF5Reader reader,
final IHDF5Reader scaleReader,
final String dataset )
{
final HDF5DataSetInformation typeInfo = reader.object().getDataSetInformation( dataset );
final Class< ? > cls = typeInfo.getTypeInformation().tryGetJavaType();
// System.out.println( typeInfo.getTypeInformation().tryGetJavaType().toString() );
if ( float.class == cls )
return new H5FloatLabelMultisetArrayLoader( reader, scaleReader, dataset );
else if ( short.class == cls )
return new H5ShortLabelMultisetArrayLoader( reader, scaleReader, dataset );
else if ( int.class == cls )
return new H5IntLabelMultisetArrayLoader( reader, scaleReader, dataset );
else if ( long.class == cls )
return new H5LongLabelMultisetArrayLoader( reader, scaleReader, dataset );
else
return null;
}
示例4: AbstractH5SetupImageLoader
import bdv.img.cache.CacheArrayLoader; //导入依赖的package包/类
public AbstractH5SetupImageLoader(
final IHDF5Reader reader,
final String dataset,
final int setupId,
final int[] blockDimension,
final double[] resolution,
final double[] offset,
final T type,
final V vType,
final CacheArrayLoader< A > loader,
final VolatileGlobalCellCache cache ) throws IOException
{
super(
setupId,
new long[][] { readDimension( reader, dataset ) },
new int[][] { blockDimension },
new double[][] { resolution },
type,
vType,
loader,
cache );
this.offset = offset;
}
示例5: VirtualStackImageLoader
import bdv.img.cache.CacheArrayLoader; //导入依赖的package包/类
protected VirtualStackImageLoader( final ImagePlus imp, final CacheArrayLoader< A > loader, final T type, final V volatileType )
{
this.loader = loader;
dimensions = new long[] { imp.getWidth(), imp.getHeight(), imp.getNSlices() };
cellDimensions = new int[] { imp.getWidth(), imp.getHeight(), 1 };
final int numSetups = imp.getNChannels();
cache = new VolatileGlobalCellCache( 1, 1 );
setupImgLoaders = new ArrayList<>();
for ( int setupId = 0; setupId < numSetups; ++setupId )
setupImgLoaders.add( new SetupImgLoader( setupId, type, volatileType ) );
}
示例6: LabelblkMultisetSetupImageLoader
import bdv.img.cache.CacheArrayLoader; //导入依赖的package包/类
/**
* http://emrecon100.janelia.priv/api/help/labels64
*
* @param apiUrl e.g. "http://emrecon100.janelia.priv/api"
* @param nodeId e.g. "2a3fd320aef011e4b0ce18037320227c"
* @param dataInstanceId e.g. "bodies"
* @param resolutions
* @param dvidStores Array of {@link DatasetKeyValue} to manage
* load/write of {@link VolatileLabelMultisetArray} from dvid store.
* @throws IOException
* @throws JsonIOException
* @throws JsonSyntaxException
*/
@SuppressWarnings( "unchecked" )
public LabelblkMultisetSetupImageLoader(
final int setupId,
final String apiUrl,
final String nodeId,
final String dataInstanceId,
final double[][] resolutions,
final DatasetKeyValue[] dvidStores ) throws JsonSyntaxException, JsonIOException, IOException
{
super( LabelMultisetType.type, VolatileLabelMultisetType.type );
this.setupId = setupId;
final LabelblkDataInstance dataInstance =
JsonHelper.fetch(
apiUrl + "/node/" + nodeId + "/" + dataInstanceId + "/info",
LabelblkDataInstance.class );
this.dimensions = new long[ resolutions.length ][];
this.resolutions = new double[ resolutions.length ][];
for ( int i =0; i < resolutions.length; ++i )
{
this.resolutions[ i ] = Arrays.copyOf( resolutions[ i ], resolutions[ i ].length );
this.dimensions[ i ] = new long[]{
( long )Math.ceil( ( dataInstance.Extended.MaxPoint[ 0 ] + 1 - dataInstance.Extended.MinPoint[ 0 ] ) * resolutions[ i ][ 0 ] ),
( long )Math.ceil( ( dataInstance.Extended.MaxPoint[ 1 ] + 1 - dataInstance.Extended.MinPoint[ 1 ] ) * resolutions[ i ][ 1 ] ),
( long )Math.ceil( ( dataInstance.Extended.MaxPoint[ 2 ] + 1 - dataInstance.Extended.MinPoint[ 2 ] ) * resolutions[ i ][ 2 ] ) };
}
mipmapTransforms = new AffineTransform3D[ resolutions.length ];
for ( int level = 0; level < resolutions.length; level++ )
mipmapTransforms[ level ] = MipmapTransforms.getMipmapTransformDefault( resolutions[ level ] );
final int numMipmapLevels = resolutions.length;
cellDimensions = new int[ numMipmapLevels ][];
loaders = new CacheArrayLoader[ numMipmapLevels ];
/* first loader is a labels64 source */
cellDimensions[ 0 ] = dataInstance.Extended.BlockSize;
loaders[ 0 ] = new LabelblkMultisetVolatileArrayLoader( apiUrl, nodeId, dataInstanceId, cellDimensions[ 0 ] );
/* subsequent loaders are key value stores */
for ( int i = 0; i < dvidStores.length; ++i ) {
loaders[ i + 1 ] =
new DvidLabelMultisetArrayLoader( dvidStores[ i ] );
cellDimensions[ i + 1 ] = cellDimensions[ 0 ];
}
}