pojos
Class MaskData

java.lang.Object
  extended by pojos.DataObject
      extended by pojos.ShapeData
          extended by pojos.MaskData

public class MaskData
extends ShapeData

Represents an Mask in the Euclidean space R2.

Since:
3.0-Beta4
Version:
3.0 (Internal version: $Revision: $Date: $)
Author:
Jean-Marie Burel      j.burel@dundee.ac.uk, Donald MacDonald      donald@lifesci.dundee.ac.uk

Field Summary
 
Fields inherited from class pojos.ShapeData
READONLY_FLAG, settings
 
Constructor Summary
MaskData()
          Create a new instance of MaskData, creating a new MaskI Object.
MaskData(double x, double y, double width, double height, byte[] mask)
          Create a new instance of the MaskData,
MaskData(omero.model.Shape shape)
          Creates a new instance.
 
Method Summary
 byte getBit(byte[] data, int bit)
          Set the bit value in a byte array at position bit to be the value value.
 double getHeight()
          Returns the height of the mask.
 byte[] getMask()
          Get the mask as a byte array.
 int[][] getMaskAsBinaryArray()
          Returns the mask image.
 BufferedImage getMaskAsBufferedImage()
          Returns the mask image.
 String getText()
          Returns the text of the shape.
 double getWidth()
          Returns the width of the mask.
 double getX()
          Returns the x-coordinate of the top left corner of the mask.
 double getY()
          Returns the y-coordinate of the top left corner of the mask.
 void setBit(byte[] data, int bit, int val)
          Set the bit value in a byte array at position bit to be the value value.
 void setHeight(double height)
          set height of an untransformed mask.
 void setMask(BufferedImage image)
          Set the mask from the bufferedImage
 void setMask(byte[] mask)
          Set the mask image.
 void setText(String text)
          Sets the text of the shape.
 void setWidth(double width)
          set width of an untransformed mask.
 void setX(double x)
          set the x-coordinate top-left corner of an untransformed mask.
 void setY(double y)
          set the y-coordinate top-left corner of an untransformed mask.
 
Methods inherited from class pojos.ShapeData
getC, getROICoordinate, getShapeSettings, getT, getTransform, getZ, isClientObject, isReadOnly, setC, setClientObject, setDirty, setReadOnly, setROICoordinate, setShapeSettings, setT, setTransform, setZ
 
Methods inherited from class pojos.DataObject
asAnnotation, asChannel, asDataset, asExperimenter, asGroup, asIAnnotated, asImage, asIObject, asPixels, asPlate, asPojo, asPojos, asPojos, asProject, asScreen, asWell, asWellSample, getCreated, getDetails, getId, getOwner, getPermissions, getUpdated, getVersion, isDirty, isLoaded, nullDetails, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, nullSafe, setId, setValue, setVersion, timeOfEvent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MaskData

public MaskData(omero.model.Shape shape)
Creates a new instance.

Parameters:
shape - The shape this object represents.

MaskData

public MaskData()
Create a new instance of MaskData, creating a new MaskI Object.


MaskData

public MaskData(double x,
                double y,
                double width,
                double height,
                byte[] mask)
Create a new instance of the MaskData,

Parameters:
x - x-coordinate of the shape.
y - y-coordinate of the shape.
widht - width of the shape.
height - height of the shape.
mask - The mask image.
Method Detail

getText

public String getText()
Returns the text of the shape.

Returns:
See above.

setText

public void setText(String text)
Sets the text of the shape.

Parameters:
text - See above.

getX

public double getX()
Returns the x-coordinate of the top left corner of the mask.

Returns:
See above.

setX

public void setX(double x)
set the x-coordinate top-left corner of an untransformed mask.

Parameters:
x - See above.

getY

public double getY()
Returns the y-coordinate of the top left corner of the mask.

Returns:
See above.

setY

public void setY(double y)
set the y-coordinate top-left corner of an untransformed mask.

Parameters:
y - See above.

getWidth

public double getWidth()
Returns the width of the mask.

Returns:
See above.

setWidth

public void setWidth(double width)
set width of an untransformed mask.

Parameters:
width - See above.

getHeight

public double getHeight()
Returns the height of the mask.

Returns:
See above.

setHeight

public void setHeight(double height)
set height of an untransformed mask.

Parameters:
height - See above.

setMask

public void setMask(byte[] mask)
Set the mask image.

Parameters:
mask - See above.

setMask

public void setMask(BufferedImage image)
Set the mask from the bufferedImage

Parameters:
image - See above.

getMaskAsBufferedImage

public BufferedImage getMaskAsBufferedImage()
Returns the mask image.

Returns:
See above.

getMaskAsBinaryArray

public int[][] getMaskAsBinaryArray()
Returns the mask image.

Returns:
See above.

getMask

public byte[] getMask()
Get the mask as a byte array.

Returns:
See above.

setBit

public void setBit(byte[] data,
                   int bit,
                   int val)
Set the bit value in a byte array at position bit to be the value value.

Parameters:
data - See above.
bit - See above.
val - See above.

getBit

public byte getBit(byte[] data,
                   int bit)
Set the bit value in a byte array at position bit to be the value value.

Parameters:
data - See above.
bit - See above.
val - See above.


OmeroJava Api

Version: Beta-4.2.0-r7571-b29

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