@ALDAOperator(genericExecutionMode=ALL) public class CalcSegmentationStatistics extends MTBOperator
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!
| Modifier and Type | Class and Description |
|---|---|
static class |
CalcSegmentationStatistics.CalcTargets
Statistical numbers provided by this class.
|
| Modifier and Type | Field and Description |
|---|---|
private int |
iChannels
Number of channels of working image.
|
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 Vector<CalcSegmentationStatistics.CalcTargets> |
targetList
List of targets to calculate.
|
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
readResolveaddOperatorExecutionProgressEventListener, addParameter, addParameter, addParameterUnconditioned, fieldContained, fireOperatorExecutionProgressEvent, getALDPortHashAccessKey, getConstructionMode, getDocumentation, getHidingMode, getInactiveParameterNames, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterDescriptorUnconditioned, getParameterNames, getParameterUnconditioned, getSupplementalNames, getVerbose, getVersion, handleOperatorExecutionProgressEvent, hasInOutParameters, hasParameter, isAnnotatedParameter, isConfigured, print, print, print, printInterface, printInterface, readHistory, reinitializeParameterDescriptors, removeOperatorExecutionProgressEventListener, removeParameter, runOp, runOp, runOp, setConstructionMode, setConstructionMode, setConstructionMode, setHidingMode, setName, setParameter, setParameterUnconditioned, setVerbose, toStringVerbose, unconfiguredItems, validate, validateCustom, validateGeneric, writeHistory, writeHistory, writeHistory@Parameter(label="Input Image",
direction=IN,
required=true,
description="Input image to work on.")
private MTBImage image
@Parameter(label="Segmentation",
direction=IN,
required=true,
description="Segmentation of image.")
private MTBSegmentationInterface segmentation
@Parameter(label="Calculation Targets",
direction=IN,
required=true,
description="List of targets to calculate.")
private Vector<CalcSegmentationStatistics.CalcTargets> targetList
@Parameter(label="Region Sizes",
direction=OUT,
description="Calculated region sizes.")
private int[] regionSizes
@Parameter(label="Region Means",
direction=OUT,
description="Calculated region averages.")
private double[][] regionMeans
The first dimension of the array covers the channel.
@Parameter(label="Region Variances",
direction=OUT,
description="Calculated region variances.")
private double[][] regionVars
The first dimension of the array covers the channel.
private int iWidth
private int iHeight
private int iDepth
private int iChannels
public CalcSegmentationStatistics()
throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Note, there are parameters that need to be set prior to executing the operator. Don't call runOp() before doing that!
de.unihalle.informatik.Alida.exceptions.ALDOperatorExceptionpublic CalcSegmentationStatistics(MTBImage im) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
im - Image to work on.de.unihalle.informatik.Alida.exceptions.ALDOperatorExceptionpublic CalcSegmentationStatistics(MTBImage im, MTBSegmentationInterface seg) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
im - Image to work on.seg - Segmentation.de.unihalle.informatik.Alida.exceptions.ALDOperatorExceptionpublic CalcSegmentationStatistics(MTBImage im, MTBSegmentationInterface seg, Vector<CalcSegmentationStatistics.CalcTargets> targets) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
im - Image to work on.seg - Image segmentation.targets - List of statistical numbers to calculate per region.de.unihalle.informatik.Alida.exceptions.ALDOperatorExceptionpublic void setInputImage(MTBImage img)
img - Image to process.public void setSegmentation(MTBSegmentationInterface seg)
public void setTargets(Vector<CalcSegmentationStatistics.CalcTargets> targets)
public int[] getRegionSizes()
public double[] getRegionMeans()
public double[][] getRegionMeansAllChannels()
The first dimension of the array covers the channel.
public double[] getRegionVars()
The first dimension of the array covers the channel.
public double[][] getRegionVarsAllChannels()
The first dimension of the array covers the channel.
protected void operate()
operate in class de.unihalle.informatik.Alida.operator.ALDOperatorCopyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.