public class PixelsService extends AbstractFileSystemService implements org.springframework.context.ApplicationEventPublisherAware
Modifier and Type | Field and Description |
---|---|
protected BackOff |
backOff
BackOff implementation for calculating MissingPyramidExceptions
|
static String |
DV_FORMAT
The DeltaVision file format enumeration value
|
static int |
NULL_PLANE_SIZE
Null plane size constant.
|
static byte[] |
nullPlane
Null plane byte array.
|
static String |
PYRAMID_SUFFIX
Suffix for an the image pyramid of a given pixels set.
|
protected FilePathResolver |
resolver
Resolver of archived original file paths for pixels sets.
|
protected TileSizes |
sizes
TileSizes implementation for default values
|
FILES_PATH, PIXELS_PATH, ROOT_DEFAULT, THUMBNAILS_PATH
Constructor and Description |
---|
PixelsService(String path)
Constructor.
|
PixelsService(String path,
FilePathResolver resolver)
Constructor.
|
PixelsService(String path,
FilePathResolver resolver,
BackOff backOff,
TileSizes sizes)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected PixelBuffer |
createBfPixelBuffer(String filePath,
int series)
Helper method to properly log any exceptions raised by Bio-Formats.
|
protected BfPixelBuffer |
createMinMaxBfPixelBuffer(String filePath,
int series,
loci.formats.meta.IMinMaxStore store)
Helper method to properly log any exceptions raised by Bio-Formats and
add a min/max calculator wrapper to the reader stack.
|
PixelBuffer |
createPixelBuffer(ome.model.core.Pixels pixels)
Creates a PixelBuffer for a given pixels set.
|
protected BfPyramidPixelBuffer |
createPyramidPixelBuffer(ome.model.core.Pixels pixels,
String filePath,
boolean write)
Helper method to properly log any exceptions raised by Bio-Formats.
|
protected PixelBuffer |
createRomioPixelBuffer(String pixelsFilePath,
ome.model.core.Pixels pixels,
boolean allowModification)
Helper method to properlty create a RomioPixelBuffer.
|
protected String |
getOriginalFilePath(ome.model.core.Pixels pixels)
Retrieves the original file path for a given set of pixels.
|
PixelBuffer |
getPixelBuffer(ome.model.core.Pixels pixels)
Deprecated.
In the future callers should use the more descriptive
getPixelBuffer(Pixels, boolean) . |
PixelBuffer |
getPixelBuffer(ome.model.core.Pixels pixels,
boolean write)
Returns a pixel buffer for a given set of pixels.
|
protected int |
getSeries(ome.model.core.Pixels pixels)
Retrieves the series for a given set of pixels.
|
protected void |
handleMissingPyramid(ome.model.core.Pixels pixels,
String pixelsPyramidFilePath)
If the outer loop should continue, this method returns successfully;
otherwise it throws a MissingPyramidException.
|
ome.model.stats.StatsInfo[] |
makePyramid(ome.model.core.Pixels pixels)
Creates a pixels pyramid for a given set of pixels.
|
void |
removePixels(List<Long> pixelIds)
Removes files from data repository based on a parameterized List of Long
pixels ids
|
boolean |
requiresPixelsPyramid(ome.model.core.Pixels pixels)
Returns true if a pyramid should be used for the given
Pixels . |
void |
setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher pub)
Set the ApplicationEventPublisher that this object runs in.
|
void |
setFilePathResolver(FilePathResolver resolver) |
createSubpath, getFilesPath, getPixelsPath, getThumbnailPath
public static final String DV_FORMAT
public static final String PYRAMID_SUFFIX
public static final int NULL_PLANE_SIZE
protected FilePathResolver resolver
protected BackOff backOff
protected TileSizes sizes
public static final byte[] nullPlane
public PixelsService(String path)
path
- The root of the ROMIO proprietary pixels store. (usually
/OMERO/Pixels
).public PixelsService(String path, FilePathResolver resolver)
path
- The root of the ROMIO proprietary pixels store. (usually
/OMERO/Pixels
).public PixelsService(String path, FilePathResolver resolver, BackOff backOff, TileSizes sizes)
path
- The root of the ROMIO proprietary pixels store. (usually
/OMERO/Pixels
).resolver
- Original file path resolver for pixels sets.public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher pub)
org.springframework.context.ApplicationEventPublisherAware
Invoked after population of normal bean properties but before an init callback like InitializingBean's afterPropertiesSet or a custom init-method. Invoked before ApplicationContextAware's setApplicationContext.
setApplicationEventPublisher
in interface org.springframework.context.ApplicationEventPublisherAware
pub
- event publisher to be used by this objectpublic void setFilePathResolver(FilePathResolver resolver)
public PixelBuffer createPixelBuffer(ome.model.core.Pixels pixels) throws IOException
pixels
- Pixels set to create a pixel buffer for.IOException
- If there is an I/O error creating the pixel buffer
backing file.public ome.model.stats.StatsInfo[] makePyramid(ome.model.core.Pixels pixels)
pixels
- Pixels set to retrieve a pixel buffer for.@Deprecated public PixelBuffer getPixelBuffer(ome.model.core.Pixels pixels)
getPixelBuffer(Pixels, boolean)
.pixels
- Pixels set to retrieve a pixel buffer for.getPixelBuffer(Pixels, boolean)
public PixelBuffer getPixelBuffer(ome.model.core.Pixels pixels, boolean write)
pixels
- Pixels set to retrieve a pixel buffer for.write
- Whether or not to open the pixel buffer as read-write.
true
opens as read-write, false
opens as
read-only.public boolean requiresPixelsPyramid(ome.model.core.Pixels pixels)
Pixels
.
This usually implies that this is a "Big image" and therefore will
need tiling.pixels
- protected String getOriginalFilePath(ome.model.core.Pixels pixels)
pixels
- Set of pixels to return an orignal file path for.null
if the original file
path could not be located or the resolver
has not been set.protected int getSeries(ome.model.core.Pixels pixels)
pixels
- Set of pixels to return the series for.0
(the first series).protected void handleMissingPyramid(ome.model.core.Pixels pixels, String pixelsPyramidFilePath)
pixels
- pixelsPyramidFilePath
- ome.conditions.MissingPyramidException
protected BfPixelBuffer createMinMaxBfPixelBuffer(String filePath, int series, loci.formats.meta.IMinMaxStore store)
filePath
- Non-null.store
- Min/max store to use with the min/max calculator.series
- series to usereader
- passed to BfPixelBuffer
protected PixelBuffer createBfPixelBuffer(String filePath, int series)
filePath
- Non-null.reader
- passed to BfPixelBuffer
series
- series to useprotected BfPyramidPixelBuffer createPyramidPixelBuffer(ome.model.core.Pixels pixels, String filePath, boolean write)
filePath
- Non-null.reader
- passed to BfPixelBuffer
protected PixelBuffer createRomioPixelBuffer(String pixelsFilePath, ome.model.core.Pixels pixels, boolean allowModification)
pixelsFilePath
- pixels
- allowModification
-
Version: 4.4.12-ice34-b116
Copyright © 2014 The University of Dundee & Open Microscopy Environment. All Rights Reserved.