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

java.lang.Object
  extended by de.unihalle.informatik.Alida.operator.ALDData
      extended by de.unihalle.informatik.MiToBo.core.datatypes.MTBRegion3DSet

public class MTBRegion3DSet
extends de.unihalle.informatik.Alida.operator.ALDData

A set of 3D regions living in a common domain which is a rectangular subset of R x R. Each regions is of type Region3D

Author:
Stefan Posch

Field Summary
(package private)  java.util.Vector<MTBRegion3D> 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.
private  double zMax
          Maximal y coordinate of the domain of this region set.
private  double zMin
          Minimal z coordinate of the domain of this region set.
 
Constructor Summary
MTBRegion3DSet(double xMin, double yMin, double zMin, double xMax, double yMax, double zMax)
          Construct an empty set of regions with given extent of domain
MTBRegion3DSet(int N, double xMin, double yMin, double zMin, double xMax, double yMax, double zMax)
          Construct an empty set (with memory allocated for N elements) of regions with given extent of domain
MTBRegion3DSet(de.unihalle.informatik.MiToBo_xml.MTBXMLRegion3DSetType xmlregion3Dset)
          Construct set of 3D-regions from an xml-representation
MTBRegion3DSet(java.lang.String filename)
          Construct a set of 3D-regions from a xml-file that was written by the write method of this class.
MTBRegion3DSet(java.util.Vector<MTBRegion3D> regions, double xMin, double yMin, double zMin, double xMax, double yMax, double zMax)
          Construct an empty set of regions with given extent of domain
 
Method Summary
 boolean add(MTBRegion3D region)
          Append a region (at the end) to the set of regions.
 void clear()
          Remove all regions from this set
 MTBRegion3D elementAt(int i)
          Get a region by index
 MTBRegion3D get(int i)
          Get a region by index
 double getXmax()
           
 double getXmin()
           
 double getYmax()
           
 double getYmin()
           
 double getZmax()
           
 double getZmin()
           
 void removeElementAt(int i)
          Delete the i-th region from the set
 void setElementAt(MTBRegion3D region, int i)
          Set the i-th region from the set
 int size()
          Get the number of regions of this region set
(package private)  de.unihalle.informatik.MiToBo_xml.MTBXMLRegion3DSetType toXMLType()
          Construct an xml-representation of this set of 3D-regions.
 void write(java.lang.String filename)
          Write this set of 3D-regions to disk in XML format using MiToBo's xml-scheme MTBRegion3DSet.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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

regionSet

java.util.Vector<MTBRegion3D> regionSet
The set of regions represented as a Vector.


xMax

private double xMax
Maximal x coordinate of the domain of this region set.


xMin

private double xMin
Minimal x coordinate of the domain of this region set.


yMax

private double yMax
Maximal y coordinate of the domain of this region set.


yMin

private double yMin
Minimal y coordinate of the domain of this region set.


zMax

private double zMax
Maximal y coordinate of the domain of this region set.


zMin

private double zMin
Minimal z coordinate of the domain of this region set.

Constructor Detail

MTBRegion3DSet

public MTBRegion3DSet(double xMin,
                      double yMin,
                      double zMin,
                      double xMax,
                      double yMax,
                      double zMax)
Construct an empty set of regions with given extent of domain


MTBRegion3DSet

public MTBRegion3DSet(int N,
                      double xMin,
                      double yMin,
                      double zMin,
                      double xMax,
                      double yMax,
                      double zMax)
Construct an empty set (with memory allocated for N elements) of regions with given extent of domain


MTBRegion3DSet

public MTBRegion3DSet(de.unihalle.informatik.MiToBo_xml.MTBXMLRegion3DSetType xmlregion3Dset)
Construct set of 3D-regions from an xml-representation


MTBRegion3DSet

public MTBRegion3DSet(java.lang.String filename)
               throws org.apache.xmlbeans.XmlException,
                      java.io.IOException
Construct a set of 3D-regions from a xml-file that was written by the write method of this class. (These xml-files conform to xml-scheme MTBXMLRegion3DSet.xsd defined for MiToBo)

Parameters:
filename - path to the xml-file
Throws:
java.io.IOException - thrown if parsing of xml-file failed
org.apache.xmlbeans.XmlException - thrown if parsing of xml-file failed

MTBRegion3DSet

public MTBRegion3DSet(java.util.Vector<MTBRegion3D> regions,
                      double xMin,
                      double yMin,
                      double zMin,
                      double xMax,
                      double yMax,
                      double zMax)
Construct an empty set of regions with given extent of domain

Method Detail

add

public boolean add(MTBRegion3D region)
Append a region (at the end) to the set of regions.

Parameters:
region - region to add

clear

public void clear()
Remove all regions from this set


elementAt

public MTBRegion3D elementAt(int i)
Get a region by index

Returns:
i-th region

get

public MTBRegion3D get(int i)
Get a region by index

Returns:
i-th region

getXmax

public double getXmax()

getXmin

public double getXmin()

getYmax

public double getYmax()

getYmin

public double getYmin()

getZmax

public double getZmax()

getZmin

public double getZmin()

removeElementAt

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

Parameters:
i - index of region to remove

setElementAt

public void setElementAt(MTBRegion3D region,
                         int i)
Set the i-th region from the set

Parameters:
i - index of region to remove

size

public int size()
Get the number of regions of this region set

Returns:
number of regions

toXMLType

de.unihalle.informatik.MiToBo_xml.MTBXMLRegion3DSetType toXMLType()
Construct an xml-representation of this set of 3D-regions.


write

public void write(java.lang.String filename)
           throws java.io.IOException,
                  de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException,
                  de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Write this set of 3D-regions to disk in XML format using MiToBo's xml-scheme MTBRegion3DSet.xsd

Throws:
java.io.IOException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException