public class DataSink extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DOUBLE
Identifies the type used to store pixel values.
|
static String |
FLOAT
Identifies the type used to store pixel values.
|
static String |
INT_16
Identifies the type used to store pixel values.
|
static String |
INT_32
Identifies the type used to store pixel values.
|
static String |
INT_8
Identifies the type used to store pixel values.
|
static String |
UINT_16
Identifies the type used to store pixel values.
|
static String |
UINT_32
Identifies the type used to store pixel values.
|
static String |
UINT_8
Identifies the type used to store pixel values.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Erases the cache.
|
Plane2D |
getPlane(SecurityContext ctx,
int z,
int t,
int c)
Extracts a 2D plane from the pixels set this object is working for.
|
Plane2D |
getPlane(SecurityContext ctx,
int z,
int t,
int c,
boolean close)
Extracts a 2D plane from the pixels set this object is working for.
|
Plane2D |
getTile(SecurityContext ctx,
int z,
int t,
int c,
int x,
int y,
int w,
int h,
boolean close)
Extracts a 2D tile from the pixels set this object is working for.
|
boolean |
isSame(long pixelsID)
Returns
true if a data source has already been created
for the specified pixels set, false otherwise. |
static DataSink |
makeNew(PixelsData source,
Gateway gw)
Factory method to create a new
DataSink to handle
access to the metadata associated with the specified pixels set. |
static DataSink |
makeNew(PixelsData source,
Gateway gw,
int cacheSize)
Factory method to create a new
DataSink to handle access to
the metadata associated with the specified pixels set. |
void |
setCacheInMemory(boolean cacheInMemory)
Sets the size either to 1 or 0 depending on the passed value.
|
public static final String INT_8
public static final String UINT_8
public static final String INT_16
public static final String UINT_16
public static final String INT_32
public static final String UINT_32
public static final String FLOAT
public static final String DOUBLE
public static DataSink makeNew(PixelsData source, Gateway gw)
DataSink
to handle
access to the metadata associated with the specified pixels set.source
- The pixels set. Mustn't be null
.gw
- Reference to the Gateway
Mustn't be null
.public static DataSink makeNew(PixelsData source, Gateway gw, int cacheSize)
DataSink
to handle access to
the metadata associated with the specified pixels set.source
- The pixels set. Mustn't be null
.gw
- Reference to the Gateway
Mustn't be null
.cacheSize
- The size of the cache to use. (Make sure the Gateway
provides
a CacheService
)public Plane2D getTile(SecurityContext ctx, int z, int t, int c, int x, int y, int w, int h, boolean close) throws DataSourceException
ctx
- The security context.z
- The z-section at which data is to be fetched.t
- The timepoint at which data is to be fetched.c
- The channel at which data is to be fetched.x
- The x coordinatey
- The y coordinatew
- The width of the tileh
- The height of the tileclose
- Indicates to close the service if true
.DataSourceException
- If an error occurs while retrieving the plane data from the
pixels source.public Plane2D getPlane(SecurityContext ctx, int z, int t, int c) throws DataSourceException
ctx
- The security context.z
- The z-section at which data is to be fetched.t
- The timepoint at which data is to be fetched.c
- The channel at which data is to be fetched.DataSourceException
- If an error occurs while retrieving the
plane data from the pixels source.public Plane2D getPlane(SecurityContext ctx, int z, int t, int c, boolean close) throws DataSourceException
ctx
- The security context.z
- The z-section at which data is to be fetched.t
- The timepoint at which data is to be fetched.c
- The channel at which data is to be fetched.close
- Indicate to close or not the service.DataSourceException
- If an error occurs while retrieving the
plane data from the pixels source.public boolean isSame(long pixelsID)
true
if a data source has already been created
for the specified pixels set, false
otherwise.pixelsID
- The id of the pixels set.public void clearCache()
public void setCacheInMemory(boolean cacheInMemory)
cacheInMemory
- Passed true
to set the size to 1,
false
to set to 0.
Version: 5.2.3-ice35-b22
Copyright © 2016 The University of Dundee & Open Microscopy Environment. All Rights Reserved.