public class OpenConnectomeImageLoader extends AbstractViewerSetupImgLoader<UnsignedByteType,VolatileUnsignedByteType> implements ViewerImgLoader
type, volatileType
Constructor and Description |
---|
OpenConnectomeImageLoader(String baseUrl,
String token,
String mode) |
Modifier and Type | Method and Description |
---|---|
static OpenConnectomeTokenInfo |
fetchTokenInfo(String baseUrl,
String token)
Fetch information for a token from an OpenConnectome volume cutout
service, e.g.
|
static String[] |
fetchTokenList(String baseUrl)
Fetch the list of public tokens from an OpenConnectome volume cutout
service, e.g.
|
CacheControl |
getCacheControl() |
RandomAccessibleInterval<UnsignedByteType> |
getImage(int timepointId,
int level,
ImgLoaderHint... hints)
Get the image at the specified timepoint and resolution level.
|
double[][] |
getMipmapResolutions()
Get the sub-sampling factors, indexed by resolution level and dimension.
|
AffineTransform3D[] |
getMipmapTransforms()
Get the transformation from coordinates of the sub-sampled image of a a
resolution level to coordinates of the full resolution image.
|
ViewerSetupImgLoader<?,?> |
getSetupImgLoader(int setupId)
Get the
BasicMultiResolutionSetupImgLoader for the specified view
setup. |
RandomAccessibleInterval<VolatileUnsignedByteType> |
getVolatileImage(int timepointId,
int level,
ImgLoaderHint... hints) |
int |
numMipmapLevels()
Get number of resolution levels.
|
protected <T extends NativeType<T>> |
prepareCachedImage(int timepointId,
int setupId,
int level,
LoadingStrategy loadingStrategy,
T type)
Create a
VolatileCachedCellImg backed by the cache. |
static OpenConnectomeTokenInfo |
tryFetchTokenInfo(String baseUrl,
String token,
int maxNumTrials)
Try to fetch information for a token from an OpenConnectome volume cutout
service, e.g.
|
static String[] |
tryFetchTokenList(String baseUrl,
int maxNumTrials)
Try to fetch the list of public tokens from an OpenConnectome volume
cutout service, e.g.
|
getImage, getImageType, getVolatileImageType
public static final String[] fetchTokenList(String baseUrl) throws com.google.gson.JsonSyntaxException, com.google.gson.JsonIOException, IOException
baseUrl
- e.g. "http://openconnecto.me/ocp/ca"Strings
com.google.gson.JsonSyntaxException
com.google.gson.JsonIOException
IOException
public static final OpenConnectomeTokenInfo fetchTokenInfo(String baseUrl, String token) throws com.google.gson.JsonSyntaxException, com.google.gson.JsonIOException, IOException
baseUrl
- e.g. "http://openconnecto.me/ocp/ca"token
- the token whose information is desiredOpenConnectomeTokenInfo
instance that carries the
token informationcom.google.gson.JsonSyntaxException
com.google.gson.JsonIOException
IOException
public static final String[] tryFetchTokenList(String baseUrl, int maxNumTrials)
baseUrl
- e.g. "http://openconnecto.me/ocp/ca"maxNumTrials
- the maximum number of trialsStrings
or null
if
maxNumTrials
were executed without successpublic static final OpenConnectomeTokenInfo tryFetchTokenInfo(String baseUrl, String token, int maxNumTrials)
baseUrl
- e.g. "http://openconnecto.me/ocp/ca"token
- maxNumTrials
- OpenConnectomeTokenInfo
instance that carries the
token information or null
if
maxNumTrials
were executed without successpublic RandomAccessibleInterval<UnsignedByteType> getImage(int timepointId, int level, ImgLoaderHint... hints)
BasicMultiResolutionSetupImgLoader
The returned image has pixel type T
(an instance of T
may
be obtained by BasicSetupImgLoader.getImageType()
).
getImage
in interface BasicMultiResolutionSetupImgLoader<UnsignedByteType>
timepointId
- timepoint for which to retrieve the image.level
- resolution level for which to retrieve the image.hints
- optional hints regarding how to load the image.public RandomAccessibleInterval<VolatileUnsignedByteType> getVolatileImage(int timepointId, int level, ImgLoaderHint... hints)
getVolatileImage
in interface ViewerSetupImgLoader<UnsignedByteType,VolatileUnsignedByteType>
public double[][] getMipmapResolutions()
BasicMultiResolutionSetupImgLoader
getMipmapResolutions
in interface BasicMultiResolutionSetupImgLoader<UnsignedByteType>
public int numMipmapLevels()
BasicMultiResolutionSetupImgLoader
numMipmapLevels
in interface BasicMultiResolutionSetupImgLoader<UnsignedByteType>
public AffineTransform3D[] getMipmapTransforms()
BasicMultiResolutionSetupImgLoader
getMipmapTransforms
in interface BasicMultiResolutionSetupImgLoader<UnsignedByteType>
protected <T extends NativeType<T>> VolatileCachedCellImg<T,VolatileByteArray> prepareCachedImage(int timepointId, int setupId, int level, LoadingStrategy loadingStrategy, T type)
VolatileCachedCellImg
backed by the cache. The type
should be either ARGBType
and VolatileARGBType
.public CacheControl getCacheControl()
getCacheControl
in interface ViewerImgLoader
public ViewerSetupImgLoader<?,?> getSetupImgLoader(int setupId)
BasicMultiResolutionImgLoader
BasicMultiResolutionSetupImgLoader
for the specified view
setup.getSetupImgLoader
in interface ViewerImgLoader
getSetupImgLoader
in interface BasicImgLoader
getSetupImgLoader
in interface BasicMultiResolutionImgLoader
setupId
- view setup for which to get the
BasicMultiResolutionSetupImgLoader
.BasicMultiResolutionSetupImgLoader
for the specified view
setup.Copyright © 2015–2021 Fiji. All rights reserved.