de.unihalle.informatik.MiToBo.core.datatypes
Class MTBBorder2DSet

java.lang.Object
  extended by de.unihalle.informatik.Alida.operator.ALDData
      extended by de.unihalle.informatik.MiToBo.core.datatypes.MTBBorder2DSet
All Implemented Interfaces:
Cloneable

@ALDParametrizedClass
public class MTBBorder2DSet
extends de.unihalle.informatik.Alida.operator.ALDData
implements Cloneable

A set of 2D borders.

A border is an unordered list of border pixels. The border set is living in a common domain which is a rectangular subset of R x R. Each border is of type MTBBorder2D.

Author:
Birgit Moeller

Field Summary
protected  Vector<MTBBorder2D> borderSet
          The set of borders represented as a Vector.
protected  double xMax
          Maximal x-coordinate of the domain of this border set.
protected  double xMin
          Minimal x-coordinate of the domain of this border set.
protected  double yMax
          Maximal y-coordinate of the domain of this border set.
protected  double yMin
          Minimal y-coordinate of the domain of this border set.
 
Constructor Summary
MTBBorder2DSet()
          Standard constructor.
MTBBorder2DSet(double _xMin, double _yMin, double _xMax, double _yMax)
          Construct an empty set of borders with given extent of domain.
 
Method Summary
 boolean add(MTBBorder2D border)
          Append a border (at the end) to the set of borders.
 MTBBorder2DSet clone()
           
 MTBBorder2D elementAt(int i)
          Get a border by index.
 double getXMax()
          Get the maximal x-coordinate of the domain of this border set.
 double getXMin()
          Get the minimal x-coordinate of the domain of this border set.
 double getYMax()
          Get the maximal y-coordinate of the domain of this border set.
 double getYMin()
          Get the minimal y-coordinate of the domain of this border set.
 void removeElementAt(int i)
          Delete the i-th border from the set.
 void setElementAt(MTBBorder2D contour, int i)
          Set the i-th border of the set.
 int size()
          Get the number of borders of this set.
 
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDData
cloneProperties, getLocation, getProperty, getPropertyKeys, print, setLocation, setProperty
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xMin

@ALDClassParameter(label="Minimal x in domain.")
protected double xMin
Minimal x-coordinate of the domain of this border set.


yMin

@ALDClassParameter(label="Minimal y in domain")
protected double yMin
Minimal y-coordinate of the domain of this border set.


xMax

@ALDClassParameter(label="Maximal x in domain")
protected double xMax
Maximal x-coordinate of the domain of this border set.


yMax

@ALDClassParameter(label="Maximal y in domain")
protected double yMax
Maximal y-coordinate of the domain of this border set.


borderSet

@ALDClassParameter(label="Set of borders")
protected Vector<MTBBorder2D> borderSet
The set of borders represented as a Vector.

Constructor Detail

MTBBorder2DSet

public MTBBorder2DSet()
Standard constructor.


MTBBorder2DSet

public MTBBorder2DSet(double _xMin,
                      double _yMin,
                      double _xMax,
                      double _yMax)
Construct an empty set of borders with given extent of domain.

Parameters:
_xMin - Minimal x-coordinate of the domain.
_yMin - Minimal y-coordinate of the domain.
_xMax - Maximal x-coordinate of the domain.
_yMax - Maximal y-coordinate of the domain.
Method Detail

clone

public MTBBorder2DSet clone()
Overrides:
clone in class Object

size

public int size()
Get the number of borders of this set.

Returns:
Number of borders.

elementAt

public MTBBorder2D elementAt(int i)
Get a border by index.

Returns:
The i-th border.

getXMin

public double getXMin()
Get the minimal x-coordinate of the domain of this border set.

Returns:
Minimal x-coordinate.

getXMax

public double getXMax()
Get the maximal x-coordinate of the domain of this border set.

Returns:
Maximal x-coordinate.

getYMin

public double getYMin()
Get the minimal y-coordinate of the domain of this border set.

Returns:
Minimal y-coordinate.

getYMax

public double getYMax()
Get the maximal y-coordinate of the domain of this border set.

Returns:
Maximal y-coordinate.

add

public boolean add(MTBBorder2D border)
Append a border (at the end) to the set of borders.

Parameters:
border - Border to be added.

setElementAt

public void setElementAt(MTBBorder2D contour,
                         int i)
Set the i-th border of the set.

Parameters:
border - New border element.
i - Index of position where to put it.

removeElementAt

public void removeElementAt(int i)
Delete the i-th border from the set.

Parameters:
i - Index of border to be removed.


Copyright © 2010–2015 Martin Luther University Halle-Wittenberg. All rights reserved.