Package omero.gateway.facility
Class RawDataFacility
- java.lang.Object
-
- omero.gateway.facility.Facility
-
- omero.gateway.facility.RawDataFacility
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
java.util.Map<java.lang.Integer,int[]>
getHistogram(SecurityContext ctx, PixelsData pixels, int[] channels, int binCount, boolean globalRange, omero.romio.PlaneDef plane)
Get the histogram data for the given image.java.util.Map<java.lang.Integer,int[]>
getHistogram(SecurityContext ctx, PixelsData pixels, int[] channels, int z, int t)
Get the histogram data for the given image, using default 256 bins and the channels global min/max for the histogram range.Plane2D
getPlane(SecurityContext ctx, PixelsData pixels, int z, int t, int c)
Extracts a 2D plane from the pixels set.java.util.List<omero.api.ResolutionDescription>
getResolutionDescriptions(SecurityContext ctx, PixelsData pixels)
Get the available resolution descriptionsPlane2D
getTile(SecurityContext ctx, PixelsData pixels, int z, int t, int c, int x, int y, int w, int h)
Extracts a 2D tile from the pixels setPlane2D
getTile(SecurityContext ctx, PixelsData pixels, int z, int t, int c, int x, int y, int w, int h, int resolutionLevel)
Extracts a 2D tile from the pixels set-
Methods inherited from class omero.gateway.facility.Facility
addPropertyChangeListener, clear, firePropertyChanged, firePropertyChanged, getFacility, logDebug, logError, logInfo, logWarn, removePropertyChangeListener
-
-
-
-
Method Detail
-
getHistogram
public java.util.Map<java.lang.Integer,int[]> getHistogram(SecurityContext ctx, PixelsData pixels, int[] channels, int z, int t) throws DSOutOfServiceException, DSAccessException
Get the histogram data for the given image, using default 256 bins and the channels global min/max for the histogram range. Currently only non-tiled images are supported.- Parameters:
ctx
- TheSecurityContext
pixels
- ThePixelsData
objectchannels
- The channel indicesz
- The z plane index (optional; default: 0)t
- The t plane index (optional; default: 0)- Returns:
- A
Map
of histogram data, where the key is the channel index - Throws:
DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO service.
-
getHistogram
public java.util.Map<java.lang.Integer,int[]> getHistogram(SecurityContext ctx, PixelsData pixels, int[] channels, int binCount, boolean globalRange, omero.romio.PlaneDef plane) throws DSOutOfServiceException, DSAccessException
Get the histogram data for the given image. Currently only non-tiled images are supported.- Parameters:
ctx
- TheSecurityContext
pixels
- ThePixelsData
objectchannels
- 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)- Returns:
- A
Map
of histogram data, where the key is the channel index - Throws:
DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO service.
-
getPlane
public Plane2D getPlane(SecurityContext ctx, PixelsData pixels, int z, int t, int c) throws DSOutOfServiceException, DSAccessException
Extracts a 2D plane from the pixels set. Connection to the PixelsStore will be closed automatically.- Parameters:
ctx
- The security context.pixels
- ThePixelsData
object to fetch the data from.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.- Returns:
- A plane 2D object that encapsulates the actual plane pixels.
- Throws:
DSOutOfServiceException
- If the connection is broken, or not logged inDSAccessException
- If an error occurred while trying to retrieve data from OMERO service.
-
getTile
public Plane2D getTile(SecurityContext ctx, PixelsData pixels, int z, int t, int c, int x, int y, int w, int h) throws DataSourceException
Extracts a 2D tile from the pixels set- Parameters:
ctx
- The security context.pixels
- ThePixelsData
object to fetch the data from.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 tile- Returns:
- A plane 2D object that encapsulates the actual tile pixels.
- Throws:
DataSourceException
- If an error occurs while retrieving the plane data from the pixels source.
-
getTile
public Plane2D getTile(SecurityContext ctx, PixelsData pixels, int z, int t, int c, int x, int y, int w, int h, int resolutionLevel) throws DataSourceException
Extracts a 2D tile from the pixels set- Parameters:
ctx
- The security context.pixels
- ThePixelsData
object to fetch the data from.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 tileresolutionLevel
- A specific resolution level (optional), see also getResolutionDescriptions()- Returns:
- A plane 2D object that encapsulates the actual tile pixels.
- Throws:
DataSourceException
- If an error occurs while retrieving the plane data from the pixels source.
-
getResolutionDescriptions
public java.util.List<omero.api.ResolutionDescription> getResolutionDescriptions(SecurityContext ctx, PixelsData pixels) throws DataSourceException
Get the available resolution descriptions- Parameters:
ctx
- The SecurityContextpixels
- The PixelsData object- Returns:
- See above
- Throws:
DataSourceException
- If an error occurs while retrieving the data
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
-