public class DataSink extends Object implements AutoCloseable
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.
|
Constructor and Description |
---|
DataSink(SecurityContext ctx,
PixelsData source,
Gateway gw)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
Map<Integer,int[]> |
getHistogram(int[] channels,
int binCount,
boolean globalRange,
omero.romio.PlaneDef plane)
Get the histogram data for the given image.
|
Plane2D |
getPlane(int z,
int t,
int c)
Extracts a 2D plane from the pixels set this object is working for.
|
Plane2D |
getTile(int z,
int t,
int c,
int x,
int y,
int w,
int h)
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. |
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 DataSink(SecurityContext ctx, PixelsData source, Gateway gw) throws DSOutOfServiceException
ctx
- The SecurityContextsource
- The pixels set.gw
- Reference to the gateway.DSOutOfServiceException
- If the PixelsStore can't be accessedpublic Plane2D getTile(int z, int t, int c, int x, int y, int w, int h) throws DataSourceException
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 tileDataSourceException
- If an error occurs while retrieving the plane data from the
pixels source.public Plane2D getPlane(int z, int t, int c) throws DataSourceException
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 Map<Integer,int[]> getHistogram(int[] channels, int binCount, boolean globalRange, omero.romio.PlaneDef plane) throws DataSourceException
channels
- The channel indicesbinCount
- The number of bins (optional, default: 256)globalRange
- Use the global minimum/maximum to determine the histogram
range, otherwise use plane minimum/maximum valueplane
- The plane to specify z/t and/or a certain region (optional,
default: whole region of the first z/t plane)Map
of histogram data, where the key is the channel
indexDataSourceException
- If an error occurredpublic 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 close()
close
in interface AutoCloseable
Version: 5.3.3-ice35-b63
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.