- java.lang.Object
-
- bdv.img.remote.RemoteImageLoader
-
- All Implemented Interfaces:
ViewerImgLoader,mpicbg.spim.data.generic.sequence.BasicImgLoader,mpicbg.spim.data.generic.sequence.BasicMultiResolutionImgLoader
public class RemoteImageLoader extends Object implements ViewerImgLoader
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classRemoteImageLoader.SetupImgLoader
-
Field Summary
Fields Modifier and Type Field Description protected StringbaseUrlprotected VolatileGlobalCellCachecacheprotected HashMap<ViewLevelId,int[]>cellsDimensionsprotected RemoteImageLoaderMetaDatametadataprotected HashMap<Integer,RemoteImageLoader.SetupImgLoader>setupImgLoadersTODOprotected RemoteVolatileShortArrayLoadershortLoader
-
Constructor Summary
Constructors Constructor Description RemoteImageLoader(String baseUrl)RemoteImageLoader(String baseUrl, boolean doOpen)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexistsImageData(ViewLevelId id)Checks whether the given image data is present on the server.VolatileGlobalCellCachegetCacheControl()DimsAndExistencegetDimsAndExistence(ViewLevelId id)MipmapInfogetMipmapInfo(int setupId)protected <T> net.imglib2.RandomAccessibleInterval<T>getMissingDataImage(ViewLevelId id, T constant)For images that are missing in the hdf5, a constant image is created.RemoteImageLoader.SetupImgLoadergetSetupImgLoader(int setupId)protected <T extends net.imglib2.type.NativeType<T>>
net.imglib2.RandomAccessibleInterval<T>prepareCachedImage(ViewLevelId id, net.imglib2.cache.volatiles.LoadingStrategy loadingStrategy, T type)Create aVolatileCachedCellImgbacked by the cache.-
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
-
-
-
-
Field Detail
-
baseUrl
protected String baseUrl
-
metadata
protected RemoteImageLoaderMetaData metadata
-
cellsDimensions
protected HashMap<ViewLevelId,int[]> cellsDimensions
-
cache
protected VolatileGlobalCellCache cache
-
shortLoader
protected RemoteVolatileShortArrayLoader shortLoader
-
setupImgLoaders
protected final HashMap<Integer,RemoteImageLoader.SetupImgLoader> setupImgLoaders
TODO
-
-
Constructor Detail
-
RemoteImageLoader
public RemoteImageLoader(String baseUrl) throws IOException
- Throws:
IOException
-
RemoteImageLoader
public RemoteImageLoader(String baseUrl, boolean doOpen) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getSetupImgLoader
public RemoteImageLoader.SetupImgLoader 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
-
getCacheControl
public VolatileGlobalCellCache getCacheControl()
- Specified by:
getCacheControlin interfaceViewerImgLoader
-
getMipmapInfo
public MipmapInfo getMipmapInfo(int setupId)
-
existsImageData
public boolean existsImageData(ViewLevelId id)
Checks whether the given image data is present on the server.- Returns:
- true, if the given image data is present.
-
getMissingDataImage
protected <T> net.imglib2.RandomAccessibleInterval<T> getMissingDataImage(ViewLevelId id, T constant)
For images that are missing in the hdf5, a constant image is created. If the dimension of the missing image is known (seegetDimsAndExistence(ViewLevelId)) then use that. Otherwise create a 1x1x1 image.
-
getDimsAndExistence
public DimsAndExistence getDimsAndExistence(ViewLevelId id)
-
prepareCachedImage
protected <T extends net.imglib2.type.NativeType<T>> net.imglib2.RandomAccessibleInterval<T> prepareCachedImage(ViewLevelId id, net.imglib2.cache.volatiles.LoadingStrategy loadingStrategy, T type)
Create aVolatileCachedCellImgbacked by the cache. Thetypeshould be eitherUnsignedShortTypeandVolatileUnsignedShortType.
-
-