Package fr.igred.omero.core
Class PixelsWrapper
- java.lang.Object
-
- fr.igred.omero.ObjectWrapper<PixelsData>
-
- fr.igred.omero.core.PixelsWrapper
-
- All Implemented Interfaces:
Pixels,RemoteObject
public class PixelsWrapper extends ObjectWrapper<PixelsData> implements Pixels
Class containing a PixelData object.Wraps function calls to the PixelData contained.
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_DISTSize of tiles when retrieving pixels-
Fields inherited from class fr.igred.omero.ObjectWrapper
data
-
-
Constructor Summary
Constructors Constructor Description PixelsWrapper(PixelsData pixels)Constructor of the PixelsWrapper class
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 boundsTimegetMeanExposureTime(int channel)Computes the mean exposure time for a given channel from the planes exposureTime.TimegetMeanTimeInterval()Computes the mean time interval from the planes deltaTs.LengthgetPixelSizeX()Gets the size of a single image pixel on the X axis.LengthgetPixelSizeY()Gets the size of a single image pixel on the Y axis.LengthgetPixelSizeZ()Gets the size of a single image pixel on the Z axis.java.lang.StringgetPixelType()Gets the pixel type.java.util.List<PlaneInfo>getPlanesInfo()Retrieves the planes information (which need to beloadedfirst).LengthgetPositionX()Retrieves the X stage position.LengthgetPositionY()Retrieves the Y stage position.LengthgetPositionZ()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 boundsintgetSizeC()Gets the size of the image on the C axisintgetSizeT()Gets the size of the image on the T axisintgetSizeX()Gets the size of the image on the X axisintgetSizeY()Gets the size of the image on the Y axisintgetSizeZ()Gets the size of the image on the Z axisTimegetTimeIncrement()Gets the time increment between time points.voidloadPlanesInfo(Browser browser)Loads the planes information.-
Methods inherited from class fr.igred.omero.ObjectWrapper
asDataObject, canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, getCreated, getGroupId, getId, getOwner, saveAndUpdate, toString, wrap, wrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface fr.igred.omero.core.Pixels
asDataObject, getAllPixels, getRawPixels
-
Methods inherited from interface fr.igred.omero.RemoteObject
canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, getCreated, getGroupId, getId, getOwner, saveAndUpdate
-
-
-
-
Field Detail
-
MAX_DIST
public static final int MAX_DIST
Size of tiles when retrieving pixels- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PixelsWrapper
public PixelsWrapper(PixelsData pixels)
Constructor of the PixelsWrapper class- Parameters:
pixels- The PixelData to be wrap.
-
-
Method Detail
-
loadPlanesInfo
public void loadPlanesInfo(Browser browser) throws ServiceException, AccessException, java.util.concurrent.ExecutionException
Loads the planes information.- Specified by:
loadPlanesInfoin interfacePixels- Parameters:
browser- The data browser.- Throws:
ServiceException- Cannot connect to OMERO.AccessException- Cannot access data.java.util.concurrent.ExecutionException- A Facility can't be retrieved or instantiated.
-
getPlanesInfo
public java.util.List<PlaneInfo> getPlanesInfo()
Retrieves the planes information (which need to beloadedfirst).- Specified by:
getPlanesInfoin interfacePixels- Returns:
- See above.
-
getPixelType
public java.lang.String getPixelType()
Gets the pixel type.- Specified by:
getPixelTypein interfacePixels- Returns:
- the pixel type.
-
getPixelSizeX
public Length getPixelSizeX()
Gets the size of a single image pixel on the X axis.- Specified by:
getPixelSizeXin interfacePixels- Returns:
- Size of a pixel on the X axis.
-
getPixelSizeY
public Length getPixelSizeY()
Gets the size of a single image pixel on the Y axis.- Specified by:
getPixelSizeYin interfacePixels- Returns:
- Size of a pixel on the Y axis.
-
getPixelSizeZ
public Length getPixelSizeZ()
Gets the size of a single image pixel on the Z axis.- Specified by:
getPixelSizeZin interfacePixels- Returns:
- Size of a pixel on the Z axis.
-
getTimeIncrement
public Time getTimeIncrement()
Gets the time increment between time points.- Specified by:
getTimeIncrementin interfacePixels- Returns:
- Time increment between time points.
-
getMeanTimeInterval
public Time getMeanTimeInterval()
Computes the mean time interval from the planes deltaTs.Planes information needs to be
loadedfirst.- Specified by:
getMeanTimeIntervalin interfacePixels- Returns:
- See above.
-
getMeanExposureTime
public Time getMeanExposureTime(int channel)
Computes the mean exposure time for a given channel from the planes exposureTime.Planes information needs to be
loadedfirst.- Specified by:
getMeanExposureTimein interfacePixels- Parameters:
channel- The channel index.- Returns:
- See above.
-
getPositionX
public Length getPositionX()
Retrieves the X stage position.Planes information needs to be
loadedfirst.- Specified by:
getPositionXin interfacePixels- Returns:
- See above.
-
getPositionY
public Length getPositionY()
Retrieves the Y stage position.Planes information needs to be
loadedfirst.- Specified by:
getPositionYin interfacePixels- Returns:
- See above.
-
getPositionZ
public Length getPositionZ()
Retrieves the Z stage position.Planes information needs to be
loadedfirst.- Specified by:
getPositionZin interfacePixels- Returns:
- See above.
-
getSizeX
public int getSizeX()
Gets the size of the image on the X axis
-
getSizeY
public int getSizeY()
Gets the size of the image on the Y axis
-
getSizeZ
public int getSizeZ()
Gets the size of the image on the Z axis
-
getSizeC
public int getSizeC()
Gets the size of the image on the C axis
-
getSizeT
public int getSizeT()
Gets the size of the image on the T axis
-
getAllPixels
public double[][][][][] getAllPixels(ConnectionHandler client, int[] xBounds, int[] yBounds, int[] cBounds, int[] zBounds, int[] tBounds) throws AccessException, java.util.concurrent.ExecutionException
Returns an array containing the value for each voxel corresponding to the bounds- Specified by:
getAllPixelsin interfacePixels- 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.java.util.concurrent.ExecutionException- A Facility can't be retrieved or instantiated.
-
getRawPixels
public byte[][][][] getRawPixels(ConnectionHandler client, int[] xBounds, int[] yBounds, int[] cBounds, int[] zBounds, int[] tBounds, int bpp) throws java.util.concurrent.ExecutionException, AccessException
Returns an array containing the raw values for each voxel for each plane corresponding to the bounds- Specified by:
getRawPixelsin interfacePixels- 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.java.util.concurrent.ExecutionException- A Facility can't be retrieved or instantiated.
-
-