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()
          Creates a new instance of MaskData.
MaskData(double x, double y, double width, double height, byte[] mask)
          Creates a new instance of the MaskData.
MaskData(omero.model.Shape shape)
          Creates a new instance.
 
Method Summary
 byte getBit(byte[] data, int bit)
          Sets 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()
          Returns 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)
          Sets the bit value in a byte array at position bit to be the value value.
 void setHeight(double height)
          Sets the height of an untransformed mask.
 void setMask(BufferedImage image)
          Sets the mask from the bufferedImage.
 void setMask(byte[] mask)
          Sets the mask image.
 void setText(String text)
          Sets the text of the shape.
 void setWidth(double width)
          Sets the width of an untransformed mask.
 void setX(double x)
          Sets the x-coordinate top-left corner of an untransformed mask.
 void setY(double y)
          Sets the y-coordinate top-left corner of an untransformed mask.
 
Methods inherited from class pojos.ShapeData
fromPoints, getC, getROICoordinate, getShapeSettings, getT, getTransform, getZ, isClientObject, isReadOnly, isVisible, parsePointsToIntegerList, parsePointsToPoint2DList, setC, setClientObject, setDirty, setReadOnly, setROICoordinate, setShapeSettings, setT, setTransform, setVisible, setZ, toNumber, toPoints
 
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()
Creates a new instance of MaskData.


MaskData

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

Parameters:
x - The x-coordinate of the top-left corner of the image.
y - The y-coordinate of the top-left corner of the image.
widht - The width of the image.
height - The height of the image.
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)
Sets the x-coordinate top-left corner of an untransformed mask.

Parameters:
x - The value to set.

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)
Sets 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)
Sets the 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)
Sets the height of an untransformed mask.

Parameters:
height - See above.

setMask

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

Parameters:
mask - See above.

setMask

public void setMask(BufferedImage image)
Sets 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()
Returns the mask as a byte array.

Returns:
See above.

setBit

public void setBit(byte[] data,
                   int bit,
                   int val)
Sets 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)
Sets 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: 4.3.3-00d1137e-b2894

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