de.unihalle.informatik.MiToBo.segmentation.evaluation
Class CalcStructureStatistics

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.segmentation.evaluation.CalcStructureStatistics
All Implemented Interfaces:
de.unihalle.informatik.Alida.datatypes.ALDConfigurationValidator, de.unihalle.informatik.Alida.operator.events.ALDOperatorExecutionProgressEventListener, EventListener

public class CalcStructureStatistics
extends MTBOperator

Extracts statistics from cell and structure segmentation results.

For each structure region a corresponding region in the given cell segmentation result is detected and the structure region assigned to it. Note that structure regions along image borders are ignored. In addition, optionally also regions in given nuclei regions might be excluded if a mask with detected nuclei regions is available.

In parts the code of this file has been copied from Oliver's tool 'EvalParticleDetection'. However, this class is more generic in the sense that only a single cell segmentation result and a single structure segmentation result are processed on call of this tool.

Author:
moeller

Nested Class Summary
static class CalcStructureStatistics.StructureCountMode
          Mode how to assign structures to cell regions.
 
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.Alida.operator.ALDOperator
completeDAG, name, operatorExecutionEventlistenerList, portHashAccess, verbose, versionProvider
 
Constructor Summary
protected CalcStructureStatistics()
          Default constructor.
  CalcStructureStatistics(MTBImageByte sMask, MTBImageByte nMask, MTBImageByte labelImg)
          Default constructor.
  CalcStructureStatistics(MTBImageByte sMask, MTBImageByte nMask, MTBImageByte labelImg, boolean ignoreNuclei)
          Deprecated. 
 
Method Summary
 HashMap<Integer,Double> getResultDataAreaFractions()
          Returns result data object with area fractions per cell.
 HashMap<Integer,Double> getResultDataAvgSize()
          Returns result data object with average size per cell.
 HashMap<Integer,Integer> getResultDataCellSizes()
          Returns result data object with areas per cell.
 HashMap<Integer,Integer> getResultDataCounts()
          Returns result data object with counts per cell.
 HashMap<Integer,Integer> getResultDataTotalSize()
          Returns result data object with total structure size per cell.
protected  void operate()
           
 void setCountMode(CalcStructureStatistics.StructureCountMode m)
          Specify mode how to assign structures to cells.
 void setIgnoreBorderFlag(boolean f)
          Set flag to include/ignore structures along image border.
 void setMinimalRegionSize(int minsize)
          Specify minimal size of regions considered.
 
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

CalcStructureStatistics

protected CalcStructureStatistics()
                           throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Default constructor.

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

CalcStructureStatistics

@Deprecated
public CalcStructureStatistics(MTBImageByte sMask,
                                          MTBImageByte nMask,
                                          MTBImageByte labelImg,
                                          boolean ignoreNuclei)
                        throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Deprecated. 

Default constructor.

Parameters:
sMask - Binary mask of detected structures.
nMask - Binary mask of detected nuclei.
labelImg - Label image of detected cell areas.
ignoreNuclei - Flag for ignoring nuclei regions.
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException

CalcStructureStatistics

public CalcStructureStatistics(MTBImageByte sMask,
                               MTBImageByte nMask,
                               MTBImageByte labelImg)
                        throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Default constructor.

Parameters:
sMask - Binary mask of detected structures.
nMask - Binary mask of detected nuclei.
labelImg - Label image of detected cell areas.
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail

setCountMode

public void setCountMode(CalcStructureStatistics.StructureCountMode m)
Specify mode how to assign structures to cells.


setMinimalRegionSize

public void setMinimalRegionSize(int minsize)
Specify minimal size of regions considered.


setIgnoreBorderFlag

public void setIgnoreBorderFlag(boolean f)
Set flag to include/ignore structures along image border.


getResultDataCounts

public HashMap<Integer,Integer> getResultDataCounts()
Returns result data object with counts per cell.


getResultDataTotalSize

public HashMap<Integer,Integer> getResultDataTotalSize()
Returns result data object with total structure size per cell.


getResultDataAreaFractions

public HashMap<Integer,Double> getResultDataAreaFractions()
Returns result data object with area fractions per cell.


getResultDataCellSizes

public HashMap<Integer,Integer> getResultDataCellSizes()
Returns result data object with areas per cell.


getResultDataAvgSize

public HashMap<Integer,Double> getResultDataAvgSize()
Returns result data object with average size per cell.


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


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