Package fr.igred.omero.repository
Class PixelsWrapper
Class containing a PixelData object.
Wraps function calls to the PixelData contained.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Class containing 5D bounds coordinatesstatic class
Class containing 5D pixel coordinates -
Field Summary
Fields inherited from class fr.igred.omero.GenericObjectWrapper
data
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble[][][][][]
getAllPixels
(Client client) Returns an array containing the value for each voxeldouble[][][][][]
getAllPixels
(Client client, int[] xBounds, int[] yBounds, int[] cBounds, int[] zBounds, int[] tBounds) Returns an array containing the value for each voxel corresponding to the boundsgetMeanExposureTime
(int channel) Computes the mean exposure time for a given channel from the planes exposureTime.Computes the mean time interval from the planes deltaTs.Gets the size of a single image pixel on the X axis.Gets the size of a single image pixel on the Y axis.Gets the size of a single image pixel on the Z axis.Gets the pixel type.Retrieves the planes information (which need to beloaded
first).Retrieves the X stage position.Retrieves the Y stage position.Retrieves the Z stage position.byte[][][][]
getRawPixels
(Client client, int bpp) Returns an array containing the raw values for each voxel for each planesbyte[][][][]
getRawPixels
(Client 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 boundsint
getSizeC()
Gets the size of the image on the C axisint
getSizeT()
Gets the size of the image on the T axisint
getSizeX()
Gets the size of the image on the X axisint
getSizeY()
Gets the size of the image on the Y axisint
getSizeZ()
Gets the size of the image on the Z axisGets the time increment between time points.void
loadPlanesInfo
(Client client) Loads the planes information.Methods inherited from class fr.igred.omero.GenericObjectWrapper
asDataObject, canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, delete, distinct, flatten, getCreated, getGroupId, getId, getOwner, getUpdated, saveAndUpdate, toString, wrap, wrap
-
Field Details
-
MAX_DIST
public static final int MAX_DISTSize of tiles when retrieving pixels- See Also:
-
-
Constructor Details
-
PixelsWrapper
Constructor of the PixelsWrapper class- Parameters:
pixels
- The PixelData to be wrap.
-
-
Method Details
-
loadPlanesInfo
public void loadPlanesInfo(Client client) throws ServiceException, AccessException, ExecutionException Loads the planes information.- Parameters:
client
- The client handling the connection.- Throws:
ServiceException
- Cannot connect to OMERO.AccessException
- Cannot access data.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getPlanesInfo
Retrieves the planes information (which need to beloaded
first).- Returns:
- See above.
-
getPixelType
Gets the pixel type.- Returns:
- the pixel type.
-
getPixelSizeX
Gets the size of a single image pixel on the X axis.- Returns:
- Size of a pixel on the X axis.
-
getPixelSizeY
Gets the size of a single image pixel on the Y axis.- Returns:
- Size of a pixel on the Y axis.
-
getPixelSizeZ
Gets the size of a single image pixel on the Z axis.- Returns:
- Size of a pixel on the Z axis.
-
getTimeIncrement
Gets the time increment between time points.- Returns:
- Time increment between time points.
-
getMeanTimeInterval
Computes the mean time interval from the planes deltaTs.Planes information needs to be
loaded
first.- Returns:
- See above.
-
getMeanExposureTime
Computes the mean exposure time for a given channel from the planes exposureTime.Planes information needs to be
loaded
first.- Parameters:
channel
- The channel index.- Returns:
- See above.
-
getPositionX
Retrieves the X stage position.Planes information needs to be
loaded
first.- Returns:
- See above.
-
getPositionY
Retrieves the Y stage position.Planes information needs to be
loaded
first.- Returns:
- See above.
-
getPositionZ
Retrieves the Z stage position.Planes information needs to be
loaded
first.- Returns:
- See above.
-
getSizeX
public int getSizeX()Gets the size of the image on the X axis- Returns:
- Size of the image on the X axis.
-
getSizeY
public int getSizeY()Gets the size of the image on the Y axis- Returns:
- Size of the image on the Y axis.
-
getSizeZ
public int getSizeZ()Gets the size of the image on the Z axis- Returns:
- Size of the image on the Z axis.
-
getSizeC
public int getSizeC()Gets the size of the image on the C axis- Returns:
- Size of the image on the C axis.
-
getSizeT
public int getSizeT()Gets the size of the image on the T axis- Returns:
- Size of the image on the T axis.
-
getAllPixels
Returns an array containing the value for each voxel- Parameters:
client
- The client handling the connection.- Returns:
- Array containing the value for each voxel of the image.
- Throws:
AccessException
- If an error occurs while retrieving the plane data from the pixels source.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getAllPixels
public double[][][][][] getAllPixels(Client client, int[] xBounds, int[] yBounds, int[] cBounds, int[] zBounds, int[] tBounds) throws AccessException, ExecutionException Returns an array containing the value for each voxel corresponding to the bounds- Parameters:
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.- Returns:
- Array containing the value for each voxel of the image.
- Throws:
AccessException
- If an error occurs while retrieving the plane data from the pixels source.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getRawPixels
Returns an array containing the raw values for each voxel for each planes- Parameters:
client
- The client handling the connection.bpp
- Bytes per pixels of the image.- Returns:
- a table of bytes containing the pixel values
- Throws:
AccessException
- If an error occurs while retrieving the plane data from the pixels source.ExecutionException
- A Facility can't be retrieved or instantiated.
-
getRawPixels
public byte[][][][] getRawPixels(Client client, int[] xBounds, int[] yBounds, int[] cBounds, int[] zBounds, int[] tBounds, int bpp) throws ExecutionException, AccessException Returns an array containing the raw values for each voxel for each plane corresponding to the bounds- Parameters:
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.- Returns:
- a table of bytes containing the pixel values
- Throws:
AccessException
- If an error occurs while retrieving the plane data from the pixels source.ExecutionException
- A Facility can't be retrieved or instantiated.
-