Public Member Functions | Private Member Functions | Private Attributes
edu.tum.cs.vis.model.util.Region Class Reference

List of all members.

Public Member Functions

void addTrianglesToRegion (final List< Triangle > newTr)
void addTriangleToRegion (final Triangle newTr)
void addTriangleToRegionBoundary (final Triangle newTr)
void buildUpRegion ()
Appearance getAppearance ()
float getAreaOfRegion ()
List< EdgegetBoundaryEdges ()
List< TrianglegetBoundaryTriangles ()
Edge getCommonEdge (Triangle triangle)
List< EdgegetCommonEdges (Region neighbor)
float[] getCurvatureMinMaxOfRegion ()
List< RegiongetNeighbors ()
List< TrianglegetOutsideBoundaryUnlabelled ()
float getPerimeterOfRegion ()
int getRegionId ()
List< TrianglegetTriangles ()
void initializeApperance ()
boolean isNeighbor (Region region)
 Region (final int newId)
 Region (final int newId, final Triangle initSeedTr)
void removeTriangleFromRegion (final Triangle toRemove)
void setApperance (final Appearance newAppearance)
void setCurvatureMax (final float kMax)
void setCurvatureMin (final float kMin)
void setCurvatureMinMax (final float kMinkMax)
String toString ()
void updateAreaOfRegion ()
void updatePerimeterOfRegion ()
void updateRegionBoundary ()
void updateRegionNeighbors (List< Region > allRegions)

Private Member Functions

void updateAreaOfRegion (final Triangle tr, final boolean toRemove)

Private Attributes

Appearance appearance = new Appearance()
float area
final List< TriangleboundaryTriangles = new ArrayList<Triangle>()
final float[] curvatureMinMax = new float[3]
final List< EdgeedgeBoundary = new ArrayList<Edge>()
final int id
float perimeter
final List< RegionregionNeighbors = new ArrayList<Region>()
final List< Triangletriangles = new ArrayList<Triangle>()

Detailed Description

Class that implements the data storage and functionality of a region as a connected area of triangles on the mesh surface that share common curvature properties. These triangles are situated on relatively contained and localized position on the mesh which are thus implemented as regions.

Author:
Andrei Stoica

Definition at line 23 of file Region.java.


Constructor & Destructor Documentation

edu.tum.cs.vis.model.util.Region.Region ( final int  newId) [inline]

Constructor for a region that takes only the region id

Parameters:
newIdregion id

Definition at line 81 of file Region.java.

edu.tum.cs.vis.model.util.Region.Region ( final int  newId,
final Triangle  initSeedTr 
) [inline]

Constructor for a region that takes the region id and the initial seed triangle from which the region build-up starts

Parameters:
newIdregion id
initSeedTrseed triangle from which region growing starts

Definition at line 98 of file Region.java.


Member Function Documentation

void edu.tum.cs.vis.model.util.Region.addTrianglesToRegion ( final List< Triangle newTr) [inline]

Adds a list of triangles to the list of triangles in the region. If a triangle was already in the region, it is skipped.

Parameters:
newTrlist of traingles to be added to the region

Definition at line 366 of file Region.java.

Adds triangle to the list of triangles included in the region. The addition is performed only if the triangle was not previously inside the region. If the triangle was already in the region, this function does nothing.

Parameters:
newTrtriangle to be checked and added to triangle

Definition at line 390 of file Region.java.

Checks if a triangle is at a region's boundary and if it is it adds it to the list and then removes any triangles from the list that are not longer at the boundary. If the triangle is not at the boundary, this function does nothing. The check is based on the neighbors of the triangle compared against the triangles already in the region.

Parameters:
newTrtriangle to be checked and added to region boundary

Definition at line 409 of file Region.java.

Builds the region starting from the initial triangle seed used to initialize the region. The growing algorithm makes sure to classify triangles with the same curvature properties in the same region without stepping over the edges identified as sharp edges. Thus the growing process is based on the neighboring relations among triangles and on their curvature information. Consequently, connected triangles on the mesh that share same curvature properties and are not separated by a sharp edge are brought together starting from the seed triangle of the region.

The region growing algorithm is based on the paper "A new CAD mesh segmentation method, based on curvature tensor analysis", Guillaume Lavoue, Florent Dupont, Atilla Baskurt, Computer-Aided Design 37 (2005), 975–987.

See also:
"A new CAD mesh segmentation method, based on curvature tensor analysis"

Definition at line 538 of file Region.java.

Gets the region's appearance

Returns:
appearance

Definition at line 132 of file Region.java.

Gets the region's area

Returns:
area

Definition at line 123 of file Region.java.

Gets the region's list of boundary edges

Returns:
boundary edges

Definition at line 177 of file Region.java.

Gets the region's list of boundary triangles

Returns:
boundary triangles

Definition at line 159 of file Region.java.

Determines the common edge a triangle from outside or inside the region (not from the boundary) has with the region boundary

Parameters:
triangleto be checked
Returns:
the common edge or null if not any

Definition at line 238 of file Region.java.

Detects the shared edges at the boundary of two regions

Parameters:
neighborregion to be checked
Returns:
list of all shared edges

Definition at line 217 of file Region.java.

Gets the curvature values associated with the region as an array containing the kMin, kMax, kMinMax curvature values

Returns:
curvature value

Definition at line 187 of file Region.java.

Gets the region's list of region neighbors

Returns:
region neighbors

Definition at line 168 of file Region.java.

Determines the triangle neighbors of the region that are still not labelled as belonging to a region

Returns:
unlabelled triangles neighboring the region

Definition at line 197 of file Region.java.

Gets the region's perimeter

Returns:
perimeter

Definition at line 141 of file Region.java.

Gets the region's id

Returns:
id

Definition at line 114 of file Region.java.

Gets the region's list of triangles

Returns:
triangles

Definition at line 150 of file Region.java.

Initializes the appearance of a newly created region by randomizing the fill color associated with the region.

Definition at line 310 of file Region.java.

Returns a boolean specifying whether the region passed as an argument is a neighbor or not of the current instance

Parameters:
regionregion to be checked
Returns:
true or false

Definition at line 299 of file Region.java.

Removes triangle from region and updates the list of region triangles and of the region boundary triangles

Definition at line 449 of file Region.java.

void edu.tum.cs.vis.model.util.Region.setApperance ( final Appearance  newAppearance) [inline]

Sets the region's appearance

Parameters:
newAppearanceto be set

Definition at line 257 of file Region.java.

void edu.tum.cs.vis.model.util.Region.setCurvatureMax ( final float  kMax) [inline]

Sets the region's maximum curvature kMax value

Parameters:
kMaxcurvature to be set

Definition at line 277 of file Region.java.

void edu.tum.cs.vis.model.util.Region.setCurvatureMin ( final float  kMin) [inline]

Sets the region's minimum curvature kMin value

Parameters:
kMincurvature to be set

Definition at line 267 of file Region.java.

void edu.tum.cs.vis.model.util.Region.setCurvatureMinMax ( final float  kMinkMax) [inline]

Sets the region's min-max curvature kMinkMax value

Parameters:
kMinkMaxcurvature to be set

Definition at line 287 of file Region.java.

Definition at line 575 of file Region.java.

Calculates in-place the region surface area based on the individual areas of the triangles which are part of the region

Definition at line 323 of file Region.java.

void edu.tum.cs.vis.model.util.Region.updateAreaOfRegion ( final Triangle  tr,
final boolean  toRemove 
) [inline, private]

Adds up or subtracts in-place the area of a specified triangle to the area of the region. If the toRemove flag is raised the area is subtracted, otherwise it is added.

Parameters:
trtriangle whose area needs to be added / subtracted to region
toRemoveflag to subtract the area from

Definition at line 339 of file Region.java.

Calculates in-place the perimeter of the region using the boundary edges.

Definition at line 352 of file Region.java.

Updates the boundary region based on the existing triangles inside the region itself

Definition at line 465 of file Region.java.

void edu.tum.cs.vis.model.util.Region.updateRegionNeighbors ( List< Region allRegions) [inline]

Updates the region neighbors based on a list containing a list of regions

Parameters:
allRegionslist of regions to be checked (ideally it should contain all the regions on the mesh of the CAD model)

Definition at line 491 of file Region.java.


Member Data Documentation

The appearance associated with the region. This is used to customize the view of the triangles that are part of the region

Definition at line 73 of file Region.java.

The area of the entire region

Definition at line 33 of file Region.java.

final List<Triangle> edu.tum.cs.vis.model.util.Region.boundaryTriangles = new ArrayList<Triangle>() [private]

A list of all the triangles on the boundary of the region

Definition at line 52 of file Region.java.

final float [] edu.tum.cs.vis.model.util.Region.curvatureMinMax = new float[3] [private]

The curvature parameters of the boundary. The first parameter stores the minimum value of the curvature kMin, the second one the maximum value of the curvature kMax and the third the MinMax kMinMax curvature value as they were computed by the calculateCurvatures(HashMap<Vertex, Curvature>, Model) routine from the knowrob_mesh_reasoning add-on

Definition at line 42 of file Region.java.

final List<Edge> edu.tum.cs.vis.model.util.Region.edgeBoundary = new ArrayList<Edge>() [private]

A list of all edges at the boundary that form in the end the perimeter of the region

Definition at line 62 of file Region.java.

Stores the regions label id

Definition at line 28 of file Region.java.

The flaoting point value of the region's perimeter

Definition at line 67 of file Region.java.

final List<Region> edu.tum.cs.vis.model.util.Region.regionNeighbors = new ArrayList<Region>() [private]

A list of all the regions that are neighbors of this region instance

Definition at line 57 of file Region.java.

final List<Triangle> edu.tum.cs.vis.model.util.Region.triangles = new ArrayList<Triangle>() [private]

A list of all the triangles inside the region

Definition at line 47 of file Region.java.


The documentation for this class was generated from the following file:


knowrob_cad_parser
Author(s): Stefan Profanter
autogenerated on Mon Oct 6 2014 01:29:56