|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.Alida.operator.ALDData
de.unihalle.informatik.MiToBo.core.datatypes.MTBRegion2DSet
public class MTBRegion2DSet
A set of 2D regions living in a common domain which is a rectangular subset of R x R. Each regions is of type Region2D
Nested Class Summary | |
---|---|
private class |
MTBRegion2DSet.RegionSelector
|
Field Summary | |
---|---|
private boolean |
debug
|
private java.lang.String |
info
Information about this region set |
protected java.util.Vector<MTBRegion2D> |
regionSet
The set of regions represented as a Vector. |
private double |
xMax
Maximal x coordinate of the domain of this region set. |
private double |
xMin
Minimal x coordinate of the domain of this region set. |
private double |
yMax
Maximal y coordinate of the domain of this region set. |
private double |
yMin
Minimal y coordinate of the domain of this region set. |
Constructor Summary | |
---|---|
MTBRegion2DSet()
Standard constructor. |
|
MTBRegion2DSet(double _xMin,
double _yMin,
double _xMax,
double _yMax)
Construct an empty set of regions with given extent of domain |
|
MTBRegion2DSet(de.unihalle.informatik.MiToBo_xml.MTBXMLRegion2DSetType xmlregion2Dset)
Construct a new MTBRegion2DSet from a region set object that was constructed from a xml-representation. |
|
MTBRegion2DSet(java.lang.String filename)
Construct a set of regions from a xml-file that was written by the write method of this class. |
|
MTBRegion2DSet(java.util.Vector<MTBRegion2D> regions,
double _xMin,
double _yMin,
double _xMax,
double _yMax)
Construct an empty set of regions with given extent of domain |
Method Summary | |
---|---|
boolean |
add(MTBRegion2D region)
Append a region (at the end) to the set of regions. |
double |
calcAverageSize()
Calculates the average size of the set. |
int |
calcMaxSize()
Calculates the maximum size of the set. |
int |
calcMinSize()
Calculates the minimum size of the set. |
void |
clear()
Remove all regions from this set |
MTBRegion2DSet |
clone()
|
MTBRegion2D |
elementAt(int i)
Get a region by index |
MTBRegion2D |
get(int i)
Get a region by index |
java.lang.String |
getInfo()
|
double |
getXmax()
|
double |
getXmin()
|
double |
getYmax()
|
double |
getYmin()
|
void |
removeElementAt(int i)
Delete the i-th region from the set |
MTBRegion2DSet |
selectLargeRegions(int minSize)
|
void |
setElementAt(MTBRegion2D region,
int i)
Set the i-th region from the set |
void |
setInfo(java.lang.String info)
|
int |
size()
Get the number of regions of this region set |
(package private) de.unihalle.informatik.MiToBo_xml.MTBXMLRegion2DSetType |
toXMLType()
Construct an object that represents this region by xml. |
void |
write(java.lang.String filename)
Write this region set to disk in XML format using MiToBo's xml-scheme MTBRegion2DSet.xsd |
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 |
---|
private boolean debug
private java.lang.String info
protected java.util.Vector<MTBRegion2D> regionSet
private double xMax
private double xMin
private double yMax
private double yMin
Constructor Detail |
---|
public MTBRegion2DSet()
public MTBRegion2DSet(double _xMin, double _yMin, double _xMax, double _yMax)
MTBRegion2DSet(de.unihalle.informatik.MiToBo_xml.MTBXMLRegion2DSetType xmlregion2Dset)
MTBRegion2DSetBag
) from file.
xmlregion2Dset
- object that represents the region set read from xmlpublic MTBRegion2DSet(java.lang.String filename) throws org.apache.xmlbeans.XmlException, java.io.IOException
write
method of this class. (These xml-files conform to xml-scheme
MTBXMLRegion2DSet.xsd defined for MiToBo)
filename
- path to the xml-file
java.io.IOException
- thrown if parsing of xml-file failed
org.apache.xmlbeans.XmlException
- thrown if parsing of xml-file failedpublic MTBRegion2DSet(java.util.Vector<MTBRegion2D> regions, double _xMin, double _yMin, double _xMax, double _yMax)
Method Detail |
---|
public boolean add(MTBRegion2D region)
region
- region to addpublic double calcAverageSize()
public int calcMaxSize()
public int calcMinSize()
public void clear()
public MTBRegion2DSet clone()
clone
in class java.lang.Object
public MTBRegion2D elementAt(int i)
public MTBRegion2D get(int i)
public java.lang.String getInfo()
public double getXmax()
public double getXmin()
public double getYmax()
public double getYmin()
public void removeElementAt(int i)
i
- index of region to removepublic MTBRegion2DSet selectLargeRegions(int minSize) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
public void setElementAt(MTBRegion2D region, int i)
i
- index of region to removepublic void setInfo(java.lang.String info)
public int size()
de.unihalle.informatik.MiToBo_xml.MTBXMLRegion2DSetType toXMLType()
MTBRegion2DSetBag
) to file.
public void write(java.lang.String filename) throws java.io.IOException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException, de.unihalle.informatik.Alida.exceptions.ALDOperatorException
java.io.IOException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |