public class PixelsWrapper extends ObjectWrapper<PixelsData> implements Pixels
Wraps function calls to the PixelData contained.
Modifier and Type | Field and Description |
---|---|
static int |
MAX_DIST
Size of tiles when retrieving pixels
|
data
Constructor and Description |
---|
PixelsWrapper(PixelsData pixels)
Constructor of the PixelsWrapper class
|
Modifier and Type | Method and Description |
---|---|
double[][][][][] |
getAllPixels(ConnectionHandler client,
int[] xBounds,
int[] yBounds,
int[] cBounds,
int[] zBounds,
int[] tBounds)
Returns an array containing the value for each voxel corresponding to the bounds
|
Time |
getMeanExposureTime(int channel)
Computes the mean exposure time for a given channel from the planes exposureTime.
|
Time |
getMeanTimeInterval()
Computes the mean time interval from the planes deltaTs.
|
Length |
getPixelSizeX()
Gets the size of a single image pixel on the X axis.
|
Length |
getPixelSizeY()
Gets the size of a single image pixel on the Y axis.
|
Length |
getPixelSizeZ()
Gets the size of a single image pixel on the Z axis.
|
String |
getPixelType()
Gets the pixel type.
|
List<PlaneInfo> |
getPlanesInfo()
Retrieves the planes information (which need to be
loaded first). |
Length |
getPositionX()
Retrieves the X stage position.
|
Length |
getPositionY()
Retrieves the Y stage position.
|
Length |
getPositionZ()
Retrieves the Z stage position.
|
byte[][][][] |
getRawPixels(ConnectionHandler client,
int[] xBounds,
int[] yBounds,
int[] cBounds,
int[] zBounds,
int[] tBounds,
int bpp)
Returns an array containing the raw values for each voxel for each plane corresponding to the bounds
|
int |
getSizeC()
Gets the size of the image on the C axis
|
int |
getSizeT()
Gets the size of the image on the T axis
|
int |
getSizeX()
Gets the size of the image on the X axis
|
int |
getSizeY()
Gets the size of the image on the Y axis
|
int |
getSizeZ()
Gets the size of the image on the Z axis
|
Time |
getTimeIncrement()
Gets the time increment between time points.
|
void |
loadPlanesInfo(Browser browser)
Loads the planes information.
|
asDataObject, canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, getCreated, getGroupId, getId, getOwner, getUpdated, saveAndUpdate, toString, wrap, wrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
asDataObject, getAllPixels, getRawPixels
canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, distinct, flatten, getCreated, getElementsOf, getGroupId, getId, getOwner, getUpdated, saveAndUpdate
public static final int MAX_DIST
public PixelsWrapper(PixelsData pixels)
pixels
- The PixelData to be wrap.public void loadPlanesInfo(Browser browser) throws ServiceException, AccessException, ExecutionException
loadPlanesInfo
in interface Pixels
browser
- The data browser.ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.public List<PlaneInfo> getPlanesInfo()
loaded
first).getPlanesInfo
in interface Pixels
public String getPixelType()
getPixelType
in interface Pixels
public Length getPixelSizeX()
getPixelSizeX
in interface Pixels
public Length getPixelSizeY()
getPixelSizeY
in interface Pixels
public Length getPixelSizeZ()
getPixelSizeZ
in interface Pixels
public Time getTimeIncrement()
getTimeIncrement
in interface Pixels
public Time getMeanTimeInterval()
Planes information needs to be loaded
first.
getMeanTimeInterval
in interface Pixels
public Time getMeanExposureTime(int channel)
Planes information needs to be loaded
first.
getMeanExposureTime
in interface Pixels
channel
- The channel index.public Length getPositionX()
Planes information needs to be loaded
first.
getPositionX
in interface Pixels
public Length getPositionY()
Planes information needs to be loaded
first.
getPositionY
in interface Pixels
public Length getPositionZ()
Planes information needs to be loaded
first.
getPositionZ
in interface Pixels
public int getSizeX()
public int getSizeY()
public int getSizeZ()
public int getSizeC()
public int getSizeT()
public double[][][][][] getAllPixels(ConnectionHandler client, int[] xBounds, int[] yBounds, int[] cBounds, int[] zBounds, int[] tBounds) throws AccessException, ExecutionException
getAllPixels
in interface Pixels
client
- The client handling the connection.xBounds
- Array containing the X bounds from which the pixels should be retrieved.yBounds
- Array containing the Y bounds from which the pixels should be retrieved.cBounds
- Array containing the C bounds from which the pixels should be retrieved.zBounds
- Array containing the Z bounds from which the pixels should be retrieved.tBounds
- Array containing the T bounds from which the pixels should be retrieved.AccessException
- If an error occurs while retrieving the plane data from the pixels source.ExecutionException
- A Facility can't be retrieved or instantiated.public byte[][][][] getRawPixels(ConnectionHandler client, int[] xBounds, int[] yBounds, int[] cBounds, int[] zBounds, int[] tBounds, int bpp) throws ExecutionException, AccessException
getRawPixels
in interface Pixels
client
- The client handling the connection.xBounds
- Array containing the X bounds from which the pixels should be retrieved.yBounds
- Array containing the Y bounds from which the pixels should be retrieved.cBounds
- Array containing the C bounds from which the pixels should be retrieved.zBounds
- Array containing the Z bounds from which the pixels should be retrieved.tBounds
- Array containing the T bounds from which the pixels should be retrieved.bpp
- Bytes per pixels of the image.AccessException
- If an error occurs while retrieving the plane data from the pixels source.ExecutionException
- A Facility can't be retrieved or instantiated.Copyright © 2020–2023 GReD. All rights reserved.