de.unihalle.informatik.MiToBo.segmentation.levelset.PDE.datatypes
Class MTBLevelsetFunctionPDE

java.lang.Object
  extended by de.unihalle.informatik.MiToBo.segmentation.levelset.core.MTBLevelsetFunctionDerivable
      extended by de.unihalle.informatik.MiToBo.segmentation.levelset.PDE.datatypes.MTBLevelsetFunctionPDE
All Implemented Interfaces:
MTBSegmentationInterface, Cloneable

public class MTBLevelsetFunctionPDE
extends MTBLevelsetFunctionDerivable
implements Cloneable

Class representing a 3-dimensional level set function.

The representation includes two classes with labels 0 and 1. Label 0 refers to the background including all pixels in the level set function's domain where the value of the function is smaller than zero. Class 1, i.e. the foreground phase of the level set function, is linked to all pixels in the domain with function values larger than zero.

The levelset function can be transformed into a signed-distance function.

Author:
Martin Scharm, Michael Schneider, Birgit Moeller

Nested Class Summary
protected  class MTBLevelsetFunctionPDE.SortedList<EType>
          A genric class representing a sorted list
protected  class MTBLevelsetFunctionPDE.SortedListElement<EType>
          internal representation of elements
 
Nested classes/interfaces inherited from interface de.unihalle.informatik.MiToBo.segmentation.basics.MTBSegmentationInterface
MTBSegmentationInterface.SegmentationDimension
 
Field Summary
protected  int borderDist
          Safety distance along image borders.
protected  int depth
          Depth of the input image and levelset function.
protected  int height
          Height of the input image and levelset function.
static double MAX_VALUE
          Constant used in SDF calculations.
protected  ArrayList<MTBPoint3D> narrow
          Pixels in narrow-band.
protected  double[][][] phi
          The level set function.
protected  HashMap<MTBPoint3D,MTBPoint3D> predecessors
          Map of precursors on contour for each pixel in narrow-band.
protected  boolean[][][] visible
          Visibility array.
protected  int width
          Width of the input image and levelset function.
 
Constructor Summary
MTBLevelsetFunctionPDE(boolean nb_diag, int w, int h, int d)
          create a new levelsetfunction, setting a default handle for derivations on borders
MTBLevelsetFunctionPDE(boolean nb_diag, int w, int h, int d, boolean default_fallback)
          create a new levelsetfunction, setting a default handle for derivations on borders
MTBLevelsetFunctionPDE(int w, int h, int d)
          Create a new levelset function.
MTBLevelsetFunctionPDE(int w, int h, int d, boolean default_fallback)
          create a new levelsetfunction, setting a default handle for derivations on borders
MTBLevelsetFunctionPDE(int w, int h, int d, int border)
          Constructor to init empty function with safety border.
MTBLevelsetFunctionPDE(int w, int h, int d, MTBSegmentationInterface seg, boolean default_fallback)
          Constructor to build a level set function from a segmentation object.
MTBLevelsetFunctionPDE(int w, int h, int d, MTBSegmentationInterface seg, boolean default_fallback, int border)
          Constructor to build a level set function from a segmentation object.
 
Method Summary
 double backwardDifferencing_X(int x, int y, int z)
          retrieve x-derivation at nearest contourpoint to ( x, y, z ), calculated by backward euler method
 double backwardDifferencing_X(int x, int y, int z, boolean fallback)
          retrieve x-derivation at nearest contourpoint to ( x, y, z ), calculated by backward euler method, explicit define fallback-strategy
 double backwardDifferencing_Y(int x, int y, int z)
          retrieve x-derivation at nearest contourpoint to ( x, y, z ), calculated by backward euler method
 double backwardDifferencing_Y(int x, int y, int z, boolean fallback)
          retrieve y-derivation at nearest contourpoint to ( x, y, z ), calculated by backward euler method, explicit define fallback-strategy
 double backwardDifferencing_Z(int x, int y, int z)
          retrieve x-derivation at nearest contourpoint to ( x, y, z ), calculated by backward euler method
 double backwardDifferencing_Z(int x, int y, int z, boolean fallback)
          retrieve z-derivation at nearest contourpoint to ( x, y, z ), calculated by backward euler method, explicit define fallback-strategy
 MTBLevelsetFunctionPDE clone()
          generate a clone of this object
 void copyTo(MTBLevelsetFunctionPDE two)
          copy this object to another one
 boolean equals(MTBLevelsetFunctionPDE ls2d)
          are these two LevelSets equal?
 double forwardDifferencing_X(int x, int y, int z, boolean fallback)
          retrieve x-derivation at nearest contourpoint to ( x, y, z ), calculated by forward euler method, explicit define fallback-strategy
 double forwardDifferencing_Y(int x, int y, int z, boolean fallback)
          retrieve y-derivation at nearest contourpoint to ( x, y, z ), calculated by forward euler method, explicit define fallback-strategy
 double forwardDifferencing_Z(int x, int y, int z, boolean fallback)
          retrieve z-derivation at nearest contourpoint to ( x, y, z ), calculated by forward euler method, explicit define fallback-strategy
 double get(int x, int y, int z)
          get the value of this function at the position of the predecessor of ( x, y, z )
 MTBImageByte getBinaryMask()
          Get a binary mask of the represented segmentation.
 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).
 double getCurvature(int x, int y, int z)
          compute the curvature at at nearest contourpoint to (x,y,z) if x or y are not in the boundaries it returns 0 if z is not in the boundaries it returns the 2d cuvature
 double getDerivativeX(int x, int y, int z)
          retrieve x-derivation at nearest contourpoint to ( x, y, z ), calculated by forward euler method
 double getDerivativeXX(int x, int y, int z)
          computes the the derivation in x direction 2 times at nearest contourpoint to (x,y,z)
 double getDerivativeXY(int x, int y, int z)
          computes the the derivation in x and y direction at nearest contourpoint to (x,y,z)
 double getDerivativeXZ(int x, int y, int z)
          computes the the derivation in x and z direction at nearest contourpoint to (x,y,z)
 double getDerivativeY(int x, int y, int z)
          retrieve y-derivation at nearest contourpoint to ( x, y, z ), calculated by forward euler method
 double getDerivativeYY(int x, int y, int z)
          computes the the derivation in y direction 2 times at nearest contourpoint to (x,y,z)
 double getDerivativeYZ(int x, int y, int z)
          computes the the derivation in y and z direction at nearest contourpoint to (x,y,z)
 double getDerivativeZ(int x, int y, int z)
          retrieve z-derivation at nearest contourpoint to ( x, y, z ), calculated by forward euler method
 double getDerivativeZZ(int x, int y, int z)
          computes the the derivation in z direction 2 times at nearest contourpoint to (x,y,z)
 MTBSegmentationInterface.SegmentationDimension getDimension()
          Returns the dimension of the segmentation.
 double getForegroundSum()
           
 MTBImage getMask(int class_)
          Gets the mask of the specified class (0 Background, 255 Foreground)
 int getMaxLabel()
          Returns the maximal label used in the segmentation representation.
 Iterator<MTBPoint3D> getNarrowIterator()
          get an iterator through narrow band
 int getNumberOfClasses()
          Returns the number of classes represented by the segmentation.
 MTBImageRGB getPhiColorImage2D(MTBImageRGB targetImg)
          Get visualization of current level set function in red-blue color map.
 MTBImageShort getPhiImage()
          Get visualization of current level set function.
 MTBPoint3D getPredecessorOnContour(int x, int y, int z)
          gets the value of the nearest contourpoint to point (x,y,z)
 int getSizeX()
          Get width of level set function.
 int getSizeY()
          Get height of level set function.
 int getSizeZ()
          Get depth of level set function.
 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)
          is this pixel visible?
 void set(int x, int y, int z, double value)
          assign a value to the matrix at position ( x, y, z )
 void setClass(int x, int y, int c)
          Deprecated. 
 void setClass(int x, int y, int z, int c)
          Deprecated. 
 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.
 boolean setVisible(boolean[][][] mask)
          Set visibility of positions.
 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.
 void signDistance(double b)
          Transform function into signed distance function.
 boolean valid(int x, int y, int z)
          is this pixel valid?
 
Methods inherited from class de.unihalle.informatik.MiToBo.segmentation.levelset.core.MTBLevelsetFunctionDerivable
nearZero, sgn
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_VALUE

public static final double MAX_VALUE
Constant used in SDF calculations.

See Also:
Constant Field Values

phi

protected double[][][] phi
The level set function.


visible

protected boolean[][][] visible
Visibility array.


height

protected int height
Height of the input image and levelset function.


width

protected int width
Width of the input image and levelset function.


depth

protected int depth
Depth of the input image and levelset function.


borderDist

protected int borderDist
Safety distance along image borders.

Pixels closer to border than this distance are ignored in calculations.


narrow

protected ArrayList<MTBPoint3D> narrow
Pixels in narrow-band.

The array is updated on transforming the function into a SDF.


predecessors

protected HashMap<MTBPoint3D,MTBPoint3D> predecessors
Map of precursors on contour for each pixel in narrow-band.

The map is updated on transforming the function into a SDF.

Constructor Detail

MTBLevelsetFunctionPDE

public MTBLevelsetFunctionPDE(int w,
                              int h,
                              int d)
Create a new levelset function.

The default handle for calculations of derivatives along borders is set to fall back to other methods to calculate the derivatives.

Parameters:
w - Width of function.
h - Height of function.
d - Depth of function.

MTBLevelsetFunctionPDE

public MTBLevelsetFunctionPDE(int w,
                              int h,
                              int d,
                              int border)
Constructor to init empty function with safety border.

Parameters:
w - Width of levelset function (x-size).
h - Height of levelset function (y-size).
d - Depth of levelset function (z-size).
border - Width of border to ignore in calculations.

MTBLevelsetFunctionPDE

public MTBLevelsetFunctionPDE(int w,
                              int h,
                              int d,
                              boolean default_fallback)
create a new levelsetfunction, setting a default handle for derivations on borders

Parameters:
w - length of function
h - height of function
d - depth of function
default_fallback - default strategy for border, true -> fall back, false -> cancel with NaN

MTBLevelsetFunctionPDE

public MTBLevelsetFunctionPDE(boolean nb_diag,
                              int w,
                              int h,
                              int d)
create a new levelsetfunction, setting a default handle for derivations on borders

Parameters:
width - length of function
height - height of function
depth - depth of function false -> cancel with NaN

MTBLevelsetFunctionPDE

public MTBLevelsetFunctionPDE(boolean nb_diag,
                              int w,
                              int h,
                              int d,
                              boolean default_fallback)
create a new levelsetfunction, setting a default handle for derivations on borders

Parameters:
width - length of function
height - height of function
depth - depth of function
default_fallback - default strategy for border, true -> fall back, false -> cancel with NaN

MTBLevelsetFunctionPDE

public MTBLevelsetFunctionPDE(int w,
                              int h,
                              int d,
                              MTBSegmentationInterface seg,
                              boolean default_fallback)
Constructor to build a level set function from a segmentation object.

The level set function is initialized with value -1 for the background and +1 for the foreground. Note that the size of the given segmentation is allowed to differ from the target size of the function. Positions being undefined in the segmentation are assigned to the background class.

Parameters:
w - Target width of the level set function domain.
h - Target height of the level set function domain.
d - Target depth of the level set function domain.
seg - Initial segmentation.
default_fallback -

MTBLevelsetFunctionPDE

public MTBLevelsetFunctionPDE(int w,
                              int h,
                              int d,
                              MTBSegmentationInterface seg,
                              boolean default_fallback,
                              int border)
Constructor to build a level set function from a segmentation object.

The level set function is initialized with value -1 for the background and +1 for the foreground. Note that the size of the given segmentation is allowed to differ from the target size of the function. Positions being undefined in the segmentation are assigned to the background class.

Parameters:
w - Target width of the level set function domain.
h - Target height of the level set function domain.
d - Target depth of the level set function domain.
seg - Initial segmentation.
default_fallback -
border - Width of border to be ignored.
Method Detail

setVisible

public boolean setVisible(boolean[][][] mask)
Set visibility of positions.

Parameters:
mask - Visibility mask.
Returns:
True, if successful, otherwise false.

get

public double get(int x,
                  int y,
                  int z)
get the value of this function at the position of the predecessor of ( x, y, z )

Specified by:
get in class MTBLevelsetFunctionDerivable
Parameters:
x - position x in matrix
y - position y in matrix
z - position z in matrix
Returns:
value at position ( x, y, z )

getPredecessorOnContour

public MTBPoint3D getPredecessorOnContour(int x,
                                          int y,
                                          int z)
gets the value of the nearest contourpoint to point (x,y,z)

Parameters:
x -
y -
z -
Returns:

set

public void set(int x,
                int y,
                int z,
                double value)
assign a value to the matrix at position ( x, y, z )

Parameters:
x - position x in matrix
y - position y in matrix
z - position z in matrix
value - value to save an this position

getSizeX

public int getSizeX()
Get width of level set function.

Specified by:
getSizeX in interface MTBSegmentationInterface
Returns:
Width of level set function.

getSizeY

public int getSizeY()
Get height of level set function.

Specified by:
getSizeY in interface MTBSegmentationInterface
Returns:
Height of level set function.

getSizeZ

public int getSizeZ()
Get depth of level set function.

Specified by:
getSizeZ in interface MTBSegmentationInterface
Returns:
Depth of level set function.

getDerivativeX

public double getDerivativeX(int x,
                             int y,
                             int z)
retrieve x-derivation at nearest contourpoint to ( x, y, z ), calculated by forward euler method

Specified by:
getDerivativeX in class MTBLevelsetFunctionDerivable
Parameters:
x - position x in matrix
y - position y in matrix
z - position z in matrix
Returns:
derivation at nearest contourpoint to ( x, y, z )

getDerivativeY

public double getDerivativeY(int x,
                             int y,
                             int z)
retrieve y-derivation at nearest contourpoint to ( x, y, z ), calculated by forward euler method

Specified by:
getDerivativeY in class MTBLevelsetFunctionDerivable
Parameters:
x - position x in matrix
y - position y in matrix
z - position z in matrix
Returns:
derivation at nearest contourpoint to ( x, y, z )

getDerivativeZ

public double getDerivativeZ(int x,
                             int y,
                             int z)
retrieve z-derivation at nearest contourpoint to ( x, y, z ), calculated by forward euler method

Specified by:
getDerivativeZ in class MTBLevelsetFunctionDerivable
Parameters:
x - position x in matrix
y - position y in matrix
z - position z in matrix
Returns:
derivation at nearest contourpoint to ( x, y, z )

forwardDifferencing_X

public double forwardDifferencing_X(int x,
                                    int y,
                                    int z,
                                    boolean fallback)
retrieve x-derivation at nearest contourpoint to ( x, y, z ), calculated by forward euler method, explicit define fallback-strategy

Parameters:
x - position x in matrix
y - position y in matrix
z - position z in matrix
fallback - fall back to other methods at border?
Returns:
derivation at nearest contourpoint to ( x, y, z )

forwardDifferencing_Y

public double forwardDifferencing_Y(int x,
                                    int y,
                                    int z,
                                    boolean fallback)
retrieve y-derivation at nearest contourpoint to ( x, y, z ), calculated by forward euler method, explicit define fallback-strategy

Parameters:
x - position x in matrix
y - position y in matrix
z - position z in matrix
fallback - fall back to other methods at border?
Returns:
derivation at nearest contourpoint to ( x, y, z )

forwardDifferencing_Z

public double forwardDifferencing_Z(int x,
                                    int y,
                                    int z,
                                    boolean fallback)
retrieve z-derivation at nearest contourpoint to ( x, y, z ), calculated by forward euler method, explicit define fallback-strategy

Parameters:
x - position x in matrix
y - position y in matrix
z - position z in matrix
fallback - fall back to other methods at border?
Returns:
derivation at nearest contourpoint to ( x, y, z )

backwardDifferencing_X

public double backwardDifferencing_X(int x,
                                     int y,
                                     int z)
retrieve x-derivation at nearest contourpoint to ( x, y, z ), calculated by backward euler method

Parameters:
x - position x in matrix
y - position y in matrix
z - position z in matrix
Returns:
derivation at nearest contourpoint to ( x, y, z )

backwardDifferencing_Y

public double backwardDifferencing_Y(int x,
                                     int y,
                                     int z)
retrieve x-derivation at nearest contourpoint to ( x, y, z ), calculated by backward euler method

Parameters:
x - position x in matrix
y - position y in matrix
z - position z in matrix
Returns:
derivation at nearest contourpoint to ( x, y, z )

backwardDifferencing_Z

public double backwardDifferencing_Z(int x,
                                     int y,
                                     int z)
retrieve x-derivation at nearest contourpoint to ( x, y, z ), calculated by backward euler method

Parameters:
x - position x in matrix
y - position y in matrix
z - position z in matrix
Returns:
derivation at nearest contourpoint to ( x, y, z )

backwardDifferencing_X

public double backwardDifferencing_X(int x,
                                     int y,
                                     int z,
                                     boolean fallback)
retrieve x-derivation at nearest contourpoint to ( x, y, z ), calculated by backward euler method, explicit define fallback-strategy

Parameters:
x - position x in matrix
y - position y in matrix
z - position z in matrix
fallback - fall back to other methods at border?
Returns:
derivation at nearest contourpoint to ( x, y, z )

backwardDifferencing_Y

public double backwardDifferencing_Y(int x,
                                     int y,
                                     int z,
                                     boolean fallback)
retrieve y-derivation at nearest contourpoint to ( x, y, z ), calculated by backward euler method, explicit define fallback-strategy

Parameters:
x - position x in matrix
y - position y in matrix
z - position z in matrix
fallback - fall back to other methods at border?
Returns:
derivation at nearest contourpoint to ( x, y, z )

backwardDifferencing_Z

public double backwardDifferencing_Z(int x,
                                     int y,
                                     int z,
                                     boolean fallback)
retrieve z-derivation at nearest contourpoint to ( x, y, z ), calculated by backward euler method, explicit define fallback-strategy

Parameters:
x - position x in matrix
y - position y in matrix
z - position z in matrix
fallback - fall back to other methods at border?
Returns:
derivation at nearest contourpoint to ( x, y, z )

getDerivativeXX

public double getDerivativeXX(int x,
                              int y,
                              int z)
computes the the derivation in x direction 2 times at nearest contourpoint to (x,y,z)

Specified by:
getDerivativeXX in class MTBLevelsetFunctionDerivable
Parameters:
x -
y -
z -
Returns:

getDerivativeYY

public double getDerivativeYY(int x,
                              int y,
                              int z)
computes the the derivation in y direction 2 times at nearest contourpoint to (x,y,z)

Specified by:
getDerivativeYY in class MTBLevelsetFunctionDerivable
Parameters:
x -
y -
z -
Returns:

getDerivativeZZ

public double getDerivativeZZ(int x,
                              int y,
                              int z)
computes the the derivation in z direction 2 times at nearest contourpoint to (x,y,z)

Specified by:
getDerivativeZZ in class MTBLevelsetFunctionDerivable
Parameters:
x -
y -
z -
Returns:

getDerivativeXY

public double getDerivativeXY(int x,
                              int y,
                              int z)
computes the the derivation in x and y direction at nearest contourpoint to (x,y,z)

Specified by:
getDerivativeXY in class MTBLevelsetFunctionDerivable
Parameters:
x -
y -
z -
Returns:

getDerivativeXZ

public double getDerivativeXZ(int x,
                              int y,
                              int z)
computes the the derivation in x and z direction at nearest contourpoint to (x,y,z)

Specified by:
getDerivativeXZ in class MTBLevelsetFunctionDerivable
Parameters:
x -
y -
z -
Returns:

getDerivativeYZ

public double getDerivativeYZ(int x,
                              int y,
                              int z)
computes the the derivation in y and z direction at nearest contourpoint to (x,y,z)

Specified by:
getDerivativeYZ in class MTBLevelsetFunctionDerivable
Parameters:
x -
y -
z -
Returns:

getCurvature

public double getCurvature(int x,
                           int y,
                           int z)
compute the curvature at at nearest contourpoint to (x,y,z) if x or y are not in the boundaries it returns 0 if z is not in the boundaries it returns the 2d cuvature

Specified by:
getCurvature in class MTBLevelsetFunctionDerivable
Parameters:
x - x coordinate
y - y coordinate
z - z coordinate
Returns:
curvature at (x, y, z)

valid

public boolean valid(int x,
                     int y,
                     int z)
is this pixel valid?

Specified by:
valid in class MTBLevelsetFunctionDerivable
Parameters:
x - x coordinate
y - y coordinate
z - z coordinate
Returns:
true if visible and not MAX_VALUE, else false

isVisible

public boolean isVisible(int x,
                         int y,
                         int z)
is this pixel visible?

Specified by:
isVisible in interface MTBSegmentationInterface
Parameters:
x - x coordinate
y - y coordinate
z - z coordinate
Returns:
true if visible, else false

signDistance

public void signDistance(double b)
Transform function into signed distance function.

The transformation can be restricted to a narrow-band around the zero level by setting the width parameter to a value larger or equal to one.

Parameters:
b - Width of narrow-band around zero level.

clone

public MTBLevelsetFunctionPDE clone()
generate a clone of this object

Overrides:
clone in class Object
Returns:
the copy

copyTo

public void copyTo(MTBLevelsetFunctionPDE two)
copy this object to another one


equals

public boolean equals(MTBLevelsetFunctionPDE ls2d)
are these two LevelSets equal?

Parameters:
ls2d - LevelSet to check
Returns:
true if this functions equals the other, false otherwise

getNarrowIterator

public Iterator<MTBPoint3D> getNarrowIterator()
get an iterator through narrow band

Returns:
iterator through narrow band

getBinaryMask

public MTBImageByte getBinaryMask()
Get a binary mask of the represented segmentation.

Returns:
Binary segmentation mask.

getPhiColorImage2D

public MTBImageRGB getPhiColorImage2D(MTBImageRGB targetImg)
Get visualization of current level set function in red-blue color map.

This function only considers the first dimension in z.

Returns:
Image showing level set function.

getPhiImage

public MTBImageShort getPhiImage()
Get visualization of current level set function.

Returns:
Image showing level set function.

getForegroundSum

public double getForegroundSum()

getDimension

public MTBSegmentationInterface.SegmentationDimension getDimension()
Description copied from interface: MTBSegmentationInterface
Returns the dimension of the segmentation.

Specified by:
getDimension in interface MTBSegmentationInterface

getNumberOfClasses

public int getNumberOfClasses()
Description copied from interface: MTBSegmentationInterface
Returns the number of classes represented by the segmentation.

Specified by:
getNumberOfClasses in interface MTBSegmentationInterface

getMaxLabel

public int getMaxLabel()
Description copied from interface: MTBSegmentationInterface
Returns the maximal label used in the segmentation representation.

Note that the maximal label is not required to coincide with the number of classes represented by the segmentation. Labels should usually, but do not necessarily need to be positive.

Specified by:
getMaxLabel in interface MTBSegmentationInterface

isVisible

public boolean isVisible(int x,
                         int y)
Description copied from interface: MTBSegmentationInterface
True, if position (x,y) is visible.

Specified by:
isVisible in interface MTBSegmentationInterface

setVisible

public void setVisible(int x,
                       int y)
Description copied from interface: MTBSegmentationInterface
Set position (x,y) visible.

Specified by:
setVisible in interface MTBSegmentationInterface

setVisible

public void setVisible(int x,
                       int y,
                       int z)
Description copied from interface: MTBSegmentationInterface
Set position (x,y,z) visible.

Specified by:
setVisible in interface MTBSegmentationInterface

setInvisible

public void setInvisible(int x,
                         int y)
Description copied from interface: MTBSegmentationInterface
Set position (x,y) invisible.

Specified by:
setInvisible in interface MTBSegmentationInterface

setInvisible

public void setInvisible(int x,
                         int y,
                         int z)
Description copied from interface: MTBSegmentationInterface
Set position (x,y,z) invisible.

Specified by:
setInvisible in interface MTBSegmentationInterface

getClass

public int getClass(int x,
                    int y)
Description copied from interface: MTBSegmentationInterface
Returns the class label of position (x,y).

Specified by:
getClass in interface MTBSegmentationInterface

getClass

public int getClass(int x,
                    int y,
                    int z)
Description copied from interface: MTBSegmentationInterface
Returns the class label of position (x,y,z).

Specified by:
getClass in interface MTBSegmentationInterface

setClass

@Deprecated
public void setClass(int x,
                                int y,
                                int c)
Deprecated. 

Description copied from interface: MTBSegmentationInterface
Set the label of position (x,y) to c.

Specified by:
setClass in interface MTBSegmentationInterface

setClass

@Deprecated
public void setClass(int x,
                                int y,
                                int z,
                                int c)
Deprecated. 

Description copied from interface: MTBSegmentationInterface
Set the label of position (x,y,z) to c.

Specified by:
setClass in interface MTBSegmentationInterface

getWeight

public double getWeight(int x,
                        int y)
Description copied from interface: MTBSegmentationInterface
Returns the pixel weight of position (x,y).

Specified by:
getWeight in interface MTBSegmentationInterface

getWeight

public double getWeight(int x,
                        int y,
                        int z)
Description copied from interface: MTBSegmentationInterface
Returns the pixel weight of position (x,y,z).

Specified by:
getWeight in interface MTBSegmentationInterface

setWeight

public void setWeight(int x,
                      int y,
                      double c)
Description copied from interface: MTBSegmentationInterface
Sets the pixel weight of position (x,y) to c.

Specified by:
setWeight in interface MTBSegmentationInterface

setWeight

public void setWeight(int x,
                      int y,
                      int z,
                      double c)
Description copied from interface: MTBSegmentationInterface
Sets the pixel weight of position (x,y,z) to c.

Specified by:
setWeight in interface MTBSegmentationInterface

getMask

public MTBImage getMask(int class_)
Description copied from interface: MTBSegmentationInterface
Gets the mask of the specified class (0 Background, 255 Foreground)

Specified by:
getMask in interface MTBSegmentationInterface


Copyright © 2010–2015 Martin Luther University Halle-Wittenberg. All rights reserved.