de.unihalle.informatik.MiToBo.segmentation.basics
Class MTBSegmentation3D

java.lang.Object
  extended by de.unihalle.informatik.MiToBo.segmentation.basics.MTBSegmentation3D
All Implemented Interfaces:
MTBSegmentationInterface

public class MTBSegmentation3D
extends Object
implements MTBSegmentationInterface

Class for representing 3D segmentations of image data.

Author:
Birgit Moeller

Nested Class Summary
 
Nested classes/interfaces inherited from interface de.unihalle.informatik.MiToBo.segmentation.basics.MTBSegmentationInterface
MTBSegmentationInterface.SegmentationDimension
 
Field Summary
protected  int[][][] classmap
          2D map with class labels.
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.
 
Constructor Summary
MTBSegmentation3D(int w, int h, int d, int numClasses, int[][][] cmap, boolean[][][] vmap, double[][][] wmap)
          Constructor.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numRegions

protected int numRegions
Number of represented regions.


maxLabel

protected int maxLabel
Maximal label appearing in the label list.


classmap

protected int[][][] classmap
2D map with class labels.


visiblemap

protected boolean[][][] visiblemap
Visibility map for hiding individual pixels.


weightmap

protected double[][][] weightmap
Map of weights for the segmentation.

Constructor Detail

MTBSegmentation3D

public MTBSegmentation3D(int w,
                         int h,
                         int d,
                         int numClasses,
                         int[][][] cmap,
                         boolean[][][] vmap,
                         double[][][] wmap)
Constructor.

Parameters:
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.
Method Detail

getDimension

public MTBSegmentationInterface.SegmentationDimension getDimension()
Returns the dimension of the given membership.

Specified by:
getDimension in interface MTBSegmentationInterface

getNumberOfClasses

public int getNumberOfClasses()
Returns the number of classes represented in the membership.

Specified by:
getNumberOfClasses in interface MTBSegmentationInterface

getMaxLabel

public int getMaxLabel()
Returns the maximal label used in the membership representation.

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.

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

isVisible

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

Specified by:
isVisible 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

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

Specified by:
setClass in interface MTBSegmentationInterface

setClass

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

Specified by:
setClass 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

setVisible

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

Specified by:
setVisible 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

setInvisible

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

Specified by:
setInvisible in interface MTBSegmentationInterface

setVisibilityMask

public void setVisibilityMask(boolean[][][] mask)
Set the valid mask from external.


getSizeX

public int getSizeX()
Description copied from interface: MTBSegmentationInterface
Returns the size of the segmentation domain in x direction.

Specified by:
getSizeX in interface MTBSegmentationInterface

getSizeY

public int getSizeY()
Description copied from interface: MTBSegmentationInterface
Returns the size of the segmentation domain in y direction.

Specified by:
getSizeY in interface MTBSegmentationInterface

getSizeZ

public int getSizeZ()
Description copied from interface: MTBSegmentationInterface
Returns the size of the segmentation domain in z direction.

Specified by:
getSizeZ 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.