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.Object
Private utility class for operations on BitSets- Author:
- senseneyj
-
-
Constructor Summary
Constructors Modifier Constructor Description private
BitSetUtility()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) 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 inconnectingRegion
. Walking up, down, right, and/or left fromloc
to this element requires less than or equal tomaxNeighborDistance
steps.(package private) 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 copiesprivate boolean
connectNearNeighborsUtil(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) int
getBoundaryCode(java.util.BitSet set, int value)
(package private) java.util.BitSet
getEdgePoints(java.util.BitSet set)
Finds the points of the givenBitSet
which has at least one neighbor (not including diagonals) not in the BitSet.(package private) float
getMinDistance(int value, java.util.BitSet set)
Calculates the distance between the closest point in thisBitSet
and the givenvalue
.(package private) float
getMinDistance(int value, java.util.Vector<Point3D> setPoints)
Calculates the distance between the closest point in thisVector
and the givenvalue
.(package private) boolean
isBoundaryPoint(java.util.BitSet set, int value)
(package private) boolean
isInScan(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 thisBitSet
and the givenvalue
.
-
getMinDistance
float getMinDistance(int value, java.util.Vector<Point3D> setPoints)
Calculates the distance between the closest point in thisVector
and the givenvalue
.
-
getEdgePoints
java.util.BitSet getEdgePoints(java.util.BitSet set)
Finds the points of the givenBitSet
which 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
loc
to this element requires less than or equal tomaxNeighborDistance
steps.
- 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)
-
-