public class DataSink
extends java.lang.Object
implements java.lang.AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DOUBLE
Identifies the type used to store pixel values.
|
static java.lang.String |
FLOAT
Identifies the type used to store pixel values.
|
static java.lang.String |
INT_16
Identifies the type used to store pixel values.
|
static java.lang.String |
INT_32
Identifies the type used to store pixel values.
|
static java.lang.String |
INT_8
Identifies the type used to store pixel values.
|
static java.lang.String |
UINT_16
Identifies the type used to store pixel values.
|
static java.lang.String |
UINT_32
Identifies the type used to store pixel values.
|
static java.lang.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() |
java.util.Map<java.lang.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 java.lang.String INT_8
public static final java.lang.String UINT_8
public static final java.lang.String INT_16
public static final java.lang.String UINT_16
public static final java.lang.String INT_32
public static final java.lang.String UINT_32
public static final java.lang.String FLOAT
public static final java.lang.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 java.util.Map<java.lang.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 java.lang.AutoCloseable
Version: 5.4.9-ice35-b101
Copyright © 2018 The University of Dundee & Open Microscopy Environment. All Rights Reserved.