public class MTBSegmentation3D extends Object implements MTBSegmentationInterface
MTBSegmentationInterface.SegmentationDimension
Modifier and Type | Field and Description |
---|---|
protected int[][][] |
classmap
2D map with class labels.
|
(package private) int |
depth
Depth of segmentation domain.
|
(package private) int |
height
Height of segmentation domain.
|
protected int |
maxLabel
Maximal label appearing in the label list.
|
protected int |
numRegions
Number of represented regions.
|
protected boolean[][][] |
visiblemap
Visibility map for hiding individual pixels.
|
protected double[][][] |
weightmap
Map of weights for the segmentation.
|
(package private) int |
width
Width of segmentation domain.
|
Constructor and Description |
---|
MTBSegmentation3D(int w,
int h,
int d,
int numClasses,
int[][][] cmap,
boolean[][][] vmap,
double[][][] wmap)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getClass(int x,
int y)
Returns the class label of position (x,y).
|
int |
getClass(int x,
int y,
int z)
Returns the class label of position (x,y,z).
|
MTBSegmentationInterface.SegmentationDimension |
getDimension()
Returns the dimension of the given membership.
|
MTBImage |
getMask(int class_)
Gets the mask of the specified class (0 Background, 255 Foreground)
|
int |
getMaxLabel()
Returns the maximal label used in the membership representation.
|
int |
getNumberOfClasses()
Returns the number of classes represented in the membership.
|
int |
getSizeX()
Returns the size of the segmentation domain in x direction.
|
int |
getSizeY()
Returns the size of the segmentation domain in y direction.
|
int |
getSizeZ()
Returns the size of the segmentation domain in z direction.
|
double |
getWeight(int x,
int y)
Returns the pixel weight of position (x,y).
|
double |
getWeight(int x,
int y,
int z)
Returns the pixel weight of position (x,y,z).
|
boolean |
isVisible(int x,
int y)
True, if position (x,y) is visible.
|
boolean |
isVisible(int x,
int y,
int z)
True, if position (x,y,z) is visible.
|
void |
setClass(int x,
int y,
int c)
Set the label of position (x,y) to c.
|
void |
setClass(int x,
int y,
int z,
int c)
Set the label of position (x,y,z) to c.
|
void |
setInvisible(int x,
int y)
Set position (x,y) invisible.
|
void |
setInvisible(int x,
int y,
int z)
Set position (x,y,z) invisible.
|
void |
setVisibilityMask(boolean[][][] mask)
Set the valid mask from external.
|
void |
setVisible(int x,
int y)
Set position (x,y) visible.
|
void |
setVisible(int x,
int y,
int z)
Set position (x,y,z) visible.
|
void |
setWeight(int x,
int y,
double c)
Sets the pixel weight of position (x,y) to c.
|
void |
setWeight(int x,
int y,
int z,
double c)
Sets the pixel weight of position (x,y,z) to c.
|
protected int numRegions
protected int maxLabel
int height
int width
int depth
protected int[][][] classmap
protected boolean[][][] visiblemap
protected double[][][] weightmap
public MTBSegmentation3D(int w, int h, int d, int numClasses, int[][][] cmap, boolean[][][] vmap, double[][][] wmap)
w
- Width of segmentation domain.h
- Height of segmentation domain.d
- Depth of segmentation domain.numClasses
- Number of segmented classes.cmap
- Map of class labels.vmap
- Visibility map.wmap
- Map of pixels weights.public MTBSegmentationInterface.SegmentationDimension getDimension()
getDimension
in interface MTBSegmentationInterface
public int getNumberOfClasses()
getNumberOfClasses
in interface MTBSegmentationInterface
public int getMaxLabel()
Note that the maximal label is not required to coincide with the number of classes represented by the membership function. Labels should always be larger or equal to zero.
getMaxLabel
in interface MTBSegmentationInterface
public boolean isVisible(int x, int y)
MTBSegmentationInterface
isVisible
in interface MTBSegmentationInterface
public boolean isVisible(int x, int y, int z)
MTBSegmentationInterface
isVisible
in interface MTBSegmentationInterface
public int getClass(int x, int y)
MTBSegmentationInterface
getClass
in interface MTBSegmentationInterface
public int getClass(int x, int y, int z)
MTBSegmentationInterface
getClass
in interface MTBSegmentationInterface
public void setClass(int x, int y, int c)
MTBSegmentationInterface
setClass
in interface MTBSegmentationInterface
public void setClass(int x, int y, int z, int c)
MTBSegmentationInterface
setClass
in interface MTBSegmentationInterface
public void setVisible(int x, int y, int z)
MTBSegmentationInterface
setVisible
in interface MTBSegmentationInterface
public void setVisible(int x, int y)
MTBSegmentationInterface
setVisible
in interface MTBSegmentationInterface
public void setInvisible(int x, int y, int z)
MTBSegmentationInterface
setInvisible
in interface MTBSegmentationInterface
public void setInvisible(int x, int y)
MTBSegmentationInterface
setInvisible
in interface MTBSegmentationInterface
public void setVisibilityMask(boolean[][][] mask)
public int getSizeX()
MTBSegmentationInterface
getSizeX
in interface MTBSegmentationInterface
public int getSizeY()
MTBSegmentationInterface
getSizeY
in interface MTBSegmentationInterface
public int getSizeZ()
MTBSegmentationInterface
getSizeZ
in interface MTBSegmentationInterface
public double getWeight(int x, int y)
MTBSegmentationInterface
getWeight
in interface MTBSegmentationInterface
public double getWeight(int x, int y, int z)
MTBSegmentationInterface
getWeight
in interface MTBSegmentationInterface
public void setWeight(int x, int y, double c)
MTBSegmentationInterface
setWeight
in interface MTBSegmentationInterface
public void setWeight(int x, int y, int z, double c)
MTBSegmentationInterface
setWeight
in interface MTBSegmentationInterface
public MTBImage getMask(int class_)
MTBSegmentationInterface
getMask
in interface MTBSegmentationInterface
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.