|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.Alida.operator.ALDData
de.unihalle.informatik.MiToBo.segmentation.levelset.nonPDE.MTBLevelsetMembership
public class MTBLevelsetMembership
A class to hold a level set function where only the memership to a phase is required and represented. Background pixels gets phase BG_PHASE, object phases start with BG_PHASE+1. The implementation asserts that all phases > BG_PHASE are indeed object phases. Value INVALID_PHASE is reserved for invalid pixels.
Field Summary | |
---|---|
static byte |
BG_PHASE
Level set function value to represent the background phase |
static byte |
INVALID_PHASE
Level set function value to represent invalid pixels |
static int |
MAX_ALLOWED_NUM_PHASES
Maximal number of phases which may be represented including background phase. |
Constructor Summary | |
---|---|
MTBLevelsetMembership(int sizeX,
int sizeY,
int sizeZ)
Constructs a two phase level set function which is initialiazed with a circle or sphere of radius 0.5*(sizeX+sizeY+sizeZ)/3. |
|
MTBLevelsetMembership(int sizeX,
int sizeY,
int sizeZ,
MTBImage invalidImg)
Constructs a two phase level set function which is initialiazed with a circle or sphere of radius 0.5*(sizeX+sizeY+sizeZ)/3. |
|
MTBLevelsetMembership(int sizeX,
int sizeY,
int sizeZ,
MTBImage img,
int threshold,
MTBImage invalidImg)
Creates a two phase level set function from an image via thresholding. |
|
MTBLevelsetMembership(int sizeX,
int sizeY,
MTBRegion2DSet regions,
MTBImage invalidImg,
boolean multiphase)
Constructor for given size which is initialized from a MTBRegion2DSet for a 2D level set function. |
|
MTBLevelsetMembership(int sizeX,
int sizeY,
Vector<MTBRegion2D> regions,
MTBImage invalidImg,
boolean multiphase)
Constructor for given size which is initialized from a list of 2D regions for a 2D level set function. |
|
MTBLevelsetMembership(MTBImage initLabelImg,
MTBImage invalidImg)
Constructor for a two phase level set function from a label image. |
|
MTBLevelsetMembership(MTBImage initLabelImg,
MTBImage invalidImg,
boolean multiphase)
Constructor for a level set function from a label image. |
|
MTBLevelsetMembership(MTBLevelsetMembership phi)
Creates a copy of phi . |
Method Summary | |
---|---|
void |
changePhase(int x,
int y,
byte phase)
Change a pixel to a new phase. |
void |
changePhase(int x,
int y,
int z,
byte phase)
Change a pixel/voxel to a new phase. |
MTBImageByte |
getMTBImage()
Creates a bi-level MTBImageByte of the level set function. |
MTBImageByte |
getMTBImageLabel()
Creates a MTBImageByte of the level set function. |
int |
getNumPhases()
Return .e. number phases. |
byte |
getPhase(int x,
int y)
Return phase for a pixel/voxel, z coordinate defaults to zero |
byte |
getPhase(int x,
int y,
int z)
Return phase for a pixel/voxel |
byte |
getPhaseCheckXY(int x,
int y)
Return phase for a pixel checking limits of all coordinates. |
byte |
getPhaseCheckXYZ(int x,
int y,
int z)
Return phase for a pixel/voxel checking limits of all coordinates. |
int |
getPixelInside()
Return number of pixels of all object phases. |
int |
getPixelOutside()
Return number of pixels of background phase. |
int |
getSizePhase(byte phase)
Return the size, i.e. number of pixel/voxels of a phase. |
int |
getSizeX()
Return X size of the level set function. |
int |
getSizeY()
Return Y size of the level set function. |
int |
getSizeZ()
Return Z size of the level set function. |
boolean |
isValid(MTBImage invalidImg,
int x,
int y,
int z)
returns true, if pixel/voxel is valid. |
String |
toString()
Return a string representation. |
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDData |
---|
cloneProperties, getLocation, getProperty, getPropertyKeys, print, setLocation, setProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final byte BG_PHASE
public static final byte INVALID_PHASE
public static final int MAX_ALLOWED_NUM_PHASES
Constructor Detail |
---|
public MTBLevelsetMembership(int sizeX, int sizeY, int sizeZ)
sizeX
- sizeY
- sizeZ
- public MTBLevelsetMembership(int sizeX, int sizeY, int sizeZ, MTBImage invalidImg)
If invalidImg is non null, than pixels <> zero in invalidImg are invalid
sizeX
- sizeY
- sizeZ
- invalidImg
- public MTBLevelsetMembership(int sizeX, int sizeY, int sizeZ, MTBImage img, int threshold, MTBImage invalidImg)
If invalidImg is non null, than pixels <> zero in invalidImg are invalid
sizeX
- sizeY
- sizeZ
- img
- Images tp be thresholdedthreshold
- All pixels with intensities greater equal are object pixelsinvalidImg
- public MTBLevelsetMembership(MTBLevelsetMembership phi)
phi
.
phi
- levelset function to copypublic MTBLevelsetMembership(int sizeX, int sizeY, Vector<MTBRegion2D> regions, MTBImage invalidImg, boolean multiphase)
If invalidImg is non null, than pixels <> zero in invalidImg are invalid
sizeX
- sizeY
- regions
- Vector of regions to initialize frominvalidImg
- pixels which are non zero are assumed invalidmultiphase
- if true create one phase for each region, otherwise two phasespublic MTBLevelsetMembership(int sizeX, int sizeY, MTBRegion2DSet regions, MTBImage invalidImg, boolean multiphase)
sizeX
- sizeY
- regions
- Region2D set to initialize frominvalidImg
- pixels which are non zero are assumed invalidmultiphase
- if true create one phase for each region, otherwise two phasespublic MTBLevelsetMembership(MTBImage initLabelImg, MTBImage invalidImg)
initLabelImg
- Label image for initializationinvalidImg
- Image indicating invalid pixels with values <> 0public MTBLevelsetMembership(MTBImage initLabelImg, MTBImage invalidImg, boolean multiphase)
If invalidImg is non null, than pixels <> zero in invalidImg are invalid
initLabelImg
- Label image for initializationinvalidImg
- Image indicating invalid pixels with values <> 0Method Detail |
---|
public void changePhase(int x, int y, int z, byte phase)
x
- y
- z
- phase
- public void changePhase(int x, int y, byte phase)
x
- y
- phase
- public byte getPhase(int x, int y, int z)
x
- y
- z
- public byte getPhaseCheckXYZ(int x, int y, int z)
x
- y
- z
-
public byte getPhase(int x, int y)
x
- y
- public byte getPhaseCheckXY(int x, int y)
x
- y
-
public MTBImageByte getMTBImage()
public MTBImageByte getMTBImageLabel()
public int getPixelInside()
public int getPixelOutside()
public int getSizeX()
public int getSizeY()
public int getSizeZ()
public int getSizePhase(byte phase)
public int getNumPhases()
public String toString()
toString
in class Object
public boolean isValid(MTBImage invalidImg, int x, int y, int z)
invalidImg
- x
- y
- z
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |