de.unihalle.informatik.MiToBo.segmentation.basics
Class CalcSegmentationStatistics

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.basics.CalcSegmentationStatistics
All Implemented Interfaces:
de.unihalle.informatik.Alida.datatypes.ALDConfigurationValidator

@ALDAOperator(genericExecutionMode=ALL)
public class CalcSegmentationStatistics
extends MTBOperator

Helper class for doing statistical calculations on 2D/3D grayscale images.

Author:
moeller

Nested Class Summary
static class CalcSegmentationStatistics.calcTargets
          Statistical numbers provided by this class.
 
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode
 
Field Summary
private  int iDepth
          Depth of working image.
private  int iHeight
          Height of working image.
private  MTBImage image
          Input image.
private  int iWidth
          Width of working image.
private  double[] regionMeans
          List of calculated region average values.
private  int[] regionSizes
          List of calculated region sizes.
private  double[] regionVars
          List of calculated region variance values.
private  MTBSegmentationInterface segmentation
          Segmentation object.
private  java.util.Vector<CalcSegmentationStatistics.calcTargets> targetList
          List of targets to calculate.
 
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
completeDAG, name, portHashAccess, verbose, versionProvider
 
Constructor Summary
CalcSegmentationStatistics()
          Default constructor without arguments.
CalcSegmentationStatistics(MTBImage im)
          Default constructor.
CalcSegmentationStatistics(MTBImage im, MTBSegmentationInterface seg)
          Default constructor.
CalcSegmentationStatistics(MTBImage im, MTBSegmentationInterface seg, java.util.Vector<CalcSegmentationStatistics.calcTargets> targets)
          Default constructor.
 
Method Summary
 double[] getRegionMeans()
          Get region average intensity array indexed with class labels.
 int[] getRegionSizes()
          Get array of region areas indexed with class labels.
 double[] getRegionVars()
          Get region intensity variance array indexed with class labels.
protected  void operate()
           
 void setSegmentation(MTBSegmentationInterface seg)
          Specifiy image segmentation.
 void setTargets(java.util.Vector<CalcSegmentationStatistics.calcTargets> targets)
          Specify targets to calculate.
 
Methods inherited from class de.unihalle.informatik.MiToBo.core.operator.MTBOperator
readResolve
 
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
deserializeFromXmlFile, fieldContained, getALDPortHashAccessKey, getConstructionMode, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterNames, getSupplementalNames, getVerbose, getVersion, isConfigured, parametersToXmlObject, print, print, print, printInterface, printInterface, readHistory, reinitializeParameterDescriptors, runOp, runOp, runOp, serializeToXmlFile, setConstructionMode, setName, setParameter, setParametersFromXml, setParametersFromXml, setVerbose, toStringVerbose, unconfiguredItems, validate, validateCustom, validateGeneric, writeHistory, writeHistory, writeHistory, writeParametersToXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iDepth

private int iDepth
Depth of working image.


iHeight

private int iHeight
Height of working image.


image

@Parameter(label="image",
           direction=IN,
           required=true,
           description="Input image to work on.")
private MTBImage image
Input image.


iWidth

private int iWidth
Width of working image.


regionMeans

@Parameter(label="regionmeans",
           direction=OUT,
           description="Calculated region averages.")
private double[] regionMeans
List of calculated region average values.


regionSizes

@Parameter(label="regionsizes",
           direction=OUT,
           description="Calculated region sizes.")
private int[] regionSizes
List of calculated region sizes.


regionVars

@Parameter(label="regionvars",
           direction=OUT,
           description="Calculated region variances.")
private double[] regionVars
List of calculated region variance values.


segmentation

@Parameter(label="segmentation",
           direction=IN,
           required=true,
           description="Segmentation of image.")
private MTBSegmentationInterface segmentation
Segmentation object.


targetList

@Parameter(label="targets",
           direction=IN,
           required=true,
           description="List of targets to calculate.")
private java.util.Vector<CalcSegmentationStatistics.calcTargets> targetList
List of targets to calculate.

Constructor Detail

CalcSegmentationStatistics

public CalcSegmentationStatistics()
                           throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Default constructor without arguments.

Note, there are parameters that need to be set prior to executing the operator. Don't call runOp() before doing that!

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

CalcSegmentationStatistics

public CalcSegmentationStatistics(MTBImage im)
                           throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Default constructor.

Parameters:
im - Image to work on.
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException

CalcSegmentationStatistics

public CalcSegmentationStatistics(MTBImage im,
                                  MTBSegmentationInterface seg)
                           throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Default constructor.

Parameters:
im - Image to work on.
seg - Segmentation.
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException

CalcSegmentationStatistics

public CalcSegmentationStatistics(MTBImage im,
                                  MTBSegmentationInterface seg,
                                  java.util.Vector<CalcSegmentationStatistics.calcTargets> targets)
                           throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Default constructor.

Parameters:
im - Image to work on.
seg - Image segmentation.
targets - List of statistical numbers to calculate per region.
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail

getRegionMeans

public double[] getRegionMeans()
Get region average intensity array indexed with class labels.


getRegionSizes

public int[] getRegionSizes()
Get array of region areas indexed with class labels.


getRegionVars

public double[] getRegionVars()
Get region intensity variance array indexed with class labels.


operate

protected void operate()
Specified by:
operate in class de.unihalle.informatik.Alida.operator.ALDOperator

setSegmentation

public void setSegmentation(MTBSegmentationInterface seg)
Specifiy image segmentation.


setTargets

public void setTargets(java.util.Vector<CalcSegmentationStatistics.calcTargets> targets)
Specify targets to calculate.