public class Hdf5ImageLoader extends Object implements ViewerImgLoader, MultiResolutionImgLoader
| Modifier and Type | Class and Description |
|---|---|
class |
Hdf5ImageLoader.SetupImgLoader |
| Modifier and Type | Field and Description |
|---|---|
protected VolatileGlobalCellCache |
cache |
protected HashMap<ViewLevelId,DimsAndExistence> |
cachedDimsAndExistence
Maps
ViewLevelId (timepoint, setup, level) to
DimsAndExistence. |
protected ch.systemsx.cisd.hdf5.IHDF5Reader |
existingHdf5Reader
The
Hdf5ImageLoader can be constructed with an existing
IHDF5Reader which if non-null will be used instead of creating a
new one on hdf5File. |
protected bdv.img.hdf5.IHDF5Access |
hdf5Access |
protected File |
hdf5File |
protected int |
maxNumLevels |
protected ArrayList<Partition> |
partitions
List of partitions if the dataset is split across several files
|
protected AbstractSequenceDescription<?,?,?> |
sequenceDescription |
protected HashMap<Integer,Hdf5ImageLoader.SetupImgLoader> |
setupImgLoaders
Maps setup id to
Hdf5ImageLoader.SetupImgLoader. |
protected Hdf5VolatileShortArrayLoader |
shortLoader |
| Modifier | Constructor and Description |
|---|---|
|
Hdf5ImageLoader(File hdf5File,
ArrayList<Partition> hdf5Partitions,
AbstractSequenceDescription<?,?,?> sequenceDescription) |
|
Hdf5ImageLoader(File hdf5File,
ArrayList<Partition> hdf5Partitions,
AbstractSequenceDescription<?,?,?> sequenceDescription,
boolean doOpen) |
protected |
Hdf5ImageLoader(File hdf5File,
ch.systemsx.cisd.hdf5.IHDF5Reader existingHdf5Reader,
ArrayList<Partition> hdf5Partitions,
AbstractSequenceDescription<?,?,?> sequenceDescription,
boolean doOpen) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Clear the cache and close the hdf5 file.
|
boolean |
existsImageData(ViewLevelId id)
Checks whether the given image data is present in the hdf5.
|
VolatileGlobalCellCache |
getCacheControl() |
DimsAndExistence |
getDimsAndExistence(ViewLevelId id) |
File |
getHdf5File() |
ArrayList<Partition> |
getPartitions() |
Hdf5ImageLoader.SetupImgLoader |
getSetupImgLoader(int setupId) |
Hdf5VolatileShortArrayLoader |
getShortArrayLoader() |
void |
initCachedDimensionsFromHdf5(boolean background) |
void |
printMipmapInfo() |
void |
setCreatedSharedQueue(SharedQueue createdSharedQueue)
Use the given
SharedQueue to asynchronously load blocks. |
void |
setNumFetcherThreads(int n)
Set the number of fetcher threads that will be created to asynchronously load
blocks.
|
protected File hdf5File
protected ch.systemsx.cisd.hdf5.IHDF5Reader existingHdf5Reader
Hdf5ImageLoader can be constructed with an existing
IHDF5Reader which if non-null will be used instead of creating a
new one on hdf5File.
Note that close() will not close the existingHdf5Reader!
protected bdv.img.hdf5.IHDF5Access hdf5Access
protected VolatileGlobalCellCache cache
protected Hdf5VolatileShortArrayLoader shortLoader
protected final HashMap<Integer,Hdf5ImageLoader.SetupImgLoader> setupImgLoaders
Hdf5ImageLoader.SetupImgLoader.protected final ArrayList<Partition> partitions
protected int maxNumLevels
protected final HashMap<ViewLevelId,DimsAndExistence> cachedDimsAndExistence
ViewLevelId (timepoint, setup, level) to
DimsAndExistence. Every entry is either null or the existence and
dimensions of one image. This is filled in when an image is loaded for
the first time.protected final AbstractSequenceDescription<?,?,?> sequenceDescription
public Hdf5ImageLoader(File hdf5File, ArrayList<Partition> hdf5Partitions, AbstractSequenceDescription<?,?,?> sequenceDescription)
hdf5File - hdf5Partitions - sequenceDescription - the AbstractSequenceDescription. When loading images,
this may be used to retrieve additional information for a
ViewId, such as setup name, Angle,
Channel, etc.public Hdf5ImageLoader(File hdf5File, ArrayList<Partition> hdf5Partitions, AbstractSequenceDescription<?,?,?> sequenceDescription, boolean doOpen)
protected Hdf5ImageLoader(File hdf5File, ch.systemsx.cisd.hdf5.IHDF5Reader existingHdf5Reader, ArrayList<Partition> hdf5Partitions, AbstractSequenceDescription<?,?,?> sequenceDescription, boolean doOpen)
public void setNumFetcherThreads(int n)
ViewerImgLoadern=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.
setNumFetcherThreads in interface ViewerImgLoaderpublic void setCreatedSharedQueue(SharedQueue createdSharedQueue)
ViewerImgLoaderSharedQueue to 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.
setCreatedSharedQueue in interface ViewerImgLoaderpublic void close()
public void initCachedDimensionsFromHdf5(boolean background)
public File getHdf5File()
public VolatileGlobalCellCache getCacheControl()
getCacheControl in interface ViewerImgLoaderpublic Hdf5VolatileShortArrayLoader getShortArrayLoader()
public boolean existsImageData(ViewLevelId id)
public DimsAndExistence getDimsAndExistence(ViewLevelId id)
public void printMipmapInfo()
public Hdf5ImageLoader.SetupImgLoader getSetupImgLoader(int setupId)
getSetupImgLoader in interface ViewerImgLoadergetSetupImgLoader in interface BasicImgLoadergetSetupImgLoader in interface BasicMultiResolutionImgLoadergetSetupImgLoader in interface ImgLoadergetSetupImgLoader in interface MultiResolutionImgLoaderCopyright © 2012–2022 BigDataViewer. All rights reserved.