Package edu.gsu.cs.dmlab.databases
Class ImageDBConnection
- java.lang.Object
-
- edu.gsu.cs.dmlab.databases.NonCacheImageDBConnection
-
- edu.gsu.cs.dmlab.databases.ImageDBConnection
-
- All Implemented Interfaces:
ISTImageDBConnection
- Direct Known Subclasses:
HelioviewerPullingAIAImageDBConnection
public class ImageDBConnection extends NonCacheImageDBConnection
This class extends theNonCacheImageDBConnecton
by adding a cache to the image parameters that are pulled by IEvent from the database. It does not change any other functionality of the super class.- Author:
- Dustin Kempton, Data Mining Lab, Georgia State University
-
-
Constructor Summary
Constructors Constructor Description ImageDBConnection(DataSource dsourc, IImgParamNormalizer normalizer, int paramDim, int paramDownSample, org.slf4j.Logger logger, int maxCacheSize)
Constructor that defines the parameter dimension and down sampling used to match the input coordinates with the reduced dimensionality parameter space.ImageDBConnection(DataSource dsourc, IImgParamNormalizer normalizer, org.slf4j.Logger logger, int maxCacheSize)
Constructor that assumes default values for parameter down sample and the number of parameters for each image cell.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finalize()
double[][][]
getImageParamForWave(ISpatialTemporalObj event, Waveband wavelength, boolean leftSide)
Gets the image parameters for the given wavelength that intersect the MBR of the IEvent that is passed in.-
Methods inherited from class edu.gsu.cs.dmlab.databases.NonCacheImageDBConnection
getFirstFullImage, getFirstImage, getFirstImageSparseVectForId, getFullImgForId, getHeaderForId, getImageIdsForInterval, getImageParamForEv, getImageParamForId, getImageSparseVectForId, getImgForId
-
-
-
-
Constructor Detail
-
ImageDBConnection
public ImageDBConnection(DataSource dsourc, IImgParamNormalizer normalizer, org.slf4j.Logger logger, int maxCacheSize)
Constructor that assumes default values for parameter down sample and the number of parameters for each image cell. Those values are a division by 64 for all coordinates of input events, and 10 image parameters per cell location.- Parameters:
dsourc
- The data source connection that is used to connect to the database.normalizer
- The image parameter normalizer, can be null, and if it is, then no normalization is performed on the parameters before return. Else, parameters are normalized prior to return using this object.logger
- Logger used to report errors that occurred while processing data requests.maxCacheSize
- The number of input event and wavelength pairs to cache the image parameter cube for before replacing with LRU ordering.
-
ImageDBConnection
public ImageDBConnection(DataSource dsourc, IImgParamNormalizer normalizer, int paramDim, int paramDownSample, org.slf4j.Logger logger, int maxCacheSize)
Constructor that defines the parameter dimension and down sampling used to match the input coordinates with the reduced dimensionality parameter space.- Parameters:
dsourc
- The data source connection that is used to connect to the database.normalizer
- The image parameter normalizer, can be null, and if it is, then no normalization is performed on the parameters before return. Else, parameters are normalized prior to return using this object.paramDim
- The depth of image parameters (I.E. the number calculated) at each cell location.paramDownSample
- The divisor used to match the input coordinates with the reduced dimensionality parameter space.logger
- Logger used to report errors that occurred while processing data requests.maxCacheSize
- The number of input event and wavelength pairs to cache the image parameter cube for before replacing with LRU ordering.
-
-
Method Detail
-
finalize
public void finalize() throws Throwable
- Overrides:
finalize
in classNonCacheImageDBConnection
- Throws:
Throwable
-
getImageParamForWave
public double[][][] getImageParamForWave(ISpatialTemporalObj event, Waveband wavelength, boolean leftSide)
Description copied from interface:ISTImageDBConnection
Gets the image parameters for the given wavelength that intersect the MBR of the IEvent that is passed in. The parameters are in the form [x][y][paramId]- Specified by:
getImageParamForWave
in interfaceISTImageDBConnection
- Overrides:
getImageParamForWave
in classNonCacheImageDBConnection
- Parameters:
event
- The event that we want the image parameters for.wavelength
- The wavelength of image that we want the parameters of.leftSide
- If left side, we use the end time of the IEvent, if not we use the begin time.- Returns:
- The image parameters that intersect the MBR.
-
-