- java.lang.Object
-
- bdv.img.hdf5.Hdf5ImageLoader
-
- All Implemented Interfaces:
ViewerImgLoader,mpicbg.spim.data.generic.sequence.BasicImgLoader,mpicbg.spim.data.generic.sequence.BasicMultiResolutionImgLoader,mpicbg.spim.data.sequence.ImgLoader,mpicbg.spim.data.sequence.MultiResolutionImgLoader
public class Hdf5ImageLoader extends Object implements ViewerImgLoader, mpicbg.spim.data.sequence.MultiResolutionImgLoader
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classHdf5ImageLoader.SetupImgLoader<T extends net.imglib2.type.NativeType<T>,V extends net.imglib2.Volatile<T> & net.imglib2.type.NativeType<V>>
-
Constructor Summary
Constructors Modifier Constructor Description protectedHdf5ImageLoader(File hdf5File, ch.systemsx.cisd.hdf5.IHDF5Reader existingHdf5Reader, ArrayList<Partition> hdf5Partitions, mpicbg.spim.data.generic.sequence.AbstractSequenceDescription<?,?,?> sequenceDescription, boolean doOpen)Hdf5ImageLoader(File hdf5File, ArrayList<Partition> hdf5Partitions, mpicbg.spim.data.generic.sequence.AbstractSequenceDescription<?,?,?> sequenceDescription)Hdf5ImageLoader(File hdf5File, ArrayList<Partition> hdf5Partitions, mpicbg.spim.data.generic.sequence.AbstractSequenceDescription<?,?,?> sequenceDescription, boolean doOpen)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Clear the cache.booleanexistsImageData(ViewLevelId id)Checks whether the given image data is present in the hdf5.CacheControlgetCacheControl()DimsAndExistencegetDimsAndExistence(ViewLevelId id)FilegetHdf5File()ArrayList<Partition>getPartitions()Hdf5ImageLoader.SetupImgLoader<?,?>getSetupImgLoader(int setupId)voidprintMipmapInfo()voidsetCreatedSharedQueue(SharedQueue createdSharedQueue)Use the givenSharedQueueto asynchronously load blocks.voidsetNumFetcherThreads(int n)Set the number of fetcher threads that will be created to asynchronously load blocks.
-
-
-
Constructor Detail
-
Hdf5ImageLoader
public Hdf5ImageLoader(File hdf5File, ArrayList<Partition> hdf5Partitions, mpicbg.spim.data.generic.sequence.AbstractSequenceDescription<?,?,?> sequenceDescription)
- Parameters:
hdf5File-hdf5Partitions-sequenceDescription- theAbstractSequenceDescription. When loading images, this may be used to retrieve additional information for aViewId, such as setup name,Angle,Channel, etc.
-
Hdf5ImageLoader
public Hdf5ImageLoader(File hdf5File, ArrayList<Partition> hdf5Partitions, mpicbg.spim.data.generic.sequence.AbstractSequenceDescription<?,?,?> sequenceDescription, boolean doOpen)
-
Hdf5ImageLoader
protected Hdf5ImageLoader(File hdf5File, ch.systemsx.cisd.hdf5.IHDF5Reader existingHdf5Reader, ArrayList<Partition> hdf5Partitions, mpicbg.spim.data.generic.sequence.AbstractSequenceDescription<?,?,?> sequenceDescription, boolean doOpen)
-
-
Method Detail
-
setNumFetcherThreads
public void setNumFetcherThreads(int n)
Description copied from interface:ViewerImgLoaderSet the number of fetcher threads that will be created to asynchronously load blocks. It is permitted to setn=0, but that means that the volatile versions of images may not work correctly.This is an optional operation, i.e., some ImgLoader implementations may just ignore it.
This method should be called before using the image loader, otherwise it might not have the desired effect.
- Specified by:
setNumFetcherThreadsin interfaceViewerImgLoader
-
setCreatedSharedQueue
public void setCreatedSharedQueue(SharedQueue createdSharedQueue)
Description copied from interface:ViewerImgLoaderUse the givenSharedQueueto asynchronously load blocks.This is an optional operation, i.e., some ImgLoader implementations may just ignore it.
This method should be called before using the image loader, otherwise it might not have the desired effect.
- Specified by:
setCreatedSharedQueuein interfaceViewerImgLoader
-
close
public void close()
-
getHdf5File
public File getHdf5File()
-
getCacheControl
public CacheControl getCacheControl()
- Specified by:
getCacheControlin interfaceViewerImgLoader
-
existsImageData
public boolean existsImageData(ViewLevelId id)
Checks whether the given image data is present in the hdf5. Missing data may be caused by missing partition files- Returns:
- true, if the given image data is present.
-
getDimsAndExistence
public DimsAndExistence getDimsAndExistence(ViewLevelId id)
-
printMipmapInfo
public void printMipmapInfo()
-
getSetupImgLoader
public Hdf5ImageLoader.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 interfacempicbg.spim.data.sequence.ImgLoader- Specified by:
getSetupImgLoaderin interfacempicbg.spim.data.sequence.MultiResolutionImgLoader- Specified by:
getSetupImgLoaderin interfaceViewerImgLoader
-
-