whistlesAndMoans
Class DiscardingFragmenter

java.lang.Object
  extended by whistlesAndMoans.DiscardingFragmenter
All Implemented Interfaces:
RegionFragmenter
Direct Known Subclasses:
FragmentingFragmenter

public class DiscardingFragmenter
extends java.lang.Object
implements RegionFragmenter

Whistle fragmenter which completely discards all regions which have more than one peak in any slice.

Author:
Doug Gillespie

Field Summary
protected  int maxPeaks
           
protected  ConnectedRegion motherRegion
           
protected  int nFragments
           
protected  int nSlices
           
protected  int[] slicePeaks
           
protected  int totalPeaks
           
 
Constructor Summary
DiscardingFragmenter()
           
 
Method Summary
private  int countSlicePeaks()
          Get the maximum number of peaks in any slice of a region.
 int fragmentRegion(ConnectedRegion connectedRegion)
          Fragment a connected region
 ConnectedRegion getFragment(int fragment)
          Get a specific fragment
 int getNumFragments()
          Get the number of fragments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

motherRegion

protected ConnectedRegion motherRegion

slicePeaks

protected int[] slicePeaks

maxPeaks

protected int maxPeaks

nSlices

protected int nSlices

totalPeaks

protected int totalPeaks

nFragments

protected int nFragments
Constructor Detail

DiscardingFragmenter

public DiscardingFragmenter()
Method Detail

fragmentRegion

public int fragmentRegion(ConnectedRegion connectedRegion)
Description copied from interface: RegionFragmenter
Fragment a connected region

Specified by:
fragmentRegion in interface RegionFragmenter
Parameters:
connectedRegion - region to fragment
Returns:
number of fragments.

countSlicePeaks

private int countSlicePeaks()
Get the maximum number of peaks in any slice of a region.

Returns:
number of peaks.

getFragment

public ConnectedRegion getFragment(int fragment)
Description copied from interface: RegionFragmenter
Get a specific fragment

Specified by:
getFragment in interface RegionFragmenter
Parameters:
fragment - fragment number (0 to getNumFragments);
Returns:
the ith fragment

getNumFragments

public int getNumFragments()
Description copied from interface: RegionFragmenter
Get the number of fragments

Specified by:
getNumFragments in interface RegionFragmenter
Returns:
the number of fragments