Package ome.api
Interface IPixels
-
- All Superinterfaces:
ServiceInterface
public interface IPixels extends ServiceInterface
Metadata gateway for theRenderingEngine
and clients. This service provides all DB access that the rendering engine needs as well as Pixels services to a client. It also allows the rendering engine to also be run external to the server (e.g. client-side).- Since:
- OME2.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Long
copyAndResizeImage(long imageId, java.lang.Integer sizeX, java.lang.Integer sizeY, java.lang.Integer sizeZ, java.lang.Integer sizeT, java.util.List<java.lang.Integer> channelList, java.lang.String name, boolean copyStats)
Copies the metadata, and only the metadata linked to a Image object into a new Image object of equal or differing size across one or many of its three physical dimensions or temporal dimension.java.lang.Long
copyAndResizePixels(long pixelsId, java.lang.Integer sizeX, java.lang.Integer sizeY, java.lang.Integer sizeZ, java.lang.Integer sizeT, java.util.List<java.lang.Integer> channelList, java.lang.String methodology, boolean copyStats)
Copies the metadata, and only the metadata linked to a Pixels object into a new Pixels object of equal or differing size across one or many of its three physical dimensions or temporal dimension.java.lang.Long
createImage(int sizeX, int sizeY, int sizeZ, int sizeT, java.util.List<java.lang.Integer> channelList, ome.model.enums.PixelsType pixelType, java.lang.String name, java.lang.String description)
Creates the metadata, and only the metadata linked to an Image object.<T extends ome.model.IObject>
java.util.List<T>getAllEnumerations(java.lang.Class<T> klass)
Retrieves the exhaustive list of enumerations for a given enumeration class.int
getBitDepth(ome.model.enums.PixelsType type)
Bit depth for a given pixel type.<T extends ome.model.IObject>
TgetEnumeration(java.lang.Class<T> klass, java.lang.String value)
Retrieves a particular enumeration for a given enumeration class.ome.model.display.RenderingDef
loadRndSettings(long renderingDefId)
Loads a specific set of rendering settings with the following objects pre-linked: renderingDef.quantization renderingDef.model renderingDef.waveRendering renderingDef.waveRendering.color renderingDef.waveRendering.family renderingDef.spatialDomainEnhancementjava.util.List<ome.model.IObject>
retrieveAllRndSettings(long pixId, long userId)
Retrieves all the rendering settings for a given pixels set and the passed user with the following objects pre-linked: renderingDef.quantization renderingDef.model renderingDef.waveRendering renderingDef.waveRendering.color renderingDef.waveRendering.family renderingDef.spatialDomainEnhancementome.model.core.Pixels
retrievePixDescription(long pixelsId)
Retrieves the pixels metadata with the following objects pre-linked: pixels.pixelsType pixels.pixelsDimensions pixels.channels pixels.channnels.statsInfo pixels.channnels.colorComponent pixels.channnels.logicalChannel pixels.channnels.logicalChannel.photometricInterpretationome.model.display.RenderingDef
retrieveRndSettings(long pixelsId)
Retrieves the rendering settings for a given pixels set and the currently logged in user.ome.model.display.RenderingDef
retrieveRndSettingsFor(long pixelsId, long userID)
Retrieves the rendering settings for a given pixels set and the passed user with the following objects pre-linked: renderingDef.quantization renderingDef.model renderingDef.waveRendering renderingDef.waveRendering.color renderingDef.waveRendering.family renderingDef.spatialDomainEnhancementvoid
saveRndSettings(ome.model.display.RenderingDef rndSettings)
Saves the specified rendering settings.void
setChannelGlobalMinMax(long pixelsId, int channelIndex, double min, double max)
Sets the channel global (all 2D optical sections corresponding to a particular channel) minimum and maximum for a Pixels set.
-
-
-
Method Detail
-
retrievePixDescription
ome.model.core.Pixels retrievePixDescription(long pixelsId)
Retrieves the pixels metadata with the following objects pre-linked:- pixels.pixelsType
- pixels.pixelsDimensions
- pixels.channels
- pixels.channnels.statsInfo
- pixels.channnels.colorComponent
- pixels.channnels.logicalChannel
- pixels.channnels.logicalChannel.photometricInterpretation
- Parameters:
pixelsId
- Pixels id.- Returns:
- Pixels object which matches id.
-
retrieveRndSettings
ome.model.display.RenderingDef retrieveRndSettings(long pixelsId)
Retrieves the rendering settings for a given pixels set and the currently logged in user. If the current user has noRenderingDef
, and the user is an administrator, then aRenderingDef
may be returned for the owner of thePixels
. This matches the behavior of the Rendering service. The following objects will be pre-linked:- renderingDef.quantization
- renderingDef.model
- renderingDef.waveRendering
- renderingDef.waveRendering.color
- renderingDef.waveRendering.family
- renderingDef.spatialDomainEnhancement
- Parameters:
pixelsId
- Pixels id.- Returns:
- Rendering definition.
-
retrieveRndSettingsFor
ome.model.display.RenderingDef retrieveRndSettingsFor(long pixelsId, long userID)
Retrieves the rendering settings for a given pixels set and the passed user with the following objects pre-linked:- renderingDef.quantization
- renderingDef.model
- renderingDef.waveRendering
- renderingDef.waveRendering.color
- renderingDef.waveRendering.family
- renderingDef.spatialDomainEnhancement
- Parameters:
pixelsId
- Pixels id.userID
- The id of the user.- Returns:
- Rendering definition.
-
retrieveAllRndSettings
java.util.List<ome.model.IObject> retrieveAllRndSettings(long pixId, long userId)
Retrieves all the rendering settings for a given pixels set and the passed user with the following objects pre-linked:- renderingDef.quantization
- renderingDef.model
- renderingDef.waveRendering
- renderingDef.waveRendering.color
- renderingDef.waveRendering.family
- renderingDef.spatialDomainEnhancement
- Parameters:
pixId
- Pixels id.userId
- The id of the user.- Returns:
- Rendering definition.
-
loadRndSettings
ome.model.display.RenderingDef loadRndSettings(long renderingDefId)
Loads a specific set of rendering settings with the following objects pre-linked:- renderingDef.quantization
- renderingDef.model
- renderingDef.waveRendering
- renderingDef.waveRendering.color
- renderingDef.waveRendering.family
- renderingDef.spatialDomainEnhancement
- Parameters:
renderingDefId
- Rendering definition id.- Returns:
- Rendering definition.
- Throws:
ValidationException
- If noRenderingDef
matches the IDrenderingDefId
.
-
copyAndResizePixels
java.lang.Long copyAndResizePixels(long pixelsId, java.lang.Integer sizeX, java.lang.Integer sizeY, java.lang.Integer sizeZ, java.lang.Integer sizeT, java.util.List<java.lang.Integer> channelList, java.lang.String methodology, boolean copyStats)
Copies the metadata, and only the metadata linked to a Pixels object into a new Pixels object of equal or differing size across one or many of its three physical dimensions or temporal dimension. It is beyond the scope of this method to handle updates or changes to the raw pixel data available throughRawPixelsStore
or to add and linkPlaneInfo
and/or other Pixels set specific metadata. It is also assumed that the caller wishes the pixels dimensions andPixelsType
to remain the same; changing these is outside the scope of this method. NOTE: AsChannel
objects are only able to apply to a single set of Pixels any annotations or linkage to these objects will be lost.- Parameters:
pixelsId
- The source Pixels set id.sizeX
- The new size across the X-axis.null
if the copy should maintain the same size.sizeY
- The new size across the Y-axis.null
if the copy should maintain the same size.sizeZ
- The new size across the Z-axis.null
if the copy should maintain the same size.sizeT
- The new number of timepoints.null
if the copy should maintain the same number.channelList
- The channels that should be copied into the new Pixels set.methodology
- An optional string signifying the methodology that will be used to produce this new Pixels set.copyStats
- Whether or not to copy theStatsInfo
for each channel.- Returns:
- Id of the new Pixels object on success or
null
on failure. - Throws:
ValidationException
- If the X, Y, Z, T or channelList dimensions are out of bounds or the Pixels object corresponding topixelsId
is unlocatable.
-
copyAndResizeImage
java.lang.Long copyAndResizeImage(long imageId, java.lang.Integer sizeX, java.lang.Integer sizeY, java.lang.Integer sizeZ, java.lang.Integer sizeT, java.util.List<java.lang.Integer> channelList, java.lang.String name, boolean copyStats)
Copies the metadata, and only the metadata linked to a Image object into a new Image object of equal or differing size across one or many of its three physical dimensions or temporal dimension. It is beyond the scope of this method to handle updates or changes to the raw pixel data available throughRawPixelsStore
or to add and linkPlaneInfo
and/or other Pixels set specific metadata. It is also assumed that the caller wishes the pixels dimensions andPixelsType
to remain the same; changing these is outside the scope of this method. NOTE: AsChannel
objects are only able to apply to a single set of Pixels any annotations or linkage to these objects will be lost.- Parameters:
imageId
- The source Image id.sizeX
- The new size across the X-axis.null
if the copy should maintain the same size.sizeY
- The new size across the Y-axis.null
if the copy should maintain the same size.sizeZ
- The new size across the Z-axis.null
if the copy should maintain the same size.sizeT
- The new number of timepoints.null
if the copy should maintain the same number.channelList
- The channels that should be copied into the new Pixels set.name
- The name of the new Image.copyStats
- Whether or not to copy theStatsInfo
for each channel.- Returns:
- Id of the new Pixels object on success or
null
on failure. - Throws:
ValidationException
- If the X, Y, Z, T or channelList dimensions are out of bounds or the Pixels object corresponding topixelsId
is unlocatable.
-
createImage
java.lang.Long createImage(int sizeX, int sizeY, int sizeZ, int sizeT, java.util.List<java.lang.Integer> channelList, ome.model.enums.PixelsType pixelType, java.lang.String name, java.lang.String description)
Creates the metadata, and only the metadata linked to an Image object. It is beyond the scope of this method to handle updates or changes to the raw pixel data available throughRawPixelsStore
or to add and linkPlaneInfo
orStatsInfo
objects and/or other Pixels set specific metadata. It is also up to the caller to update the pixels dimensions.- Parameters:
sizeX
- The new size across the X-axis.sizeY
- The new size across the Y-axis.sizeZ
- The new size across the Z-axis.sizeT
- The new number of timepoints.channelList
- The channels (emission wavelength in nanometers) that should be added to the new Pixels set.name
- The name of the new Image.description
- The description of the new Image.- Returns:
- Id of the new Image object on success or
null
on failure. - Throws:
ValidationException
- If the channel list isnull
or of size == 0.
-
setChannelGlobalMinMax
void setChannelGlobalMinMax(long pixelsId, int channelIndex, double min, double max)
Sets the channel global (all 2D optical sections corresponding to a particular channel) minimum and maximum for a Pixels set.- Parameters:
pixelsId
- The source Pixels set id.channelIndex
- The channel index within the Pixels set.min
- The channel global minimum.max
- The channel global maximum.
-
saveRndSettings
void saveRndSettings(ome.model.display.RenderingDef rndSettings)
Saves the specified rendering settings.- Parameters:
rndSettings
- Rendering settings.
-
getBitDepth
int getBitDepth(ome.model.enums.PixelsType type)
Bit depth for a given pixel type.- Parameters:
type
- Pixels type.- Returns:
- Bit depth in bits.
-
getEnumeration
<T extends ome.model.IObject> T getEnumeration(java.lang.Class<T> klass, java.lang.String value)
Retrieves a particular enumeration for a given enumeration class.- Parameters:
klass
- Enumeration class.value
- Enumeration string value.- Returns:
- Enumeration object.
-
getAllEnumerations
<T extends ome.model.IObject> java.util.List<T> getAllEnumerations(java.lang.Class<T> klass)
Retrieves the exhaustive list of enumerations for a given enumeration class.- Parameters:
klass
- Enumeration class.- Returns:
- List of all enumeration objects for the klass.
-
-