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, de.unihalle.informatik.Alida.operator.events.ALDOperatorExecutionProgressEventListener, EventListener

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

Operator for doing statistical calculations on segmentations of images.

The segmentations and input images processed by this operator can have either 2 or 3 dimensions. In addition, multiple channels are supported. In case of time series images being handed over to this operator only the image for the first point in time is processed.

Note: It is assumed that the given segmentation covers at least the domain of the input image. There are no checks performed if this is really true!

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
 
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
completeDAG, name, operatorExecutionEventlistenerList, 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, Vector<CalcSegmentationStatistics.CalcTargets> targets)
          Default constructor.
 
Method Summary
 double[] getRegionMeans()
          Get average intensity array indexed with class labels for first channel.
 double[][] getRegionMeansAllChannels()
          Get average intensity array indexed with class labels for all channels.
 int[] getRegionSizes()
          Get array of region areas indexed with class labels for first channel.
 double[] getRegionVars()
          Get intensity variance array indexed with class labels for first channel.
 double[][] getRegionVarsAllChannels()
          Get intensity variance array indexed with class labels for all channels.
protected  void operate()
           
 void setInputImage(MTBImage img)
          Set the input image.
 void setSegmentation(MTBSegmentationInterface seg)
          Specifiy image segmentation.
 void setTargets(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
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

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,
                                  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

setInputImage

public void setInputImage(MTBImage img)
Set the input image.

Parameters:
img - Image to process.

setSegmentation

public void setSegmentation(MTBSegmentationInterface seg)
Specifiy image segmentation.


setTargets

public void setTargets(Vector<CalcSegmentationStatistics.CalcTargets> targets)
Specify targets to calculate.


getRegionSizes

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


getRegionMeans

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


getRegionMeansAllChannels

public double[][] getRegionMeansAllChannels()
Get average intensity array indexed with class labels for all channels.

The first dimension of the array covers the channel.


getRegionVars

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

The first dimension of the array covers the channel.


getRegionVarsAllChannels

public double[][] getRegionVarsAllChannels()
Get intensity variance array indexed with class labels for all channels.

The first dimension of the array covers the channel.


operate

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


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