public abstract class CytoskeletonFeatureExtractor extends MTBOperator
ActinAnalyzer2D
.
The features which are to be extracted by operators extending this class should be specifically dedicated to filament like structures, e.g., actin fiberes or microtubuli.
Modifier and Type | Class and Description |
---|---|
static class |
CytoskeletonFeatureExtractor.CellMaskFormat
Format of cell segmentation data.
|
Modifier and Type | Field and Description |
---|---|
private int |
cytoChannel
Channel of input image containing stained cytoskeleton.
|
protected de.unihalle.informatik.Alida.datatypes.ALDDirectoryString |
imageDir
Input image directory.
|
protected int |
imageHeight
Height of the images, taking first image as reference.
|
protected int |
imageWidth
Width of the images, taking first image as reference.
|
protected static ImageReaderMTB |
iRead
Operator for reading image files from disk.
|
protected de.unihalle.informatik.Alida.datatypes.ALDDirectoryString |
maskDir
Directory with (cell) masks.
|
protected CytoskeletonFeatureExtractor.CellMaskFormat |
maskFormat
Format of provided cell masks.
|
protected String |
operatorID
Identifier string for the operator class.
|
protected de.unihalle.informatik.Alida.datatypes.ALDDirectoryString |
outDir
Output and working directory.
|
protected int |
tileShiftX
Tile shift in x-direction.
|
protected int |
tileShiftY
Tile size in y-direction.
|
protected int |
tileSizeX
Tile size in x-direction.
|
protected int |
tileSizeY
Tile size in y-direction.
|
Constructor and Description |
---|
CytoskeletonFeatureExtractor()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
calculateFeatures()
Performs the feature calculation.
|
protected void |
operate() |
protected MTBImage |
readInputImageMaxProjectChannel(String f)
Read image from file, do optional max projection and extract
selected cytoskeleton channel.
|
static MTBImage |
readMaskImage(String maskDir,
String basename,
CytoskeletonFeatureExtractor.CellMaskFormat maskFormat,
double xmin,
double ymin,
double xmax,
double ymax,
boolean verbose)
Read mask data from disk if available.
|
void |
setCytoskeletonChannel(int c)
Specify channel with stained cytoskeleton.
|
void |
setImageDir(de.unihalle.informatik.Alida.datatypes.ALDDirectoryString iDir)
Specify input image directory.
|
void |
setMaskDir(de.unihalle.informatik.Alida.datatypes.ALDDirectoryString mDir)
Specify input mask directory.
|
void |
setMaskFormat(CytoskeletonFeatureExtractor.CellMaskFormat mFormat)
Specify input mask format.
|
void |
setOutputDir(de.unihalle.informatik.Alida.datatypes.ALDDirectoryString oDir)
Specify output directory.
|
void |
setTileShiftX(int tShiftX)
Specify shift of tiles in x-direction.
|
void |
setTileShiftY(int tShiftY)
Specify shift of tiles in y-direction.
|
void |
setTileSizeX(int tSizeX)
Specify size of tiles in x-direction.
|
void |
setTileSizeY(int tSizeY)
Specify size of tiles in y-direction.
|
readResolve
addOperatorExecutionProgressEventListener, 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="Image directory", required=true, dataIOOrder=-11, direction=IN, description="Input image directory.", mode=STANDARD) protected de.unihalle.informatik.Alida.datatypes.ALDDirectoryString imageDir
All files in the directory and its sub-directories are considered. If a file cannot be opened (e.g. because it is not an image) it is skipped.
@Parameter(label="Cytoskeleton Channel", required=true, direction=IN, dataIOOrder=-10, description="Cytoskeleton channel, e.g., 1, 2 and so on.") private int cytoChannel
@Parameter(label="Mask directory", required=true, dataIOOrder=-9, direction=IN, description="Cell mask directory.", mode=STANDARD) protected de.unihalle.informatik.Alida.datatypes.ALDDirectoryString maskDir
@Parameter(label="Mask format", required=true, dataIOOrder=-8, direction=IN, description="Format of cell masks.", mode=STANDARD) protected CytoskeletonFeatureExtractor.CellMaskFormat maskFormat
@Parameter(label="Output and working directory", required=true, dataIOOrder=-7, direction=IN, description="Output and working directory.", mode=STANDARD) protected de.unihalle.informatik.Alida.datatypes.ALDDirectoryString outDir
@Parameter(label="Tile size x", required=true, dataIOOrder=3, direction=IN, mode=STANDARD, description="Tile size in x-direction.") protected int tileSizeX
@Parameter(label="Tile size y", required=true, dataIOOrder=4, direction=IN, mode=STANDARD, description="Tile size in y-direction.") protected int tileSizeY
@Parameter(label="Tile shift x", required=true, dataIOOrder=5, direction=IN, mode=ADVANCED, description="Tile shift in x-direction.") protected int tileShiftX
@Parameter(label="Tile shift y", required=true, dataIOOrder=6, direction=IN, mode=ADVANCED, description="Tile shift in y-direction.") protected int tileShiftY
protected transient String operatorID
protected transient int imageWidth
protected transient int imageHeight
protected static ImageReaderMTB iRead
public CytoskeletonFeatureExtractor() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
- Thrown in case of failure.public void setImageDir(de.unihalle.informatik.Alida.datatypes.ALDDirectoryString iDir)
iDir
- Directory with images.public void setCytoskeletonChannel(int c)
c
- ID of channel with stained cytoskeleton.public void setMaskDir(de.unihalle.informatik.Alida.datatypes.ALDDirectoryString mDir)
mDir
- Directory with masks.public void setMaskFormat(CytoskeletonFeatureExtractor.CellMaskFormat mFormat)
mFormat
- Format of mask files, i.e. label images or
ImageJ ROI files.public void setOutputDir(de.unihalle.informatik.Alida.datatypes.ALDDirectoryString oDir)
oDir
- Output directory for feature files.public void setTileSizeX(int tSizeX)
tSizeX
- Tile size in x.public void setTileSizeY(int tSizeY)
tSizeY
- Tile size in y.public void setTileShiftX(int tShiftX)
tShiftX
- Tile shift in x.public void setTileShiftY(int tShiftY)
tShiftY
- Tile shift in y.protected 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
protected abstract void calculateFeatures() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
The features are saved to files in the given feature directory.
If the directory is null, the output directory is to be used.
Note that both directories can be the same.
For each image four files are to be saved:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
- Thrown in case of failure.de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
- Thrown in case of failure.protected MTBImage readInputImageMaxProjectChannel(String f) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
f
- Name of image file to read.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
- Thrown in case of failure.de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
- Thrown in case of failure.public static MTBImage readMaskImage(String maskDir, String basename, CytoskeletonFeatureExtractor.CellMaskFormat maskFormat, double xmin, double ymin, double xmax, double ymax, boolean verbose)
The method reads segmentation data from file. It considers the specified mask format, i.e., if a label image is to be read or ImageJ 1.x ROIs. In the latter case it automatically differentiates between files ending with '.zip', i.e., containing more than one region, and files ending with '.roi' which contain exactly a single region.
maskDir
- Directory where to search for the mask images.basename
- Basename of the corresponding image file.maskFormat
- Format of the mask data file.xmin
- Minimum x-value of input image domain.ymin
- Minimum y-value of input image domain.xmax
- Maximum x-value of input image domain,
i.e. image width - 1.ymax
- Maximum y-value of input image domain,
i.e. image height - 1.verbose
- If true, additional information is printed.Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.