- java.lang.Object
-
- bdv.AbstractViewerSetupImgLoader<net.imglib2.type.numeric.integer.UnsignedByteType,net.imglib2.type.volatiles.VolatileUnsignedByteType>
-
- bdv.img.openconnectome.OpenConnectomeImageLoader
-
- All Implemented Interfaces:
ViewerImgLoader,ViewerSetupImgLoader<net.imglib2.type.numeric.integer.UnsignedByteType,net.imglib2.type.volatiles.VolatileUnsignedByteType>,mpicbg.spim.data.generic.sequence.BasicImgLoader,mpicbg.spim.data.generic.sequence.BasicMultiResolutionImgLoader,mpicbg.spim.data.generic.sequence.BasicMultiResolutionSetupImgLoader<net.imglib2.type.numeric.integer.UnsignedByteType>,mpicbg.spim.data.generic.sequence.BasicSetupImgLoader<net.imglib2.type.numeric.integer.UnsignedByteType>
public class OpenConnectomeImageLoader extends AbstractViewerSetupImgLoader<net.imglib2.type.numeric.integer.UnsignedByteType,net.imglib2.type.volatiles.VolatileUnsignedByteType> implements ViewerImgLoader
-
-
Field Summary
-
Fields inherited from class bdv.AbstractViewerSetupImgLoader
type, volatileType
-
-
Constructor Summary
Constructors Constructor Description OpenConnectomeImageLoader(String baseUrl, String token, String mode)
-
Method Summary
-
Methods inherited from class bdv.AbstractViewerSetupImgLoader
getImage, getImageType, getVolatileImageType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface bdv.ViewerImgLoader
setCreatedSharedQueue, setNumFetcherThreads
-
-
-
-
Method Detail
-
fetchTokenList
public static final String[] fetchTokenList(String baseUrl) throws com.google.gson.JsonSyntaxException, com.google.gson.JsonIOException, IOException
Fetch the list of public tokens from an OpenConnectome volume cutout service, e.g. "http://openconnecto.me/ocp/ca/public_tokens/".- Parameters:
baseUrl- e.g. "http://openconnecto.me/ocp/ca"- Returns:
- a list of
Strings - Throws:
com.google.gson.JsonSyntaxExceptioncom.google.gson.JsonIOExceptionIOException
-
fetchTokenInfo
public static final OpenConnectomeTokenInfo fetchTokenInfo(String baseUrl, String token) throws com.google.gson.JsonSyntaxException, com.google.gson.JsonIOException, IOException
Fetch information for a token from an OpenConnectome volume cutout service, e.g. "http://openconnecto.me/ocp/ca/<token>/info/".- Parameters:
baseUrl- e.g. "http://openconnecto.me/ocp/ca"token- the token whose information is desired- Returns:
- an
OpenConnectomeTokenInfoinstance that carries the token information - Throws:
com.google.gson.JsonSyntaxExceptioncom.google.gson.JsonIOExceptionIOException
-
tryFetchTokenList
public static final String[] tryFetchTokenList(String baseUrl, int maxNumTrials)
Try to fetch the list of public tokens from an OpenConnectome volume cutout service, e.g. "http://openconnecto.me/ocp/ca/public_tokens/".- Parameters:
baseUrl- e.g. "http://openconnecto.me/ocp/ca"maxNumTrials- the maximum number of trials- Returns:
- a list of
StringsornullifmaxNumTrialswere executed without success
-
tryFetchTokenInfo
public static final OpenConnectomeTokenInfo tryFetchTokenInfo(String baseUrl, String token, int maxNumTrials)
Try to fetch information for a token from an OpenConnectome volume cutout service, e.g. "http://openconnecto.me/ocp/ca/<token>/info/".- Parameters:
baseUrl- e.g. "http://openconnecto.me/ocp/ca"token-maxNumTrials-- Returns:
- an
OpenConnectomeTokenInfoinstance that carries the token information ornullifmaxNumTrialswere executed without success
-
getImage
public net.imglib2.RandomAccessibleInterval<net.imglib2.type.numeric.integer.UnsignedByteType> getImage(int timepointId, int level, mpicbg.spim.data.generic.sequence.ImgLoaderHint... hints)
- Specified by:
getImagein interfacempicbg.spim.data.generic.sequence.BasicMultiResolutionSetupImgLoader<net.imglib2.type.numeric.integer.UnsignedByteType>
-
getVolatileImage
public net.imglib2.RandomAccessibleInterval<net.imglib2.type.volatiles.VolatileUnsignedByteType> getVolatileImage(int timepointId, int level, mpicbg.spim.data.generic.sequence.ImgLoaderHint... hints)
-
getMipmapResolutions
public double[][] getMipmapResolutions()
- Specified by:
getMipmapResolutionsin interfacempicbg.spim.data.generic.sequence.BasicMultiResolutionSetupImgLoader<net.imglib2.type.numeric.integer.UnsignedByteType>
-
numMipmapLevels
public int numMipmapLevels()
- Specified by:
numMipmapLevelsin interfacempicbg.spim.data.generic.sequence.BasicMultiResolutionSetupImgLoader<net.imglib2.type.numeric.integer.UnsignedByteType>
-
getMipmapTransforms
public net.imglib2.realtransform.AffineTransform3D[] getMipmapTransforms()
- Specified by:
getMipmapTransformsin interfacempicbg.spim.data.generic.sequence.BasicMultiResolutionSetupImgLoader<net.imglib2.type.numeric.integer.UnsignedByteType>
-
prepareCachedImage
protected <T extends net.imglib2.type.NativeType<T>> VolatileCachedCellImg<T,net.imglib2.img.basictypeaccess.volatiles.array.VolatileByteArray> prepareCachedImage(int timepointId, int setupId, int level, net.imglib2.cache.volatiles.LoadingStrategy loadingStrategy, T type)
Create aVolatileCachedCellImgbacked by the cache. The type should be eitherARGBTypeandVolatileARGBType.
-
getCacheControl
public CacheControl getCacheControl()
- Specified by:
getCacheControlin interfaceViewerImgLoader
-
getSetupImgLoader
public ViewerSetupImgLoader<?,?> getSetupImgLoader(int setupId)
- Specified by:
getSetupImgLoaderin interfacempicbg.spim.data.generic.sequence.BasicImgLoader- Specified by:
getSetupImgLoaderin interfacempicbg.spim.data.generic.sequence.BasicMultiResolutionImgLoader- Specified by:
getSetupImgLoaderin interfaceViewerImgLoader
-
-