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 Summary
Nested Classes Modifier and Type Class Description private class
GenericPolygonClipper.bbox
private static class
GenericPolygonClipper.bundle_state
private class
GenericPolygonClipper.edge_node
static class
GenericPolygonClipper.gpc_op
private class
GenericPolygonClipper.gpc_vertex
private class
GenericPolygonClipper.gpc_vertex_list
private class
GenericPolygonClipper.it_node
private class
GenericPolygonClipper.lmt_node
private class
GenericPolygonClipper.polygon_node
private class
GenericPolygonClipper.sb_tree
private class
GenericPolygonClipper.st_node
private class
GenericPolygonClipper.vertex_node
-
Field Summary
Fields Modifier and Type Field Description private static int
ABOVE
private static int
BED
private static int
BELOW
private static int
BH
private static int
CLIP
private boolean[]
clipContributingStatus
private static double
DBL_EPSILON
Project: Generic Polygon Clipper A new algorithm for calculating the difference, intersection, exclusive-or or union of arbitrary polygon sets.private static int
ELI
private static int
EMM
private static int
EMN
private static int
EMX
private static int
ERI
private static int
FUL
private static double
GPC_EPSILON
private static int
ILI
private static int
IMM
private static int
IMN
private static int
IMX
private static int
IRI
private static int
LED
private static int
LEFT
(package private) int[][]
next_h_state
private static int
NH
private static int
NUL
private static int
RED
private static int
RIGHT
private static int
SUBJ
private boolean[]
subjContributingStatus
private static int
TED
private static int
TH
-
Constructor Summary
Constructors Constructor Description GenericPolygonClipper()
GenericPolygonClipper(GenericPolygonClipper.gpc_op op, VOI subj, VOI clip, VOI result)
-
Method Summary
-
-
-
Field Detail
-
DBL_EPSILON
private 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_EPSILON
private static final double GPC_EPSILON
- See Also:
- Constant Field Values
-
LEFT
private static final int LEFT
- See Also:
- Constant Field Values
-
RIGHT
private static final int RIGHT
- See Also:
- Constant Field Values
-
ABOVE
private static final int ABOVE
- See Also:
- Constant Field Values
-
BELOW
private static final int BELOW
- See Also:
- Constant Field Values
-
CLIP
private static final int CLIP
- See Also:
- Constant Field Values
-
SUBJ
private static final int SUBJ
- See Also:
- Constant Field Values
-
NUL
private static final int NUL
- See Also:
- Constant Field Values
-
EMX
private static final int EMX
- See Also:
- Constant Field Values
-
ELI
private static final int ELI
- See Also:
- Constant Field Values
-
TED
private static final int TED
- See Also:
- Constant Field Values
-
ERI
private static final int ERI
- See Also:
- Constant Field Values
-
RED
private static final int RED
- See Also:
- Constant Field Values
-
IMM
private static final int IMM
- See Also:
- Constant Field Values
-
IMN
private static final int IMN
- See Also:
- Constant Field Values
-
EMN
private static final int EMN
- See Also:
- Constant Field Values
-
EMM
private static final int EMM
- See Also:
- Constant Field Values
-
LED
private static final int LED
- See Also:
- Constant Field Values
-
ILI
private static final int ILI
- See Also:
- Constant Field Values
-
BED
private static final int BED
- See Also:
- Constant Field Values
-
IRI
private static final int IRI
- See Also:
- Constant Field Values
-
IMX
private static final int IMX
- See Also:
- Constant Field Values
-
FUL
private static final int FUL
- See Also:
- Constant Field Values
-
NH
private static final int NH
- See Also:
- Constant Field Values
-
BH
private static final int BH
- See Also:
- Constant Field Values
-
TH
private static final int TH
- See Also:
- Constant Field Values
-
next_h_state
int[][] next_h_state
-
clipContributingStatus
private boolean[] clipContributingStatus
-
subjContributingStatus
private boolean[] subjContributingStatus
-
-
Constructor Detail
-
GenericPolygonClipper
public GenericPolygonClipper(GenericPolygonClipper.gpc_op op, VOI subj, VOI clip, VOI result)
-
GenericPolygonClipper
public GenericPolygonClipper()
-
-
Method Detail
-
EQ
private boolean EQ(double a, double b)
-
PREV_INDEX
private int PREV_INDEX(int i, int n)
-
NEXT_INDEX
private int NEXT_INDEX(int i, int n)
-
OPTIMAL
private boolean OPTIMAL(GenericPolygonClipper.gpc_vertex[] v, int i, int n)
-
FWD_MIN
private boolean FWD_MIN(GenericPolygonClipper.edge_node[] v, int i, int n)
-
NOT_FMAX
private boolean NOT_FMAX(GenericPolygonClipper.edge_node[] v, int i, int n)
-
REV_MIN
private boolean REV_MIN(GenericPolygonClipper.edge_node[] v, int i, int n)
-
NOT_RMAX
private boolean NOT_RMAX(GenericPolygonClipper.edge_node[] v, int i, int n)
-
reset_it
private void reset_it(GenericPolygonClipper.it_node[] it)
-
reset_lmt
private void reset_lmt(GenericPolygonClipper.lmt_node lmt)
-
insert_bound
private void insert_bound(GenericPolygonClipper.edge_node[] b, GenericPolygonClipper.edge_node[] e, int index)
-
bound_list
private GenericPolygonClipper.edge_node[] bound_list(GenericPolygonClipper.lmt_node[] lmt, double y)
-
add_to_sbtree
private void add_to_sbtree(int[] entries, GenericPolygonClipper.sb_tree[] sbtree, double y)
-
build_sbt
private void build_sbt(int[] entries, double[] sbt, GenericPolygonClipper.sb_tree sbtree)
-
free_sbtree
private void free_sbtree(GenericPolygonClipper.sb_tree[] sbtree)
-
count_optimal_vertices
private int count_optimal_vertices(GenericPolygonClipper.gpc_vertex_list c)
-
build_lmt
private 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_aet
private void add_edge_to_aet(GenericPolygonClipper.edge_node[] aet, GenericPolygonClipper.edge_node edge, GenericPolygonClipper.edge_node prev)
-
add_intersection
private void add_intersection(GenericPolygonClipper.it_node[] it, GenericPolygonClipper.edge_node edge0, GenericPolygonClipper.edge_node edge1, double x, double y)
-
add_st_edge
private void add_st_edge(GenericPolygonClipper.st_node[] st, GenericPolygonClipper.it_node[] it, GenericPolygonClipper.edge_node edge, double dy)
-
build_intersection_table
private void build_intersection_table(GenericPolygonClipper.it_node[] it, GenericPolygonClipper.edge_node aet, double dy)
-
count_contours
private int count_contours(GenericPolygonClipper.polygon_node polygon)
-
add_left
private void add_left(GenericPolygonClipper.polygon_node p, double x, double y)
-
merge_left
private void merge_left(GenericPolygonClipper.polygon_node p, GenericPolygonClipper.polygon_node q, GenericPolygonClipper.polygon_node list)
-
add_right
private void add_right(GenericPolygonClipper.polygon_node p, double x, double y)
-
merge_right
private void merge_right(GenericPolygonClipper.polygon_node p, GenericPolygonClipper.polygon_node q, GenericPolygonClipper.polygon_node list)
-
add_local_min
private void add_local_min(GenericPolygonClipper.polygon_node[] p, GenericPolygonClipper.edge_node edge, double x, double y)
-
create_contour_bboxes
private GenericPolygonClipper.bbox[] create_contour_bboxes(VOIBaseVector p)
-
minimax_test
private void minimax_test(VOIBaseVector subj, VOIBaseVector clip, GenericPolygonClipper.gpc_op op)
-
selfTest
public void selfTest(int testNum)
-
selfTest2
public void selfTest2()
-
-