public class BooleanMask4D extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
Rectangle4D.Integer |
bounds
Region represented by the mask.
|
java.util.TreeMap<java.lang.Integer,BooleanMask3D> |
mask
Boolean mask 3D array.
|
Constructor and Description |
---|
BooleanMask4D() |
BooleanMask4D(Point4D.Integer[] points)
Build a new 4D boolean mask from the specified array of
Point4D . |
BooleanMask4D(Point4D[] points)
Build a new boolean mask from the specified array of
Point4D . |
BooleanMask4D(Rectangle4D.Integer bounds,
BooleanMask3D[] mask)
Build a new 4D boolean mask with specified bounds and 3D mask array.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
boolean |
contains(BooleanMask2D booleanMask,
int z,
int t)
Return true if mask contains the specified 2D mask at position Z, T.
|
boolean |
contains(BooleanMask3D booleanMask,
int t)
Return true if mask contains the specified 3D mask at position t.
|
boolean |
contains(BooleanMask4D booleanMask)
Return true if mask contains the specified 4D mask.
|
boolean |
contains(int x,
int y,
int z,
int t)
Return true if mask contains the specified point
|
Point4D.Integer[] |
getContourPoints()
Return an array of
Point4D.Integer containing the contour/surface
points
of the 4D mask. |
int[] |
getContourPointsAsIntArray()
Return an array of integer containing the contour/surface points of the 4D mask.
|
static BooleanMask4D |
getExclusiveUnion(BooleanMask4D mask1,
BooleanMask4D mask2)
Build resulting mask from exclusive union of the mask1 and mask2:
mask1 xor mask2 = result
################ ################
############## ############## ## ##
############ ############ #### ####
########## ########## ###### ######
######## ######## ################
###### ###### ###### ######
#### #### #### ####
## ## ## ##
|
static BooleanMask4D |
getIntersection(BooleanMask4D mask1,
BooleanMask4D mask2)
Build resulting mask from intersection of the mask1 and mask2:
mask1 intersect mask2 = result
################ ################ ################
############## ############## ############
############ ############ ########
########## ########## ####
######## ########
###### ######
#### ####
## ##
|
BooleanMask2D |
getMask2D(int z,
int t)
Returns the 2D boolean mask for the specified Z, T position
|
BooleanMask3D |
getMask3D(int t)
Returns the 3D boolean mask for the specified T position
|
int |
getNumberOfPoints()
Return the number of points contained in this boolean mask.
|
Rectangle4D.Integer |
getOptimizedBounds()
Optimize mask bounds so it fits mask content.
|
Rectangle4D.Integer |
getOptimizedBounds(boolean compute3DBounds)
Optimize mask bounds so it fits mask content.
|
Point4D.Integer[] |
getPoints()
Return an array of
Point4D.Integer representing all points of the
current 4D mask. |
int[] |
getPointsAsIntArray()
Return an array of integer representing all points of the current 4D mask.
|
static BooleanMask4D |
getSubtraction(BooleanMask4D mask1,
BooleanMask4D mask2)
Build resulting mask from the subtraction of mask2 from mask1:
mask1 - mask2 = result
################ ################
############## ############## ##
############ ############ ####
########## ########## ######
######## ######## ########
###### ###### ######
#### #### ####
## ## ##
|
static BooleanMask4D |
getUnion(BooleanMask4D mask1,
BooleanMask4D mask2)
Build resulting mask from union of the mask1 and mask2:
mask1 + mask2 = result
################ ################ ################
############## ############## ################
############ ############ ################
########## ########## ################
######## ######## ################
###### ###### ###### ######
#### #### #### ####
## ## ## ##
|
boolean |
intersects(BooleanMask2D booleanMask,
int z,
int t)
Return true if mask intersects (contains at least one point) the specified 2D mask at
position Z, T
|
boolean |
intersects(BooleanMask3D booleanMask,
int t)
Return true if mask intersects (contains at least one point) the specified 3D mask at
position T
|
boolean |
intersects(BooleanMask4D booleanMask)
Return true if mask intersects (contains at least one point) the specified 4D mask region
|
boolean |
isEmpty()
Return
true if boolean mask is empty |
void |
moveBounds(Rectangle4D.Integer value)
Change the bounds of BooleanMask.
|
void |
optimizeBounds()
Optimize mask bounds so it fits mask content.
|
static int[] |
toInt4D(int[] source3D,
int t)
Transforms the specified 3D coordinates int array [x,y,z] in 4D coordinates int array [x,y,z,t] with the
specified T value.
|
public Rectangle4D.Integer bounds
public final java.util.TreeMap<java.lang.Integer,BooleanMask3D> mask
public BooleanMask4D(Rectangle4D.Integer bounds, BooleanMask3D[] mask)
bounds.getSizeT()
.public BooleanMask4D(Point4D.Integer[] points)
Point4D
.public BooleanMask4D(Point4D[] points)
Point4D
.public BooleanMask4D()
public static BooleanMask4D getUnion(BooleanMask4D mask1, BooleanMask4D mask2)
mask1 + mask2 = result ################ ################ ################ ############## ############## ################ ############ ############ ################ ########## ########## ################ ######## ######## ################ ###### ###### ###### ###### #### #### #### #### ## ## ## ##
public static BooleanMask4D getIntersection(BooleanMask4D mask1, BooleanMask4D mask2)
mask1 intersect mask2 = result ################ ################ ################ ############## ############## ############ ############ ############ ######## ########## ########## #### ######## ######## ###### ###### #### #### ## ##
public static BooleanMask4D getExclusiveUnion(BooleanMask4D mask1, BooleanMask4D mask2)
mask1 xor mask2 = result ################ ################ ############## ############## ## ## ############ ############ #### #### ########## ########## ###### ###### ######## ######## ################ ###### ###### ###### ###### #### #### #### #### ## ## ## ##
public static BooleanMask4D getSubtraction(BooleanMask4D mask1, BooleanMask4D mask2)
mask1 - mask2 = result ################ ################ ############## ############## ## ############ ############ #### ########## ########## ###### ######## ######## ######## ###### ###### ###### #### #### #### ## ## ##
public BooleanMask3D getMask3D(int t)
public BooleanMask2D getMask2D(int z, int t)
public boolean isEmpty()
true
if boolean mask is emptypublic boolean contains(int x, int y, int z, int t)
public boolean contains(BooleanMask2D booleanMask, int z, int t)
public boolean contains(BooleanMask3D booleanMask, int t)
public boolean contains(BooleanMask4D booleanMask)
public boolean intersects(BooleanMask2D booleanMask, int z, int t)
public boolean intersects(BooleanMask3D booleanMask, int t)
public boolean intersects(BooleanMask4D booleanMask)
public Rectangle4D.Integer getOptimizedBounds(boolean compute3DBounds)
public Rectangle4D.Integer getOptimizedBounds()
public void optimizeBounds()
public void moveBounds(Rectangle4D.Integer value)
public static int[] toInt4D(int[] source3D, int t)
public Point4D.Integer[] getContourPoints()
Point4D.Integer
containing the contour/surface
points
of the 4D mask.getContourPointsAsIntArray()
public int[] getContourPointsAsIntArray()
result.length
= number of point * 4result[(pt * 4) + 0]
= X coordinate for point pt.result[(pt * 4) + 1]
= Y coordinate for point pt.result[(pt * 4) + 2]
= Z coordinate for point pt.result[(pt * 4) + 3]
= T coordinate for point pt.getContourPoints()
public int getNumberOfPoints()
public Point4D.Integer[] getPoints()
Point4D.Integer
representing all points of the
current 4D mask.public int[] getPointsAsIntArray()
result.length
= number of point * 4result[(pt * 4) + 0]
= X coordinate for point pt.result[(pt * 4) + 1]
= Y coordinate for point pt.result[(pt * 4) + 2]
= Z coordinate for point pt.result[(pt * 4) + 3]
= T coordinate for point pt.public java.lang.Object clone()
clone
in class java.lang.Object