ome.services.projection
Class ProjectionBean

java.lang.Object
  extended by ome.logic.AbstractLevel2Service
      extended by ome.services.projection.ProjectionBean
All Implemented Interfaces:
IProjection, ServiceInterface, SelfConfigurableService

@Transactional(readOnly=true)
public class ProjectionBean
extends AbstractLevel2Service
implements IProjection

Implements projection functionality for Pixels sets as declared in IProjection.

Since:
OMERO-Beta3.1
Author:
Chris Allan      callan@blackcat.ca

Field Summary
protected  IPixels iPixels
          Reference to the service used to retrieve the pixels metadata.
protected  PixelsService pixelsService
          Reference to the service used to retrieve the pixels data.
 
Fields inherited from class ome.logic.AbstractLevel2Service
iQuery, iUpdate, metadata, queryFactory, sec
 
Fields inherited from interface ome.api.IProjection
MAXIMUM_INTENSITY, MEAN_INTENSITY, METHODOLOGY_STRINGS, SUM_INTENSITY
 
Constructor Summary
ProjectionBean()
           
 
Method Summary
 Class<? extends ServiceInterface> getServiceInterface()
          Returns the interface this implementation is for.
 long projectPixels(long pixelsId, ome.model.enums.PixelsType pixelsType, int algorithm, int tStart, int tEnd, List<Integer> channels, int stepping, int zStart, int zEnd, String name)
          Performs a projection through selected optical sections and optical sections for a given set of time points of a Pixels set.
 byte[] projectStack(long pixelsId, ome.model.enums.PixelsType pixelsType, int algorithm, int timepoint, int channelIndex, int stepping, int start, int end)
          Performs a projection through the optical sections of a particular wavelength at a given time point of a Pixels set.
 void setIPixels(IPixels iPixels)
          IPixels bean injector.
 void setPixelsService(PixelsService pixelsService)
          PixelsService bean injector.
 
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

iPixels

protected transient IPixels iPixels
Reference to the service used to retrieve the pixels metadata.


pixelsService

protected transient PixelsService pixelsService
Reference to the service used to retrieve the pixels data.

Constructor Detail

ProjectionBean

public ProjectionBean()
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()

setIPixels

public void setIPixels(IPixels iPixels)
IPixels bean injector. For use during configuration. Can only be called once.


setPixelsService

public void setPixelsService(PixelsService pixelsService)
PixelsService bean injector. For use during configuration. Can only be called once.


projectStack

public byte[] projectStack(long pixelsId,
                           ome.model.enums.PixelsType pixelsType,
                           int algorithm,
                           int timepoint,
                           int channelIndex,
                           int stepping,
                           int start,
                           int end)
Description copied from interface: IProjection
Performs a projection through the optical sections of a particular wavelength at a given time point of a Pixels set.

Specified by:
projectStack in interface IProjection
Parameters:
pixelsId - The source Pixels set Id.
pixelsType - The destination Pixels type. If null, the source Pixels set pixels type will be used.
algorithm - MAXIMUM_INTENSITY, MEAN_INTENSITY or SUM_INTENSITY. NOTE: When performing a SUM_INTENSITY projection, pixel values will be pinned to the maximum pixel value of the destination Pixels type.
timepoint - Timepoint to perform the projection.
channelIndex - Index of the channel to perform the projection.
stepping - Stepping value to use while calculating the projection. For example, stepping=1 will use every optical section from start to end where stepping=2 will use every other section from start to end to perform the projection.
start - Optical section to start projecting from.
end - Optical section to finish projecting.
Returns:
A byte array of projected pixel values whose length is equal to the Pixels set sizeX * sizeY * bytesPerPixel in big-endian format.
See Also:
#projectPixels()

projectPixels

@Transactional(readOnly=false)
public long projectPixels(long pixelsId,
                                        ome.model.enums.PixelsType pixelsType,
                                        int algorithm,
                                        int tStart,
                                        int tEnd,
                                        List<Integer> channels,
                                        int stepping,
                                        int zStart,
                                        int zEnd,
                                        String name)
Description copied from interface: IProjection
Performs a projection through selected optical sections and optical sections for a given set of time points of a Pixels set. The Image which is linked to the Pixels set will be copied using IPixels.copyAndResizeImage().

Specified by:
projectPixels in interface IProjection
Parameters:
pixelsId - The source Pixels set Id.
pixelsType - The destination Pixels type. If null, the source Pixels set pixels type will be used.
algorithm - MAXIMUM_INTENSITY, MEAN_INTENSITY or SUM_INTENSITY. NOTE: When performing a SUM_INTENSITY projection, pixel values will be pinned to the maximum pixel value of the destination Pixels type.
tStart - Timepoint to start projecting from.
tEnd - Timepoint to finish projecting.
channels - List of the channel indexes to use while calculating the projection.
stepping - Stepping value to use while calculating the projection. For example, stepping=1 will use every optical section from start to end where stepping=2 will use every other section from start to end to perform the projection.
zStart - Optical section to start projecting from.
zEnd - Optical section to finish projecting.
name - Name for the newly created image. If null the name of the Image linked to the Pixels qualified by pixelsId will be used with a "Projection" suffix. For example, GFP-H2B Image of HeLa Cells will have an Image name of GFP-H2B Image of HeLa Cells Projection used for the projection.
Returns:
The Id of the newly created Image which has been projected.
See Also:
#projectStack()


OmeroJava Api

Version: Beta4.2.1-r8614-Beta4.2-b41

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