Package gov.nih.mipav.model.algorithms
Class AlgorithmFaceAnonymizerBET.BitSetUtility
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.AlgorithmFaceAnonymizerBET.BitSetUtility
-
- Enclosing class:
- AlgorithmFaceAnonymizerBET
private class AlgorithmFaceAnonymizerBET.BitSetUtility extends java.lang.ObjectPrivate utility class for operations on BitSets- Author:
- senseneyj
-
-
Constructor Summary
Constructors Modifier Constructor Description privateBitSetUtility()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.util.BitSetconnectNearNeighbors(int loc, java.util.BitSet connectingRegion, int maxNeighborDistance)Set elements of the returned BitSet meet at least one of the following criteria: Element is set inconnectingRegion. Walking up, down, right, and/or left fromlocto this element requires less than or equal tomaxNeighborDistancesteps.(package private) java.util.BitSetconnectNearNeighbors(int loc, java.util.BitSet connectingRegion, java.util.BitSet connectingRegionCopy, int maxNeighborDistance)A helper method forconnectNearNeighbors(int, BitSet, int)that allows faster copiesprivate booleanconnectNearNeighborsUtil(int loc, java.util.BitSet connectingRegion, java.util.BitSet connectingRegionCopy, int level, int dir, int levelCut)private java.util.Vector<Point3D>convertSetToPoints(java.util.BitSet set)(package private) intgetBoundaryCode(java.util.BitSet set, int value)(package private) java.util.BitSetgetEdgePoints(java.util.BitSet set)Finds the points of the givenBitSetwhich has at least one neighbor (not including diagonals) not in the BitSet.(package private) floatgetMinDistance(int value, java.util.BitSet set)Calculates the distance between the closest point in thisBitSetand the givenvalue.(package private) floatgetMinDistance(int value, java.util.Vector<Point3D> setPoints)Calculates the distance between the closest point in thisVectorand the givenvalue.(package private) booleanisBoundaryPoint(java.util.BitSet set, int value)(package private) booleanisInScan(int value)
-
-
-
Field Detail
-
LEFT_EXP
static final int LEFT_EXP
- See Also:
- Constant Field Values
-
RIGHT_EXP
static final int RIGHT_EXP
- See Also:
- Constant Field Values
-
DOWN_EXP
static final int DOWN_EXP
- See Also:
- Constant Field Values
-
UP_EXP
static final int UP_EXP
- See Also:
- Constant Field Values
-
IN_EXP
static final int IN_EXP
- See Also:
- Constant Field Values
-
OUT_EXP
static final int OUT_EXP
- See Also:
- Constant Field Values
-
-
Method Detail
-
getMinDistance
float getMinDistance(int value, java.util.BitSet set)Calculates the distance between the closest point in thisBitSetand the givenvalue.
-
getMinDistance
float getMinDistance(int value, java.util.Vector<Point3D> setPoints)Calculates the distance between the closest point in thisVectorand the givenvalue.
-
getEdgePoints
java.util.BitSet getEdgePoints(java.util.BitSet set)
Finds the points of the givenBitSetwhich has at least one neighbor (not including diagonals) not in the BitSet.
-
isBoundaryPoint
boolean isBoundaryPoint(java.util.BitSet set, int value)
-
getBoundaryCode
int getBoundaryCode(java.util.BitSet set, int value)
-
isInScan
boolean isInScan(int value)
-
connectNearNeighbors
java.util.BitSet connectNearNeighbors(int loc, java.util.BitSet connectingRegion, int maxNeighborDistance)Set elements of the returned BitSet meet at least one of the following criteria:- Element is set in
connectingRegion. - Walking up, down, right, and/or left from
locto this element requires less than or equal tomaxNeighborDistancesteps.
- Element is set in
-
connectNearNeighbors
java.util.BitSet connectNearNeighbors(int loc, java.util.BitSet connectingRegion, java.util.BitSet connectingRegionCopy, int maxNeighborDistance)A helper method forconnectNearNeighbors(int, BitSet, int)that allows faster copies
-
connectNearNeighborsUtil
private boolean connectNearNeighborsUtil(int loc, java.util.BitSet connectingRegion, java.util.BitSet connectingRegionCopy, int level, int dir, int levelCut)
-
convertSetToPoints
private java.util.Vector<Point3D> convertSetToPoints(java.util.BitSet set)
-
-