Package gov.nih.mipav.model.structures
Class GenericPolygonClipper
- java.lang.Object
- 
- gov.nih.mipav.model.structures.GenericPolygonClipper
 
- 
 public class GenericPolygonClipper extends java.lang.Object
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description private classGenericPolygonClipper.bboxprivate static classGenericPolygonClipper.bundle_stateprivate classGenericPolygonClipper.edge_nodestatic classGenericPolygonClipper.gpc_opprivate classGenericPolygonClipper.gpc_vertexprivate classGenericPolygonClipper.gpc_vertex_listprivate classGenericPolygonClipper.it_nodeprivate classGenericPolygonClipper.lmt_nodeprivate classGenericPolygonClipper.polygon_nodeprivate classGenericPolygonClipper.sb_treeprivate classGenericPolygonClipper.st_nodeprivate classGenericPolygonClipper.vertex_node
 - 
Field SummaryFields Modifier and Type Field Description private static intABOVEprivate static intBEDprivate static intBELOWprivate static intBHprivate static intCLIPprivate boolean[]clipContributingStatusprivate static doubleDBL_EPSILONProject: Generic Polygon Clipper A new algorithm for calculating the difference, intersection, exclusive-or or union of arbitrary polygon sets.private static intELIprivate static intEMMprivate static intEMNprivate static intEMXprivate static intERIprivate static intFULprivate static doubleGPC_EPSILONprivate static intILIprivate static intIMMprivate static intIMNprivate static intIMXprivate static intIRIprivate static intLEDprivate static intLEFT(package private) int[][]next_h_stateprivate static intNHprivate static intNULprivate static intREDprivate static intRIGHTprivate static intSUBJprivate boolean[]subjContributingStatusprivate static intTEDprivate static intTH
 - 
Constructor SummaryConstructors Constructor Description GenericPolygonClipper()GenericPolygonClipper(GenericPolygonClipper.gpc_op op, VOI subj, VOI clip, VOI result)
 - 
Method Summary
 
- 
- 
- 
Field Detail- 
DBL_EPSILONprivate static final double DBL_EPSILON Project: Generic Polygon Clipper A new algorithm for calculating the difference, intersection, exclusive-or or union of arbitrary polygon sets. File: gpc.c Author: Alan Murta (email: gpc@cs.man.ac.uk) Version: 2.32 Date: 17th December 2004 Copyright: (C) Advanced Interfaces Group, University of Manchester. This software is free for non-commercial use. It may be copied, modified, and redistributed provided that this copyright notice is preserved on all copies. The intellectual property rights of the algorithms used reside with the University of Manchester Advanced Interfaces Group. You may not use this software, in whole or in part, in support of any commercial product without the express consent of the author. There is no warranty or other guarantee of fitness of this software for any purpose. It is provided solely "as is".- See Also:
- Constant Field Values
 
 - 
GPC_EPSILONprivate static final double GPC_EPSILON - See Also:
- Constant Field Values
 
 - 
LEFTprivate static final int LEFT - See Also:
- Constant Field Values
 
 - 
RIGHTprivate static final int RIGHT - See Also:
- Constant Field Values
 
 - 
ABOVEprivate static final int ABOVE - See Also:
- Constant Field Values
 
 - 
BELOWprivate static final int BELOW - See Also:
- Constant Field Values
 
 - 
CLIPprivate static final int CLIP - See Also:
- Constant Field Values
 
 - 
SUBJprivate static final int SUBJ - See Also:
- Constant Field Values
 
 - 
NULprivate static final int NUL - See Also:
- Constant Field Values
 
 - 
EMXprivate static final int EMX - See Also:
- Constant Field Values
 
 - 
ELIprivate static final int ELI - See Also:
- Constant Field Values
 
 - 
TEDprivate static final int TED - See Also:
- Constant Field Values
 
 - 
ERIprivate static final int ERI - See Also:
- Constant Field Values
 
 - 
REDprivate static final int RED - See Also:
- Constant Field Values
 
 - 
IMMprivate static final int IMM - See Also:
- Constant Field Values
 
 - 
IMNprivate static final int IMN - See Also:
- Constant Field Values
 
 - 
EMNprivate static final int EMN - See Also:
- Constant Field Values
 
 - 
EMMprivate static final int EMM - See Also:
- Constant Field Values
 
 - 
LEDprivate static final int LED - See Also:
- Constant Field Values
 
 - 
ILIprivate static final int ILI - See Also:
- Constant Field Values
 
 - 
BEDprivate static final int BED - See Also:
- Constant Field Values
 
 - 
IRIprivate static final int IRI - See Also:
- Constant Field Values
 
 - 
IMXprivate static final int IMX - See Also:
- Constant Field Values
 
 - 
FULprivate static final int FUL - See Also:
- Constant Field Values
 
 - 
NHprivate static final int NH - See Also:
- Constant Field Values
 
 - 
BHprivate static final int BH - See Also:
- Constant Field Values
 
 - 
THprivate static final int TH - See Also:
- Constant Field Values
 
 - 
next_h_stateint[][] next_h_state 
 - 
clipContributingStatusprivate boolean[] clipContributingStatus 
 - 
subjContributingStatusprivate boolean[] subjContributingStatus 
 
- 
 - 
Constructor Detail- 
GenericPolygonClipperpublic GenericPolygonClipper(GenericPolygonClipper.gpc_op op, VOI subj, VOI clip, VOI result) 
 - 
GenericPolygonClipperpublic GenericPolygonClipper() 
 
- 
 - 
Method Detail- 
EQprivate boolean EQ(double a, double b)
 - 
PREV_INDEXprivate int PREV_INDEX(int i, int n)
 - 
NEXT_INDEXprivate int NEXT_INDEX(int i, int n)
 - 
OPTIMALprivate boolean OPTIMAL(GenericPolygonClipper.gpc_vertex[] v, int i, int n) 
 - 
FWD_MINprivate boolean FWD_MIN(GenericPolygonClipper.edge_node[] v, int i, int n) 
 - 
NOT_FMAXprivate boolean NOT_FMAX(GenericPolygonClipper.edge_node[] v, int i, int n) 
 - 
REV_MINprivate boolean REV_MIN(GenericPolygonClipper.edge_node[] v, int i, int n) 
 - 
NOT_RMAXprivate boolean NOT_RMAX(GenericPolygonClipper.edge_node[] v, int i, int n) 
 - 
reset_itprivate void reset_it(GenericPolygonClipper.it_node[] it) 
 - 
reset_lmtprivate void reset_lmt(GenericPolygonClipper.lmt_node lmt) 
 - 
insert_boundprivate void insert_bound(GenericPolygonClipper.edge_node[] b, GenericPolygonClipper.edge_node[] e, int index) 
 - 
bound_listprivate GenericPolygonClipper.edge_node[] bound_list(GenericPolygonClipper.lmt_node[] lmt, double y) 
 - 
add_to_sbtreeprivate void add_to_sbtree(int[] entries, GenericPolygonClipper.sb_tree[] sbtree, double y)
 - 
build_sbtprivate void build_sbt(int[] entries, double[] sbt, GenericPolygonClipper.sb_tree sbtree)
 - 
free_sbtreeprivate void free_sbtree(GenericPolygonClipper.sb_tree[] sbtree) 
 - 
count_optimal_verticesprivate int count_optimal_vertices(GenericPolygonClipper.gpc_vertex_list c) 
 - 
build_lmtprivate GenericPolygonClipper.edge_node[] build_lmt(GenericPolygonClipper.lmt_node[] lmt, GenericPolygonClipper.sb_tree[] sbtree, int[] sbt_entries, VOIBaseVector p, int type, GenericPolygonClipper.gpc_op op) 
 - 
add_edge_to_aetprivate void add_edge_to_aet(GenericPolygonClipper.edge_node[] aet, GenericPolygonClipper.edge_node edge, GenericPolygonClipper.edge_node prev) 
 - 
add_intersectionprivate void add_intersection(GenericPolygonClipper.it_node[] it, GenericPolygonClipper.edge_node edge0, GenericPolygonClipper.edge_node edge1, double x, double y) 
 - 
add_st_edgeprivate void add_st_edge(GenericPolygonClipper.st_node[] st, GenericPolygonClipper.it_node[] it, GenericPolygonClipper.edge_node edge, double dy) 
 - 
build_intersection_tableprivate void build_intersection_table(GenericPolygonClipper.it_node[] it, GenericPolygonClipper.edge_node aet, double dy) 
 - 
count_contoursprivate int count_contours(GenericPolygonClipper.polygon_node polygon) 
 - 
add_leftprivate void add_left(GenericPolygonClipper.polygon_node p, double x, double y) 
 - 
merge_leftprivate void merge_left(GenericPolygonClipper.polygon_node p, GenericPolygonClipper.polygon_node q, GenericPolygonClipper.polygon_node list) 
 - 
add_rightprivate void add_right(GenericPolygonClipper.polygon_node p, double x, double y) 
 - 
merge_rightprivate void merge_right(GenericPolygonClipper.polygon_node p, GenericPolygonClipper.polygon_node q, GenericPolygonClipper.polygon_node list) 
 - 
add_local_minprivate void add_local_min(GenericPolygonClipper.polygon_node[] p, GenericPolygonClipper.edge_node edge, double x, double y) 
 - 
create_contour_bboxesprivate GenericPolygonClipper.bbox[] create_contour_bboxes(VOIBaseVector p) 
 - 
minimax_testprivate void minimax_test(VOIBaseVector subj, VOIBaseVector clip, GenericPolygonClipper.gpc_op op) 
 - 
selfTestpublic void selfTest(int testNum) 
 - 
selfTest2public void selfTest2() 
 
- 
 
-