de.unihalle.informatik.MiToBo.apps.xylem
Class XylemGrower

java.lang.Object
  extended by de.unihalle.informatik.Alida.operator.ALDOperator
      extended by de.unihalle.informatik.MiToBo.core.operator.MTBOperator
          extended by de.unihalle.informatik.MiToBo.apps.xylem.XylemGrower
All Implemented Interfaces:
de.unihalle.informatik.Alida.datatypes.ALDConfigurationValidator, de.unihalle.informatik.Alida.operator.events.ALDOperatorExecutionProgressEventListener, EventListener

@ALDAOperator(genericExecutionMode=ALL,
              level=APPLICATION)
public class XylemGrower
extends MTBOperator

This operators implements region growing for xylem segmentation.

Prerequisite is HS[X]-image (hue, saturation, intensity/value/brightness) as the input and some thresholds to control the growing process and an initial segmentation of xylem regions supplied as a binary image.

All three channels of the hs[x] image are assume to be a byte image and values in the range 0 - 255.

The initial regions are eroded to get seed regions, where we determine the mean-value of the hue and/or saturation and/or I/V/B-channel.
Subsequently the region are grown via region growing. We compare each pixel of the contour of those seed regions with the pixel of the background beside them, either in a 4-neighbourhood or an 8-neighbourhood.
This is repeated until the list of uninspected pixel is not empty. Afterwards we may do some post processing. E.G. calculate gradient informations on the found regions to split regions who contain more then one xylem.

Author:
Tim Langhammer, Halle/Saale, Europe , posch

Nested Class Summary
static class XylemGrower.GrowingMode
          The region growing modus.
static class XylemGrower.Neighbourhood
          The kind of neighbourhood to inspect a pixel.
static class XylemGrower.SortMode
          Sort Mode for different MTBRegion2D's.
 
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode
 
Field Summary
static int DEFAULT_erodeSize
          Default size of the structuring element to erode the image
static double DEFAULT_hueThresh
          Default hue threshold
static XylemGrower.GrowingMode DEFAULT_linkageMode
          Default linkage mode for growing
static int DEFAULT_minAreaPostProcessing
          Minimum area of a region in post processing.
static int DEFAULT_minAreaSeedRegions
          Default minimum area for a region to be further eroded
static XylemGrower.Neighbourhood DEFAULT_neighbourhood
          Default neighborhood for growing
static int DEFAULT_openingSESize
          Default size of structuring element for opening (post processing)
static double DEFAULT_satThresh
          Default saturation threshold
static double DEFAULT_xThresh
          Default intensity threshold
 
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
completeDAG, name, operatorExecutionEventlistenerList, portHashAccess, verbose, versionProvider
 
Constructor Summary
XylemGrower()
          Default Constructor.
XylemGrower(MTBImageByte binaryImage, MTBImageByte hsxImage, XylemGrower.GrowingMode linkageMode)
           
 
Method Summary
 int getErodeSize()
          The size of the eroding element.
 MTBImageByte getGrownRegions()
          Returns a MTBImageByte image after growing.
 double getHueThresh()
          Return the treshold for the hue channel.
 MTBImage getInitialSegmentation()
           
 XylemGrower.GrowingMode getLinkageMode()
           
 int getminAreaSeedRegions()
           
 int getMinRegionArea()
           
 XylemGrower.Neighbourhood getNeighbourhood()
           
 int getOpeningSESize()
           
 MTBTableModel getResultsTable()
           
 MTBImageByte getResultXylemRegions()
          Return the binary image after the post processing of the grown region image.
 double getSatTresh()
           
 MTBImageByte getSeedRegions()
           
 double getXThresh()
          The Intensity/Brighntness/Value-Parameter (depending on the used input image type).
 MTBImage getXylemImage()
          Return the Hue/Saturation/{Intensity|Brightness|Value}-MTBImage.
protected  void operate()
          

static String printReadabeTimeInfo(long cTime)
           
 void setErodSize(int size)
          Set the size of the eroding element in pixel.
 void setGrownRegions(MTBImageByte imageByte)
           
 void setHueThresh(double hueThresh)
           
 void setInitalSegmentation(MTBImageByte image)
           
 void setLinkageMode(XylemGrower.GrowingMode linkageMode)
           
 void setminAreaSeedRegions(int minAreaSeedRegions)
           
 void setMinRegionArea(int minAreaPostProcessing)
           
 void setNeighbourhood(XylemGrower.Neighbourhood nb)
           
 void setOpeningSESize(int size)
           
 void setResultsTable(MTBTableModel resultsTable)
           
 void setSatTresh(double satTresh)
           
 void setSeedImage(MTBImageByte seedRegions)
           
 void setXThresh(double xThresh)
          Set the Intensity/Brighntness/Value-Parameter (depending on the used input image type).
 void setXylemImage(MTBImageByte hsxMTBImage)
          Set the Hue/Saturation/{Intensity|Brightness|Value}-MTBImage.
 void setXylemResultRegions(MTBImageByte regions)
          Set the binary image after the morphological processing on the grown region image.
 void validateCustom()
           
 
Methods inherited from class de.unihalle.informatik.MiToBo.core.operator.MTBOperator
readResolve
 
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
addOperatorExecutionProgressEventListener, fieldContained, fireOperatorExecutionProgressEvent, getALDPortHashAccessKey, getConstructionMode, getHidingMode, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterNames, getSupplementalNames, getVerbose, getVersion, handleOperatorExecutionProgressEvent, isConfigured, print, print, print, printInterface, printInterface, readHistory, reinitializeParameterDescriptors, removeOperatorExecutionProgressEventListener, runOp, runOp, runOp, setConstructionMode, setHidingMode, setName, setParameter, setVerbose, toStringVerbose, unconfiguredItems, validate, validateGeneric, writeHistory, writeHistory, writeHistory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_erodeSize

public static final int DEFAULT_erodeSize
Default size of the structuring element to erode the image

See Also:
Constant Field Values

DEFAULT_minAreaSeedRegions

public static final int DEFAULT_minAreaSeedRegions
Default minimum area for a region to be further eroded

See Also:
Constant Field Values

DEFAULT_linkageMode

public static final XylemGrower.GrowingMode DEFAULT_linkageMode
Default linkage mode for growing


DEFAULT_hueThresh

public static final double DEFAULT_hueThresh
Default hue threshold

See Also:
Constant Field Values

DEFAULT_satThresh

public static final double DEFAULT_satThresh
Default saturation threshold

See Also:
Constant Field Values

DEFAULT_xThresh

public static final double DEFAULT_xThresh
Default intensity threshold

See Also:
Constant Field Values

DEFAULT_neighbourhood

public static final XylemGrower.Neighbourhood DEFAULT_neighbourhood
Default neighborhood for growing


DEFAULT_openingSESize

public static final int DEFAULT_openingSESize
Default size of structuring element for opening (post processing)

See Also:
Constant Field Values

DEFAULT_minAreaPostProcessing

public static final int DEFAULT_minAreaPostProcessing
Minimum area of a region in post processing.

See Also:
Constant Field Values
Constructor Detail

XylemGrower

public XylemGrower()
            throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Default Constructor.

Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException

XylemGrower

public XylemGrower(MTBImageByte binaryImage,
                   MTBImageByte hsxImage,
                   XylemGrower.GrowingMode linkageMode)
            throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Parameters:
binaryImage -
hsxImage -
linkageMode -
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail

validateCustom

public void validateCustom()
                    throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Overrides:
validateCustom in class de.unihalle.informatik.Alida.operator.ALDOperator
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException

operate

protected void operate()
                throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException,
                       de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException

Specified by:
operate in class de.unihalle.informatik.Alida.operator.ALDOperator
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException

printReadabeTimeInfo

public static String printReadabeTimeInfo(long cTime)

getInitialSegmentation

public MTBImage getInitialSegmentation()
Returns:

setInitalSegmentation

public void setInitalSegmentation(MTBImageByte image)
Parameters:
image -

setErodSize

public void setErodSize(int size)
Set the size of the eroding element in pixel.

Parameters:
size - The site of the structuring element used for erosion in pixel.

getErodeSize

public int getErodeSize()
The size of the eroding element.

Returns:
The size of the eroding element in pixel.

getXylemImage

public MTBImage getXylemImage()
Return the Hue/Saturation/{Intensity|Brightness|Value}-MTBImage.

Returns:

setXylemImage

public void setXylemImage(MTBImageByte hsxMTBImage)
Set the Hue/Saturation/{Intensity|Brightness|Value}-MTBImage.

Parameters:
hsxMTBImage -

getResultXylemRegions

public MTBImageByte getResultXylemRegions()
Return the binary image after the post processing of the grown region image.

Returns:

setXylemResultRegions

public void setXylemResultRegions(MTBImageByte regions)
Set the binary image after the morphological processing on the grown region image.

Parameters:
regions -

getResultsTable

public MTBTableModel getResultsTable()
Returns:
the resultsTable

setResultsTable

public void setResultsTable(MTBTableModel resultsTable)
Parameters:
resultsTable - the resultsTable to set

getHueThresh

public double getHueThresh()
Return the treshold for the hue channel.

Returns:

setHueThresh

public void setHueThresh(double hueThresh)
Parameters:
hueThresh -

getLinkageMode

public XylemGrower.GrowingMode getLinkageMode()
Returns:

setLinkageMode

public void setLinkageMode(XylemGrower.GrowingMode linkageMode)
Parameters:
linkageMode -

getminAreaSeedRegions

public int getminAreaSeedRegions()
Returns:

setminAreaSeedRegions

public void setminAreaSeedRegions(int minAreaSeedRegions)
Parameters:
minAreaSeedRegions -

getNeighbourhood

public XylemGrower.Neighbourhood getNeighbourhood()
Returns:

setNeighbourhood

public void setNeighbourhood(XylemGrower.Neighbourhood nb)
Parameters:
nb -

getGrownRegions

public MTBImageByte getGrownRegions()
Returns a MTBImageByte image after growing.

Returns:

setGrownRegions

public void setGrownRegions(MTBImageByte imageByte)
Parameters:
imageByte -

getSatTresh

public double getSatTresh()
Returns:

setSatTresh

public void setSatTresh(double satTresh)
Parameters:
satTresh -

getSeedRegions

public MTBImageByte getSeedRegions()
Returns:

setSeedImage

public void setSeedImage(MTBImageByte seedRegions)
Parameters:
seedRegions -

getXThresh

public double getXThresh()
The Intensity/Brighntness/Value-Parameter (depending on the used input image type).

Returns:
The Intensity/Brighntness/Value-Parameter (depending on the used input image type).

setXThresh

public void setXThresh(double xThresh)
Set the Intensity/Brighntness/Value-Parameter (depending on the used input image type).

Parameters:
xThresh - The threshold for the intensity/brightness/value.

getOpeningSESize

public int getOpeningSESize()
Returns:

setOpeningSESize

public void setOpeningSESize(int size)
Parameters:
size -

getMinRegionArea

public int getMinRegionArea()

setMinRegionArea

public void setMinRegionArea(int minAreaPostProcessing)


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