Package ome.api
Interface RawPixelsStore
-
- All Superinterfaces:
ServiceInterface
,StatefulServiceInterface
public interface RawPixelsStore extends StatefulServiceInterface
Binary data provider. Initialized with the id of aPixels
instance, this interface can provide various slices, stacks, regions of the 5-dimensional (X-Y planes with multiple Z-sections and Channels over Time). The byte array returned by the getter methods and passed to the setter methods can and will be interpreted according to results ofgetByteWidth()
,isFloat()
, andisSigned()
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
calculateMessageDigest()
java.util.Map<java.lang.Integer,double[]>
findMinMax(int[] channels)
int
getByteWidth()
byte[]
getCol(int x, int z, int c, int t)
java.util.Map<java.lang.Integer,int[]>
getHistogram(int[] channels, int binCount, boolean globalRange, PlaneDef plane)
byte[]
getHypercube(java.util.List<java.lang.Integer> offset, java.util.List<java.lang.Integer> size, java.util.List<java.lang.Integer> step)
long
getPixelsId()
Returns the current Pixels set identifier.java.lang.String
getPixelsPath()
Returns the current Pixels path.byte[]
getPlane(int z, int c, int t)
long
getPlaneOffset(int z, int c, int t)
byte[]
getPlaneRegion(int z, int c, int t, int count, int offset)
long
getPlaneSize()
Returns the plane sizebyte[]
getRegion(int size, long offset)
java.lang.Object
getResolutionDescriptions()
int
getResolutionLevel()
Retrieves the active resolution level.int
getResolutionLevels()
Retrieves the number of resolution levels that the backing pixels pyramid contains.byte[]
getRow(int y, int z, int c, int t)
long
getRowOffset(int y, int z, int c, int t)
int
getRowSize()
byte[]
getStack(int c, int t)
long
getStackOffset(int c, int t)
long
getStackSize()
byte[]
getTile(int z, int c, int t, int x, int y, int w, int h)
int[]
getTileSize()
byte[]
getTimepoint(int t)
long
getTimepointOffset(int t)
long
getTimepointSize()
long
getTotalSize()
boolean
isFloat()
boolean
isSigned()
void
prepare(java.util.Set<java.lang.Long> pixelsIds)
Prepares the stateful service with a cache of loaded Pixels objects.boolean
requiresPixelsPyramid()
ome.model.core.Pixels
save()
void
setPixelsId(long pixelsId, boolean bypassOriginalFile)
Initializes the stateful service for a given Pixels set.void
setPlane(byte[] buffer, int z, int c, int t)
void
setRegion(int size, long offset, byte[] buffer)
void
setResolutionLevel(int resolutionLevel)
Sets the active resolution level.void
setRow(byte[] buffer, int y, int z, int c, int t)
void
setStack(byte[] buffer, int z, int c, int t)
void
setTile(byte[] buffer, int z, int c, int t, int x, int y, int w, int h)
void
setTimepoint(byte[] buffer, int t)
-
Methods inherited from interface ome.api.StatefulServiceInterface
activate, close, getCurrentEventContext, passivate
-
-
-
-
Method Detail
-
setPixelsId
void setPixelsId(long pixelsId, boolean bypassOriginalFile)
Initializes the stateful service for a given Pixels set.- Parameters:
pixelsId
- Pixels set identifier.bypassOriginalFile
- Whether or not to bypass checking for an original file to back the pixel buffer used by this service. If requests are predominantlywrite-only
or involve the population of a brand new pixel buffer usingtrue
here is a safe optimization otherwisefalse
is expected.
-
getPixelsPath
java.lang.String getPixelsPath()
Returns the current Pixels path.- Returns:
- See above.
-
getPixelsId
long getPixelsId()
Returns the current Pixels set identifier.- Returns:
- See above.
-
prepare
void prepare(java.util.Set<java.lang.Long> pixelsIds)
Prepares the stateful service with a cache of loaded Pixels objects. This method is designed to combat query overhead, where many sets of Pixels are to be read from or written to, by loading all the Pixels sets at once. Multiple calls will result in the existing cache being overwritten.- Parameters:
pixelsIds
- Pixels IDs to cache.
-
getPlaneSize
long getPlaneSize()
Returns the plane size- Returns:
- the plane size
-
getRowSize
int getRowSize()
-
getStackSize
long getStackSize()
-
getTimepointSize
long getTimepointSize()
-
getTotalSize
long getTotalSize()
-
getRowOffset
long getRowOffset(int y, int z, int c, int t)
-
getPlaneOffset
long getPlaneOffset(int z, int c, int t)
-
getStackOffset
long getStackOffset(int c, int t)
-
getTimepointOffset
long getTimepointOffset(int t)
-
getTile
byte[] getTile(int z, int c, int t, int x, int y, int w, int h)
-
getRegion
byte[] getRegion(int size, long offset)
-
getRow
byte[] getRow(int y, int z, int c, int t)
-
getCol
byte[] getCol(int x, int z, int c, int t)
-
getHistogram
java.util.Map<java.lang.Integer,int[]> getHistogram(int[] channels, int binCount, boolean globalRange, PlaneDef plane)
-
findMinMax
java.util.Map<java.lang.Integer,double[]> findMinMax(int[] channels)
-
getHypercube
byte[] getHypercube(java.util.List<java.lang.Integer> offset, java.util.List<java.lang.Integer> size, java.util.List<java.lang.Integer> step)
-
getPlaneRegion
byte[] getPlaneRegion(int z, int c, int t, int count, int offset)
-
getPlane
byte[] getPlane(int z, int c, int t)
-
getStack
byte[] getStack(int c, int t)
-
getTimepoint
byte[] getTimepoint(int t)
-
setTile
void setTile(byte[] buffer, int z, int c, int t, int x, int y, int w, int h)
-
setRegion
void setRegion(int size, long offset, byte[] buffer)
-
setRow
void setRow(byte[] buffer, int y, int z, int c, int t)
-
setPlane
void setPlane(byte[] buffer, int z, int c, int t)
-
setStack
void setStack(byte[] buffer, int z, int c, int t)
-
setTimepoint
void setTimepoint(byte[] buffer, int t)
-
getByteWidth
int getByteWidth()
-
isSigned
boolean isSigned()
-
isFloat
boolean isFloat()
-
calculateMessageDigest
byte[] calculateMessageDigest()
-
save
ome.model.core.Pixels save()
-
requiresPixelsPyramid
boolean requiresPixelsPyramid()
-
getResolutionDescriptions
java.lang.Object getResolutionDescriptions()
-
getResolutionLevels
int getResolutionLevels()
Retrieves the number of resolution levels that the backing pixels pyramid contains.- Returns:
- The number of resolution levels. This value does not necessarily indicate either the presence or absence of a pixels pyramid.
-
getResolutionLevel
int getResolutionLevel()
Retrieves the active resolution level.- Returns:
- The active resolution level. The level will be non-negative and less
than
getResolutionLevels()
. Resolution level 0 is the smallest resolution and resolution levelgetResolutionLevels() - 1
is the largest resolution. This is the inverse of how Bio-Formats indexes resolutions.
-
setResolutionLevel
void setResolutionLevel(int resolutionLevel)
Sets the active resolution level.- Parameters:
resolutionLevel
- The resolution level to be used. The level should be non-negative and less thangetResolutionLevels()
. * Resolution level 0 is the smallest resolution and resolution levelgetResolutionLevels() - 1
is the largest resolution. This is the inverse of how Bio-Formats indexes resolutions.
-
getTileSize
int[] getTileSize()
-
-