|
||||||||||
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
@ALDParametrizedClass 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
Field Summary | |
---|---|
protected Vector<MTBRegion2D> |
regionSet
The set of regions represented as a Vector. |
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(MTBImage labelimage)
Construct a set of regions from a label image. |
|
MTBRegion2DSet(MTBImage labelimage,
int backgroundLabel)
Construct a set of regions from a label image. |
|
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(String filename)
Construct a set of regions from a xml-file that was written by the write method of this class. |
|
MTBRegion2DSet(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 |
String |
getInfo()
|
double |
getXmax()
|
double |
getXmin()
|
double |
getYmax()
|
double |
getYmin()
|
Iterator<MTBRegion2D> |
iterator()
|
void |
remove(MTBRegion2D regionToRemove)
Delete the given region object from the set, if contained. |
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(String info)
|
int |
size()
Get the number of regions of this region set |
de.unihalle.informatik.MiToBo_xml.MTBXMLRegion2DSetType |
toXMLType()
Construct an object that represents this region by xml. |
void |
write(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 |
---|
@ALDClassParameter(label="Set of regions") protected Vector<MTBRegion2D> regionSet
Constructor Detail |
---|
public MTBRegion2DSet()
public MTBRegion2DSet(double _xMin, double _yMin, double _xMax, double _yMax)
public MTBRegion2DSet(Vector<MTBRegion2D> regions, double _xMin, double _yMin, double _xMax, double _yMax)
public MTBRegion2DSet(String filename) throws org.apache.xmlbeans.XmlException, IOException
write
method of this class. (These xml-files conform to xml-scheme
MTBXMLRegion2DSet.xsd defined for MiToBo)
filename
- path to the xml-file
IOException
- thrown if parsing of xml-file failed
org.apache.xmlbeans.XmlException
- thrown if parsing of xml-file failedpublic MTBRegion2DSet(MTBImage labelimage)
filename
- path to the xml-file
IOException
- thrown if parsing of xml-file failed
org.apache.xmlbeans.XmlException
- thrown if parsing of xml-file failedpublic MTBRegion2DSet(MTBImage labelimage, int backgroundLabel)
backgroundLabel
is excluded.
Admissible image types are BYTE, SHORT and INT.
filename
- path to the xml-file
IOException
- thrown if parsing of xml-file failed
org.apache.xmlbeans.XmlException
- thrown if parsing of xml-file failedpublic MTBRegion2DSet(de.unihalle.informatik.MiToBo_xml.MTBXMLRegion2DSetType xmlregion2Dset)
MTBRegion2DSetBag
) from file.
xmlregion2Dset
- object that represents the region set read from xmlMethod Detail |
---|
public MTBRegion2DSet clone()
clone
in class Object
public de.unihalle.informatik.MiToBo_xml.MTBXMLRegion2DSetType toXMLType()
MTBRegion2DSetBag
) to file.
public void write(String filename) throws IOException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException, de.unihalle.informatik.Alida.exceptions.ALDOperatorException
IOException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public int size()
public double getXmin()
public double getXmax()
public double getYmin()
public double getYmax()
public String getInfo()
public void setInfo(String info)
public void clear()
public MTBRegion2D get(int i)
public MTBRegion2D elementAt(int i)
public boolean add(MTBRegion2D region)
region
- region to addpublic void setElementAt(MTBRegion2D region, int i)
i
- index of region to removepublic void removeElementAt(int i)
i
- index of region to removepublic void remove(MTBRegion2D regionToRemove)
regionToRemove
- public int calcMinSize()
public int calcMaxSize()
public double calcAverageSize()
public 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 Iterator<MTBRegion2D> iterator()
iterator
in interface Iterable<MTBRegion2D>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |