|
||||||||
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.MTBContour2DSet
public class MTBContour2DSet
A set of 2D contours living in a common domain which is a rectangular subset of R x R. Each contours is of type Contour2D
Field Summary | |
---|---|
(package private) java.util.Vector<MTBContour2D> |
contourSet
The set of contours represented as a Vector. |
private double |
xMax
Maximal x coordinate of the domain of this contour set. |
private double |
xMin
Minimal x coordinate of the domain of this contour set. |
private double |
yMax
Maximal y coordinate of the domain of this contour set. |
private double |
yMin
Minimal y coordinate of the domain of this contour set. |
Constructor Summary | |
---|---|
MTBContour2DSet()
Standard constructor. |
|
MTBContour2DSet(double xMin,
double yMin,
double xMax,
double yMax)
Construct an empty set of contours with given extent of domain. |
Method Summary | |
---|---|
boolean |
add(MTBContour2D contour)
Append a contour (at the end) to the set of contours. |
MTBContour2DSet |
clone()
|
MTBContour2D |
elementAt(int i)
Get a contour by index. |
de.unihalle.informatik.MiToBo_xml.MTBXMLContour2DType |
getContour2DAsXml(MTBContour2D contour,
de.unihalle.informatik.MiToBo_xml.MTBXMLContour2DType xmlC)
Copy the information of contour into the corresponding xml
element xmlContour . |
MTBContour2D |
getContour2DFromXml(de.unihalle.informatik.MiToBo_xml.MTBXMLContour2DType xmlContour)
Get a new MTBContour2D from the information of the
xmlContour . |
void |
read(java.lang.String filename)
Read a contour set from an xml file filename and set the MTB
polygon set accordingly. |
void |
removeElementAt(int i)
Delete the i-th contour from the set |
void |
setElementAt(MTBContour2D contour,
int i)
Set the i-th contour from the set. |
int |
size()
Get the number of contours of this contour set |
void |
write(java.lang.String filename)
Write this contour set into XML file filename.xml
Additionally, its processing history is written. |
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 |
---|
java.util.Vector<MTBContour2D> contourSet
private double xMax
private double xMin
private double yMax
private double yMin
Constructor Detail |
---|
public MTBContour2DSet()
public MTBContour2DSet(double xMin, double yMin, double xMax, double yMax)
xMin
- minimal x-coordinate of the domainyMin
- minimal y-coordinate of the domainxMax
- maximal x-coordinate of the domainyMax
- maximal y-coordinate of the domainMethod Detail |
---|
public boolean add(MTBContour2D contour)
contour
- contour to addpublic MTBContour2DSet clone()
clone
in class java.lang.Object
public MTBContour2D elementAt(int i)
public de.unihalle.informatik.MiToBo_xml.MTBXMLContour2DType getContour2DAsXml(MTBContour2D contour, de.unihalle.informatik.MiToBo_xml.MTBXMLContour2DType xmlC)
contour
into the corresponding xml
element xmlContour
. If xmlContour
is null, a new
obejct is created, otherwise the passed object filled.
public MTBContour2D getContour2DFromXml(de.unihalle.informatik.MiToBo_xml.MTBXMLContour2DType xmlContour)
MTBContour2D
from the information of the
xmlContour
.
xmlContour
- xml contour object
public void read(java.lang.String filename) throws java.lang.ClassNotFoundException, MTBException
filename
and set the MTB
polygon set accordingly. The processing history is read also if available.
WARNING: currently assume filename WITHOUT extension.
filename
- Filename to read from, WITHOUT extension (for the moment).
java.lang.ClassNotFoundException
MTBException
public void removeElementAt(int i)
i
- index of contour to removepublic void setElementAt(MTBContour2D contour, int i)
contour
- new contour elementi
- index of the new contourpublic int size()
public void write(java.lang.String filename) throws de.unihalle.informatik.Alida.exceptions.ALDException
filename.xml
Additionally, its processing history is written.
WARNING: currently assume filename WITHOUT extension.
filename
- Filename to write to, WITHOUT extension (for the moment)
de.unihalle.informatik.Alida.exceptions.ALDException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |