de.unihalle.informatik.MiToBo.apps.nuclei2D
Class NucleusSeparator2DPeakSearch

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.nuclei2D.NucleusSeparator2DAlgos
              extended by de.unihalle.informatik.MiToBo.apps.nuclei2D.NucleusSeparator2DPeakSearch
All Implemented Interfaces:
de.unihalle.informatik.Alida.datatypes.ALDConfigurationValidator, de.unihalle.informatik.Alida.operator.events.ALDOperatorExecutionProgressEventListener, EventListener

@ALDAOperator(genericExecutionMode=ALL,
              level=STANDARD)
@ALDDerivedClass
public class NucleusSeparator2DPeakSearch
extends NucleusSeparator2DAlgos

Operator for separating merged nuclei regions in images.

This operator analyzes nuclei images and detects nuclei regions. The main focus is thereby on seperating nuclei regions which are merged by common segmentation techniques. Consequently, binary pre-segmentations of nuclei regions can be provided as input to the operator.
Anyway, if no binary image is coming along, the gray-scale input image will first be binarized by applying Otsu thresholding and some morphological post-processing steps. Indeed this a standard procedure which probably won't suit your needs - better use your own nucleus detector instead.

After binarization the resulting regions are further analyzed, i.e. the centers of present nuclei regions are determined (for details refer to Jochen's project thesis).

Given estimates for the nuclei regions snakes are initialized and run to detect the complete nuclei regions. As result extracted nuclei contours are provided as a set of polygons and overlayed to the greyscale image.

This operator has been written as part of Jochen's project in WS 2011/12.

Author:
Jochen Luechtrath, Birgit Moeller

Nested Class Summary
 
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode
 
Field Summary
 
Fields inherited from class de.unihalle.informatik.MiToBo.apps.nuclei2D.NucleusSeparator2DAlgos
inputImg, labelImg, resultImg
 
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
completeDAG, name, operatorExecutionEventlistenerList, portHashAccess, verbose, versionProvider
 
Constructor Summary
NucleusSeparator2DPeakSearch()
          Default constructor.
NucleusSeparator2DPeakSearch(MTBImageShort grey)
          Constructor with input image.
NucleusSeparator2DPeakSearch(MTBImageShort grey, MTBImage label)
          Constructor with gray-scale and binary image.
 
Method Summary
 void configureSnakes(double g, int its, double avglength)
          Configures basic snake parameters.
 MTBImageShort getLabelImage()
          Returns gray-scale label image with nuclei regions.
 MTBRegion2DSet getNRSCandidates()
          Returns possible peak locations from NucleusRegionSeperator.
 MTBImage getNRSDistImg()
          Returns distance image calculated intermediately.
 MTBPolygon2DSet getNRSEllipsoidSnakePrimer()
          Creates and returns a set of polygons as starting regions for snake analysis based on hypothesized ellipses from nucleus information
 MTBRegion2DSet[] getNRSResultAreas()
          Returns set of result regions from region separator.
 MTBRegion2DSet getNRSResultCenters()
          Returns set of detected region centers from region separator.
 MTBPolygon2DSet getNRSVoronoidSnakePrimer()
          Creates and returns a set of polygons as starting regions for the snakes.
 MTBRegion2DSet getOtsuRegs()
          Returns set of regions resulting from Otsu thresholding.
 MTBImageRGB getResultImage()
          Returns RGB color image overlayed with nuclei contours.
 MTBPolygon2DSet getSnakes()
          Returns the result snakes.
protected  void operate()
           
 void setInImg(MTBImage inImg)
          Specify gray-scale input image.
 void setLabelImg(MTBImage label)
          Specify label input image.
 void setMad(double _mad)
          Sets maximal allowed discrepancy of direct connection to actual profile between two peaks.
 void setMax_d2c(float max_d2c)
          Sets factor to adjust maximal allowed distance from lower to upper peak.
 void setSavePath(String path)
          Sets the path to where intermediate snake results are to be written.
 void setSaveSnakes(boolean save)
          (De)activates saving of iteration step results.
 void setShowSnakes(boolean show)
          (De)activates displaying of intermediate results during snake-iterations.
 void setSnakeIterations(int its)
          Sets number of iterations for snake optimization.
 void setSuppressor(int sup)
          Sets threshold to suppress peak analysis close to scraggy contours.
 
Methods inherited from class de.unihalle.informatik.MiToBo.apps.nuclei2D.NucleusSeparator2DAlgos
getResultImg, setInputGrayScaleImage, setInputLabelImage, setResultImg
 
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, validateCustom, validateGeneric, writeHistory, writeHistory, writeHistory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NucleusSeparator2DPeakSearch

public NucleusSeparator2DPeakSearch()
                             throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Default constructor.

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

NucleusSeparator2DPeakSearch

public NucleusSeparator2DPeakSearch(MTBImageShort grey)
                             throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Constructor with input image.

Parameters:
grey - Original greyscale nucleus image.
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException

NucleusSeparator2DPeakSearch

public NucleusSeparator2DPeakSearch(MTBImageShort grey,
                                    MTBImage label)
                             throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Constructor with gray-scale and binary image.

Parameters:
grey - Original greyscale nucleus image.
label - Label image of pre-segmented nuclei regions.
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail

setInImg

public void setInImg(MTBImage inImg)
Specify gray-scale input image.

Parameters:
inImg - Gray-scale input image to be processed.

setLabelImg

public void setLabelImg(MTBImage label)
Specify label input image.

Parameters:
bw - Label input image.

setShowSnakes

public void setShowSnakes(boolean show)
(De)activates displaying of intermediate results during snake-iterations.

Parameters:
If - true, displaying results is enabled.

getSnakes

public MTBPolygon2DSet getSnakes()
Returns the result snakes.

Returns:
Resulting nuclei contours.

getResultImage

public MTBImageRGB getResultImage()
Returns RGB color image overlayed with nuclei contours.

Returns:
Color image with nuclei contours.

getLabelImage

public MTBImageShort getLabelImage()
Returns gray-scale label image with nuclei regions.

Returns:
Gray-scale image with nuclei regions.

setSaveSnakes

public void setSaveSnakes(boolean save)
(De)activates saving of iteration step results.

Parameters:
If - true, saving of results is enabled.

setSavePath

public void setSavePath(String path)
Sets the path to where intermediate snake results are to be written.

Parameters:
Path - in filesystem, folder must exist.

setSnakeIterations

public void setSnakeIterations(int its)
Sets number of iterations for snake optimization.

Parameters:
its - Number of iterations.

configureSnakes

public void configureSnakes(double g,
                            int its,
                            double avglength)
Configures basic snake parameters.

Parameters:
g - Array of snake step-sizes.
its - Number of iterations.
avglength - Desired length of snake segments.

getOtsuRegs

public MTBRegion2DSet getOtsuRegs()
Returns set of regions resulting from Otsu thresholding.

Returns:
Set of regions created by Otsu thresholding.

getNRSDistImg

public MTBImage getNRSDistImg()
Returns distance image calculated intermediately.

Returns:
Distance-transformation image as done by NucleusRegionSeparator.

getNRSVoronoidSnakePrimer

public MTBPolygon2DSet getNRSVoronoidSnakePrimer()
                                          throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException,
                                                 de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
Creates and returns a set of polygons as starting regions for the snakes.

The method is based on voronoi tesselation of Otsu-regions.

Returns:
Set of initial snake polygons.
Throws:
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException

getNRSEllipsoidSnakePrimer

public MTBPolygon2DSet getNRSEllipsoidSnakePrimer()
Creates and returns a set of polygons as starting regions for snake analysis based on hypothesized ellipses from nucleus information


getNRSResultAreas

public MTBRegion2DSet[] getNRSResultAreas()
Returns set of result regions from region separator.

Returns:
Splitted regions.

getNRSResultCenters

public MTBRegion2DSet getNRSResultCenters()
Returns set of detected region centers from region separator.

Returns:
Set of detected nuclei centers from NucleusRegionSeperator.

getNRSCandidates

public MTBRegion2DSet getNRSCandidates()
Returns possible peak locations from NucleusRegionSeperator.

Returns:
Set of possible peak locations from NucleusRegionSeperator.

setMax_d2c

public void setMax_d2c(float max_d2c)
Sets factor to adjust maximal allowed distance from lower to upper peak.

Parameters:
max_d2c - Maximal distance, default 1.5.

setMad

public void setMad(double _mad)
Sets maximal allowed discrepancy of direct connection to actual profile between two peaks.

Parameters:
mad - Maximal discrepancy, default 0.11.

setSuppressor

public void setSuppressor(int sup)
Sets threshold to suppress peak analysis close to scraggy contours.

Parameters:
sup - Threshold, should be > 4.

operate

protected void operate()
                throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException,
                       de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
Specified by:
operate in class NucleusSeparator2DAlgos
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException


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