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