whitesWhistleDetector
Class WhitesConnectProcess.ShapeConnector

java.lang.Object
  extended by whitesWhistleDetector.WhitesConnectProcess.ShapeConnector
Enclosing class:
WhitesConnectProcess

 class WhitesConnectProcess.ShapeConnector
extends java.lang.Object


Field Summary
private  int channel
           
(package private)  java.util.LinkedList<ConnectedRegion> growingRegions
           
private  boolean[] newCol
           
(package private)  java.util.LinkedList<ConnectedRegion> recycleRegions
           
private  ConnectedRegion[][] regionArray
           
(package private)  int regionNumber
           
private  int[] search4x
           
private  int[] search4y
           
private  int[] search8x
           
private  int[] search8y
           
private  int[] searchx
           
private  int[] searchy
           
private  boolean[] spacedArray
           
 
Constructor Summary
WhitesConnectProcess.ShapeConnector(int channel)
           
 
Method Summary
private  boolean completeRegion(ConnectedRegion region)
           
private  ConnectedRegion createNewRegion(int iSlice, int iCell, int dataLen, FFTDataUnit fftDataUnit)
          Will eventually set a recycling scheme, but not now.
private  void findCompleteRegions()
           
private  void initialise()
           
private  void labelGrowing(boolean growing)
           
private  ConnectedRegion mergeRegions(ConnectedRegion r1, ConnectedRegion r2)
          Merge two regions together.
private  void newData(int iSlice, boolean[] newData, FFTDataUnit fftDataUnit)
          Gets passed a row of boolean values representing thresholded fft data.
 void newData(int iSlice, FFTDataUnit fftDataUnit)
          Gets passed a row of Complex data.
private  void recycleRegion(ConnectedRegion r)
          Remove a region from the growing list and recyce it.
private  void removeRegion(ConnectedRegion r)
           
 void setConnectionType(int searchType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

regionArray

private ConnectedRegion[][] regionArray

spacedArray

private boolean[] spacedArray

search8x

private final int[] search8x

search8y

private final int[] search8y

search4x

private final int[] search4x

search4y

private final int[] search4y

searchx

private int[] searchx

searchy

private int[] searchy

channel

private int channel

newCol

private boolean[] newCol

regionNumber

int regionNumber

growingRegions

java.util.LinkedList<ConnectedRegion> growingRegions

recycleRegions

java.util.LinkedList<ConnectedRegion> recycleRegions
Constructor Detail

WhitesConnectProcess.ShapeConnector

WhitesConnectProcess.ShapeConnector(int channel)
Method Detail

initialise

private void initialise()

newData

public void newData(int iSlice,
                    FFTDataUnit fftDataUnit)
Gets passed a row of Complex data. Converts to boolean array and passes to boolean function with same name.

Parameters:
complexData - array of Complex data.

newData

private void newData(int iSlice,
                     boolean[] newData,
                     FFTDataUnit fftDataUnit)
Gets passed a row of boolean values representing thresholded fft data.

Parameters:
newData - boolean array.

mergeRegions

private ConnectedRegion mergeRegions(ConnectedRegion r1,
                                     ConnectedRegion r2)
Merge two regions together. Merge the one that started second onto the one that started first to ensure that all slices are present in the master region

Parameters:
r1 - region 1
r2 - region 2
Returns:
reference to the reminaing region. The other get's binned or recycled.

createNewRegion

private ConnectedRegion createNewRegion(int iSlice,
                                        int iCell,
                                        int dataLen,
                                        FFTDataUnit fftDataUnit)
Will eventually set a recycling scheme, but not now.

Parameters:
iSlice -
iCell -
Returns:
new or recycled region

removeRegion

private void removeRegion(ConnectedRegion r)

recycleRegion

private void recycleRegion(ConnectedRegion r)
Remove a region from the growing list and recyce it.

Parameters:
r - region to remove.

labelGrowing

private void labelGrowing(boolean growing)

findCompleteRegions

private void findCompleteRegions()

completeRegion

private boolean completeRegion(ConnectedRegion region)

setConnectionType

public void setConnectionType(int searchType)