de.unihalle.informatik.MiToBo.topology
Class MTBTopologicalNumber2D

java.lang.Object
  extended by de.unihalle.informatik.MiToBo.topology.MTBTopologicalNumber
      extended by de.unihalle.informatik.MiToBo.topology.MTBTopologicalNumber2D
Direct Known Subclasses:
MTBTopologicalNumber2DN4, MTBTopologicalNumber2DN8

public abstract class MTBTopologicalNumber2D
extends MTBTopologicalNumber

An abstract class to compute topological numbers for the 2D case. The pixels in the neighborhood are sorted as follows: First the four 4-neighbors, then the four 8- but not 4-neighbors.


Nested Class Summary
 
Nested classes/interfaces inherited from class de.unihalle.informatik.MiToBo.topology.MTBTopologicalNumber
MTBTopologicalNumber.PixelOffsetIterator, MTBTopologicalNumber.Point3D
 
Field Summary
 
Fields inherited from class de.unihalle.informatik.MiToBo.topology.MTBTopologicalNumber
coordinatesNeighborNeighbors, coordinatesNeighborNeighborsByCoord, coordinatesNeighbors, debug, offsetsNeighborNeighbors, offsetsNeighbors, X
 
Constructor Summary
MTBTopologicalNumber2D()
           
 
Method Summary
protected  void initNeighbors(float dist)
          This initializes all relevant arrays containing information on neighbors where dist defines the neighborhood, e.g.
 boolean topoNumberIsOne(int[][][] nbPhases3D, int p)
          Check if topological for the class c is one in the neighborhood nbClassess3D.
 
Methods inherited from class de.unihalle.informatik.MiToBo.topology.MTBTopologicalNumber
computeN, hasOneCC, iterator, iteratorOffsets, print, topoNumberIsOne
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MTBTopologicalNumber2D

public MTBTopologicalNumber2D()
Method Detail

initNeighbors

protected void initNeighbors(float dist)
This initializes all relevant arrays containing information on neighbors where dist defines the neighborhood, e.g. dist == 1 defines 4-neighbors. Theses arrays are indicesNeighbors, offsetsNeighbors, and indicesNeighborsByCoord.

Parameters:
dist - All pixels within the 3x3 window around the current pixel with euclidean distance not l then dist are considered neighbors of the current pixel.

topoNumberIsOne

public boolean topoNumberIsOne(int[][][] nbPhases3D,
                               int p)
Description copied from class: MTBTopologicalNumber
Check if topological for the class c is one in the neighborhood nbClassess3D. Specifically, all pixels in nbClasses3D with equal values to c are considered as elements of X, the rest as not in X.

nbClassess3D is a 3D volume of size 3x3x3 where the current pixel is located in the center, i.e. with coordinates (1,1,1). Memory layout is nbClasses3D[z][y][x]. The values give the classes or phases to which the pixels belong to.

Neighborhood definitions are define in derived sub classes. If this is a 2D neighborhood, only the z=0 slice of nbClasses3D will be considered and accessed.

Specified by:
topoNumberIsOne in class MTBTopologicalNumber


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