@ALDAOperator(genericExecutionMode=ALL, level=APPLICATION, allowBatchMode=false, shortDescription="Calculates features tile-wise on images for given feature extractors.") public class TileFeatureCalculator extends MTBOperator
FeatureCalculator
.Modifier and Type | Field and Description |
---|---|
private Vector<FeatureCalculator> |
featureOps
List of feature calculators to apply.
|
private MTBImage |
inImg
Input image to process.
|
private MTBImage |
mask
Mask to exclude image regions and tiles, respectively.
|
private TileFeatureCalculatorResult |
resultData
Result of the calculation.
|
private MTBImage |
resultImage
Optional stack of result visualizations,
if result data suppports that.
|
private Vector<MTBImage> |
resultImages
Vector for collecting result images.
|
private int |
tileNumX
Number of tiles in x dimension.
|
private int |
tileNumY
Number of tiles in y dimension.
|
private int |
tileShiftX
Shift of tiles in x direction.
|
private int |
tileShiftY
Shift of tiles in y direction.
|
private int |
tileSizeX
Size of tiles in x direction.
|
private int |
tileSizeY
Size of tiles in y direction.
|
Constructor and Description |
---|
TileFeatureCalculator()
Default constructor.
|
TileFeatureCalculator(int _tileSizeX,
int _tileSizeY)
Constructor with non-default tile sizes.
|
TileFeatureCalculator(int _tileSizeX,
int _tileSizeY,
int _tileShiftX,
int _tileShiftY)
Constructor with non-default tile sizes.
|
Modifier and Type | Method and Description |
---|---|
private void |
addResultImages(FeatureCalculatorResult[] data)
Generates a visual representation of the tile data and stores it.
|
String |
getDocumentation() |
TileFeatureCalculatorResult |
getResult()
Get result data.
|
MTBImage |
getResultImage()
Get image with result data.
|
int |
getTileCountX()
Get number of tiles in x-direction.
|
int |
getTileCountY()
Get number of tiles in x-direction.
|
void |
operate() |
private void |
prepareImageStack()
Puts all result images into a stack.
|
void |
setFeatureOperators(Vector<FeatureCalculator> ops)
Set feature operators.
|
void |
setInputImage(MTBImage img)
Set input image.
|
void |
setMask(MTBImage exMask)
Set optional exclude mask.
|
readResolve
addOperatorExecutionProgressEventListener, addParameter, addParameter, addParameterUnconditioned, fieldContained, fireOperatorExecutionProgressEvent, getALDPortHashAccessKey, getConstructionMode, 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", required=true, direction=IN, supplemental=false, description="Input image to analyze.", dataIOOrder=-10) private transient MTBImage inImg
@Parameter(label="Tile size in x", required=true, direction=IN, supplemental=false, description="Size of image tiles to analyze in x.", dataIOOrder=-9) private int tileSizeX
@Parameter(label="Tile size in y", required=true, direction=IN, supplemental=false, description="Size of image tiles to analyze in y.", dataIOOrder=-8) private int tileSizeY
@Parameter(label="Tile shift in x", required=true, direction=IN, supplemental=false, description="Shift of image tiles to analyze in x.", dataIOOrder=-7) private int tileShiftX
@Parameter(label="Tile shift in y", required=true, direction=IN, supplemental=false, description="Shift of image tiles to analyze in y.", dataIOOrder=-6) private int tileShiftY
@Parameter(label="Feature calculators", required=true, direction=IN, supplemental=false, description="List of feature calculators to apply.", dataIOOrder=-5) private Vector<FeatureCalculator> featureOps
@Parameter(label="Exclude mask", required=false, direction=IN, supplemental=false, description="Mask to exclude image regions.", dataIOOrder=0) private transient MTBImage mask
Tiles containing at least one masked pixel (value = 0) are ignored.
@Parameter(label="Result data object", direction=OUT, description="Calculated texture measures.") private transient TileFeatureCalculatorResult resultData
@Parameter(label="Result image", direction=OUT, description="Optional result image stack.") private transient MTBImage resultImage
private transient int tileNumX
private transient int tileNumY
public TileFeatureCalculator() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
- Thrown in case of failure.public TileFeatureCalculator(int _tileSizeX, int _tileSizeY) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
_tileSizeX
- Size of one tile in x direction._tileSizeY
- Size of one tile in y direction.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
- Thrown in case of failure.public TileFeatureCalculator(int _tileSizeX, int _tileSizeY, int _tileShiftX, int _tileShiftY) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
_tileSizeX
- Size of one tile in x direction._tileSizeY
- Size of one tile in y direction._tileShiftX
- Shift between successive tiles in x direction._tileShiftY
- Shift between successive tiles in y direction.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
- Thrown in case of failure.public void operate() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
operate
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
private void addResultImages(FeatureCalculatorResult[] data)
data
- Result data.private void prepareImageStack()
public void setInputImage(MTBImage img)
img
- Image to process.public void setMask(MTBImage exMask)
exMask
- Exclude mask.public void setFeatureOperators(Vector<FeatureCalculator> ops)
ops
- Feature operators to apply.public TileFeatureCalculatorResult getResult()
public MTBImage getResultImage()
public int getTileCountX()
public int getTileCountY()
public String getDocumentation()
getDocumentation
in class de.unihalle.informatik.Alida.operator.ALDOperator
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.