org.openimaj.image.processing.watershed
Class MergeTreeBuilder

java.lang.Object
  extended by org.openimaj.image.processing.watershed.MergeTreeBuilder
All Implemented Interfaces:
EventListener, ComponentStackMergeListener

public class MergeTreeBuilder
extends Object
implements ComponentStackMergeListener

A listener that listens to the watershed algorithm progress and creates a region tree as the processing takes place.

Version:
$Author$, $Revision$, $Date$
Author:
David Dupplaw , Jonathon Hare

Constructor Summary
MergeTreeBuilder()
          Default constructor
 
Method Summary
 void componentPromoted(Component c1)
          Called when the given component c1 is upwardly promoted to a higher intensity value.
 void componentsMerged(Component c1, Component c2)
          Called when component c2 is merged into component c1.
 TreeNode<Component> getTree()
          Return the tree that has been built.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MergeTreeBuilder

public MergeTreeBuilder()
Default constructor

Method Detail

componentsMerged

public void componentsMerged(Component c1,
                             Component c2)
Called when component c2 is merged into component c1. This will be called before the merge occurs, so component c1 will not contain the pixels of c2.

Specified by:
componentsMerged in interface ComponentStackMergeListener
Parameters:
c1 - The component that is receiving the merge
c2 - The component that is providing the merge.
See Also:
ComponentStackMergeListener.componentsMerged(org.openimaj.image.processing.watershed.Component, org.openimaj.image.processing.watershed.Component)

componentPromoted

public void componentPromoted(Component c1)
Called when the given component c1 is upwardly promoted to a higher intensity value. The component will contain all the pixels at the higher level.

Specified by:
componentPromoted in interface ComponentStackMergeListener
Parameters:
c1 - The component being promoted.
See Also:
ComponentStackMergeListener.componentPromoted(org.openimaj.image.processing.watershed.Component)

getTree

public TreeNode<Component> getTree()
Return the tree that has been built.

Returns:
the tree


Copyright © 2011 The University of Southampton. All Rights Reserved.