ome.logic
Class PixelsImpl

java.lang.Object
  extended by ome.logic.AbstractLevel2Service
      extended by ome.logic.PixelsImpl
All Implemented Interfaces:
IPixels, ServiceInterface, SelfConfigurableService

@Transactional(readOnly=true)
public class PixelsImpl
extends AbstractLevel2Service
implements IPixels

implementation of the Pixels service interface.

Since:
OME2.2
Version:
2.2 (Internal version: $Revision: 5308 $ $Date: 2005/06/12 23:27:31 $)
Author:
Jean-Marie Burel      j.burel@dundee.ac.uk,
Andrea Falconi      a.falconi@dundee.ac.uk

Field Summary
static String RENDERING_DEF_QUERY_PREFIX
          Standard rendering definition HQL query prefix
 
Fields inherited from class ome.logic.AbstractLevel2Service
iQuery, iUpdate, metadata, queryFactory, sec
 
Constructor Summary
PixelsImpl()
           
 
Method Summary
 Long copyAndResizeImage(long imageId, Integer sizeX, Integer sizeY, Integer sizeZ, Integer sizeT, List<Integer> channelList, 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.
 Long copyAndResizePixels(long pixelsId, Integer sizeX, Integer sizeY, Integer sizeZ, Integer sizeT, List<Integer> channelList, 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.
 Long createImage(int sizeX, int sizeY, int sizeZ, int sizeT, List<Integer> channelList, ome.model.enums.PixelsType pixelsType, String name, String description)
          Creates the metadata, and only the metadata linked to an Image object.
<T extends ome.model.IObject>
List<T>
getAllEnumerations(Class<T> klass)
          Retrieves the exhaustive list of enumerations for a given enumeration class.
 int getBitDepth(ome.model.enums.PixelsType pixelsType)
          Bit depth for a given pixel type.
<T extends ome.model.IObject>
T
getEnumeration(Class<T> klass, String value)
          Retrieves a particular enumeration for a given enumeration class.
 Class<? extends ServiceInterface> getServiceInterface()
          Returns the interface this implementation is for.
 ome.model.display.RenderingDef loadRndSettings(long renderingDefId)
          Implemented as specified by the IPixels I/F.
 List<ome.model.IObject> retrieveAllRndSettings(long pixId, long userId)
          Implemented as specified by the IPixels I/F.
 ome.model.core.Pixels retrievePixDescription(long pixId)
          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
 ome.model.display.RenderingDef retrieveRndSettings(long pixId)
          Implemented as specified by the IPixels I/F.
 ome.model.display.RenderingDef retrieveRndSettingsFor(long pixId, long userId)
          Implemented as specified by the IPixels I/F.
 void 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.
 
Methods inherited from class ome.logic.AbstractLevel2Service
getBeanHelper, getExtendedMetadata, getQueryFactory, getSecuritySystem, selfConfigure, setExtendedMetadata, setQueryFactory, setQueryService, setSecuritySystem, setUpdateService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RENDERING_DEF_QUERY_PREFIX

public static final String RENDERING_DEF_QUERY_PREFIX
Standard rendering definition HQL query prefix

See Also:
Constant Field Values
Constructor Detail

PixelsImpl

public PixelsImpl()
Method Detail

getServiceInterface

public Class<? extends ServiceInterface> getServiceInterface()
Returns the interface this implementation is for.

Specified by:
getServiceInterface in interface SelfConfigurableService
See Also:
SelfConfigurableService.getServiceInterface()

retrievePixDescription

public ome.model.core.Pixels retrievePixDescription(long pixId)
Description copied from interface: IPixels
Retrieves the pixels metadata with the following objects pre-linked:

Specified by:
retrievePixDescription in interface IPixels
Parameters:
pixId - Pixels id.
Returns:
Pixels object which matches id.

retrieveRndSettingsFor

public ome.model.display.RenderingDef retrieveRndSettingsFor(long pixId,
                                                             long userId)
Implemented as specified by the IPixels I/F.

Specified by:
retrieveRndSettingsFor in interface IPixels
Parameters:
pixId - Pixels id.
userId - The id of the user.
Returns:
Rendering definition.
See Also:
IPixels.retrieveRndSettingsFor(long, long)

retrieveAllRndSettings

public List<ome.model.IObject> retrieveAllRndSettings(long pixId,
                                                      long userId)
Implemented as specified by the IPixels I/F.

Specified by:
retrieveAllRndSettings in interface IPixels
Returns:
Rendering definition.
See Also:
IPixels#retrieveAllRndSettingsFor(long, long)

retrieveRndSettings

public ome.model.display.RenderingDef retrieveRndSettings(long pixId)
Implemented as specified by the IPixels I/F.

Specified by:
retrieveRndSettings in interface IPixels
Parameters:
pixId - Pixels id.
Returns:
Rendering definition.
See Also:
IPixels.retrieveRndSettings(long)

loadRndSettings

public ome.model.display.RenderingDef loadRndSettings(long renderingDefId)
Implemented as specified by the IPixels I/F.

Specified by:
loadRndSettings in interface IPixels
Parameters:
renderingDefId - Rendering definition id.
Returns:
Rendering definition.
See Also:
IPixels.loadRndSettings(long)

copyAndResizePixels

@Transactional(readOnly=false)
public Long copyAndResizePixels(long pixelsId,
                                              Integer sizeX,
                                              Integer sizeY,
                                              Integer sizeZ,
                                              Integer sizeT,
                                              List<Integer> channelList,
                                              String methodology,
                                              boolean copyStats)
Description copied from interface: IPixels
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 through RawPixelsStore or to add and link PlaneInfo and/or other Pixels set specific metadata. It is also assumed that the caller wishes the physical PixelsDimensions and PixelsType to remain the same; changing these is outside the scope of this method. NOTE: As Channel objects are only able to apply to a single set of Pixels any annotations or linkage to these objects will be lost.

Specified by:
copyAndResizePixels in interface IPixels
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 the StatsInfo for each channel.
Returns:
Id of the new Pixels object on success or null on failure.

copyAndResizeImage

@Transactional(readOnly=false)
public Long copyAndResizeImage(long imageId,
                                             Integer sizeX,
                                             Integer sizeY,
                                             Integer sizeZ,
                                             Integer sizeT,
                                             List<Integer> channelList,
                                             String name,
                                             boolean copyStats)
Description copied from interface: IPixels
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 through RawPixelsStore or to add and link PlaneInfo and/or other Pixels set specific metadata. It is also assumed that the caller wishes the physical PixelsDimensions and PixelsType to remain the same; changing these is outside the scope of this method. NOTE: As Channel objects are only able to apply to a single set of Pixels any annotations or linkage to these objects will be lost.

Specified by:
copyAndResizeImage in interface IPixels
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 the StatsInfo for each channel.
Returns:
Id of the new Pixels object on success or null on failure.

createImage

@Transactional(readOnly=false)
public Long createImage(int sizeX,
                                      int sizeY,
                                      int sizeZ,
                                      int sizeT,
                                      List<Integer> channelList,
                                      ome.model.enums.PixelsType pixelsType,
                                      String name,
                                      String description)
Description copied from interface: IPixels
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 through RawPixelsStore or to add and link PlaneInfo or StatsInfo objects and/or other Pixels set specific metadata. It is also up to the caller to update PixelsDimensions.

Specified by:
createImage in interface IPixels
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.

setChannelGlobalMinMax

@Transactional(readOnly=false)
public void setChannelGlobalMinMax(long pixelsId,
                                                 int channelIndex,
                                                 double min,
                                                 double max)
Description copied from interface: IPixels
Sets the channel global (all 2D optical sections corresponding to a particular channel) minimum and maximum for a Pixels set.

Specified by:
setChannelGlobalMinMax in interface IPixels
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

@Transactional(readOnly=false)
public void saveRndSettings(ome.model.display.RenderingDef rndSettings)
Description copied from interface: IPixels
Saves the specified rendering settings.

Specified by:
saveRndSettings in interface IPixels
Parameters:
rndSettings - Rendering settings.

getBitDepth

public int getBitDepth(ome.model.enums.PixelsType pixelsType)
Description copied from interface: IPixels
Bit depth for a given pixel type.

Specified by:
getBitDepth in interface IPixels
Parameters:
pixelsType - Pixels type.
Returns:
Bit depth in bits.

getEnumeration

public <T extends ome.model.IObject> T getEnumeration(Class<T> klass,
                                                      String value)
Description copied from interface: IPixels
Retrieves a particular enumeration for a given enumeration class.

Specified by:
getEnumeration in interface IPixels
Parameters:
klass - Enumeration class.
value - Enumeration string value.
Returns:
Enumeration object.

getAllEnumerations

public <T extends ome.model.IObject> List<T> getAllEnumerations(Class<T> klass)
Description copied from interface: IPixels
Retrieves the exhaustive list of enumerations for a given enumeration class.

Specified by:
getAllEnumerations in interface IPixels
Parameters:
klass - Enumeration class.
Returns:
List of all enumeration objects for the klass.


OmeroJava Api

Version: Beta-4.1.1-r5927-b91

Copyright © 2009 The University of Dundee. All Rights Reserved.