@ALDAOperator(genericExecutionMode=ALL, level=APPLICATION, allowBatchMode=false) public class NeuriteDetector2D extends MTBOperator
NeuriteDetector2DAlgos
Modifier and Type | Class and Description |
---|---|
static class |
NeuriteDetector2D.NeuriteDetector2DMode
Different detection modes.
|
Modifier and Type | Field and Description |
---|---|
private double |
alpha |
private Vector<String> |
analyzedImages
Vector with all analyzed image files.
|
private double |
beta |
(package private) static de.unihalle.informatik.Alida.datatypes.ALDDirectoryString |
currentInput
Get initial directory from environment configuration.
|
private Vector<MTBNeurite2DSet> |
detectedNeurites
Vector of detected neurite sets for each image.
|
private MTBTableModel |
detectionResultTable |
private NeuriteDetector2D.NeuriteDetector2DMode |
detectorMode |
private NeuriteDetector2DAlgos.DetectorExternalEnergy |
energy |
private Vector<String> |
imageFiles
Vector with all image files included in the experiment folder for
detection.
|
private de.unihalle.informatik.Alida.datatypes.ALDDirectoryString |
inputDir
Define detector parameters.
|
private int |
maxFragmentDistance |
private int |
maxIterations |
private int |
maxSpineLength |
private double |
motionFraction |
protected Color |
neuriteColor |
private int |
neuriteMaskSize |
private Integer[] |
neuronChannels |
private double |
niblackConstant |
private Integer |
nucleiChannel |
private Double |
nucleusRatio |
private Integer |
nucleusSize |
private String |
outputDir
Directory of output results.
|
private org.rosuda.JRI.Rengine |
rEngine
JRI R engine to run R as a single thread.
|
private int |
resampleConstant |
private double |
stepSize |
Constructor and Description |
---|
NeuriteDetector2D()
Standard constructor.
|
NeuriteDetector2D(String _inputDir,
Integer _nucleiChannel,
int _nucleusSize,
double _nucleusRation,
Integer[] _neuronChannels,
double _niblackConstant,
int _maxFragmentDistance,
NeuriteDetector2D.NeuriteDetector2DMode _detectorMode,
NeuriteDetector2DAlgos.DetectorExternalEnergy _energy,
double _alpha,
double _beta,
double _stepSize,
double _motionFraction,
int _maxIterations,
int _resampleConstant,
int _maxSpineLength,
int _neuriteMaskSize,
Color _neuriteColor,
Boolean _verbose)
Constructor
|
Modifier and Type | Method and Description |
---|---|
private org.rosuda.JRI.Rengine |
createRengine()
Method to generate a R thread inside the java application.
|
private void |
createResultDir(String file)
Create directory where all results will be stored.
|
double |
getAlpha()
Get snake length term weight alpha.
|
Vector<String> |
getAnalyzedImages()
Get vector of analyzed images.
|
double |
getBeta()
Get snake curvature term weight beta.
|
private String |
getDate()
Get current date for result dirs.
|
Vector<MTBNeurite2DSet> |
getDetectedNeurites()
Get vector of detected neurite sets for each image.
|
NeuriteDetector2D.NeuriteDetector2DMode |
getDetectorMode()
Get current detector mode.
|
NeuriteDetector2DAlgos.DetectorExternalEnergy |
getEnergy()
Get external snake energy label.
|
Vector<String> |
getImageFiles()
Get vector of all image files included in the experiment folder for
detection.
|
de.unihalle.informatik.Alida.datatypes.ALDDirectoryString |
getInputDir()
Get directory of input images.
|
int |
getMaxFragmentDistance()
Get maximum neuron fragment distance in pixel.
|
int |
getMaxIterations()
Get maximum number of iterations to stop detection.
|
int |
getMaxSpineLength()
Get maximum length of a spine (filopodia-like protrusion) in pixel.
|
double |
getMotionFraction()
Get minimum fraction of point motion to stop detection.
|
Color |
getNeuriteColor()
Get neurite region color (RGB) for result image.
|
int |
getNeuriteMaskSize()
Get neurite mask size in pixel.
|
Integer[] |
getNeuronChannles()
Get neuron channels, used for detection.
|
double |
getNiblackConstant()
Get niblack constant.
|
Integer |
getNucleiChannel()
Get image channel of nuclei.
|
double |
getNucleusRatio()
Get ratio of nucleus pixels which should be included in an intact neuron
region
|
int |
getNucleusSize()
Get minimum nucleus size of nuclei regions
|
String |
getOutputDir()
Get directory of output results.
|
org.rosuda.JRI.Rengine |
getREngine()
Get JRI R engine to run R as a single thread.
|
int |
getResampleConstant()
Get snake point resampling constant.
|
MTBTableModel |
getResultTable()
Get the result table of the detected neurites.
|
double |
getStepSize()
Get step size of snake movement.
|
private void |
init()
Initialization method.
|
private MTBTableModel |
makeTable()
Create the result table and include the specific table header.
|
protected void |
operate() |
private boolean |
startDetectionMode()
Method to start neurite detection mode with presegmentation, active
contours and wavelet based neuron component detection.
|
void |
validateCustom()
Custom validation of some input parameters.
|
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, validateGeneric, writeHistory, writeHistory, writeHistory
static de.unihalle.informatik.Alida.datatypes.ALDDirectoryString currentInput
@Parameter(label="Input Directory", direction=IN, required=true, description="Directory of input images.", mode=STANDARD, dataIOOrder=0) private de.unihalle.informatik.Alida.datatypes.ALDDirectoryString inputDir
@Parameter(label="Nuclei Channel", direction=IN, required=true, description="Image channel including nuclei (1 labels first channel).", mode=STANDARD, dataIOOrder=1) private Integer nucleiChannel
@Parameter(label="Nucleus Size", direction=IN, required=true, description="Minimum size of nuclei regions in pixel.", mode=ADVANCED, dataIOOrder=2) private Integer nucleusSize
@Parameter(label="Nucleus Ratio", direction=IN, required=true, description="Ratio of nucleus pixels which should be included in an intact neuron region in percent.", mode=ADVANCED, dataIOOrder=3) private Double nucleusRatio
@Parameter(label="Neuron Channels", direction=IN, required=true, description="Channels which stain the neurons for detection.", mode=STANDARD, dataIOOrder=4) private Integer[] neuronChannels
@Parameter(label="Maximum Spine Length", required=true, direction=IN, description="Maximum length of a spine in pixel.", mode=STANDARD, dataIOOrder=5) private int maxSpineLength
@Parameter(label="Neurite Mask Size", required=true, direction=IN, description="Neurite mask size in pixel.", mode=ADVANCED, dataIOOrder=6) private int neuriteMaskSize
@Parameter(label="Maximum Fragment Distance", required=true, direction=IN, description="Maximum distance of neuron frgaments in pixel.", mode=ADVANCED, dataIOOrder=7) private int maxFragmentDistance
@Parameter(label="Niblack Constant", required=true, direction=IN, description="Niblack threshold constant.", mode=ADVANCED, dataIOOrder=8) private double niblackConstant
@Parameter(label="Detector Mode", required=true, direction=IN, description="Mode of neurite detector.", mode=ADVANCED, dataIOOrder=9) private NeuriteDetector2D.NeuriteDetector2DMode detectorMode
@Parameter(label="External Energy", direction=IN, required=true, description="External energy label for detection.", mode=ADVANCED, dataIOOrder=10) private NeuriteDetector2DAlgos.DetectorExternalEnergy energy
@Parameter(label="Alpha", required=true, direction=IN, description="Weighting factor for snake length term.", mode=ADVANCED, dataIOOrder=11) private double alpha
@Parameter(label="Beta", required=true, direction=IN, description="Weighting factor for snake curvature term.", mode=ADVANCED, dataIOOrder=12) private double beta
@Parameter(label="Step Size", required=true, direction=IN, description="Step size of snake movement.", mode=ADVANCED, dataIOOrder=13) private double stepSize
@Parameter(label="Resample Constant", required=true, direction=IN, description="Snake point resampling constant.", mode=ADVANCED, dataIOOrder=14) private int resampleConstant
@Parameter(label="Motion Fraction", required=true, direction=IN, description="Fraction of minimum point motion to stop detection in percent.", mode=ADVANCED, dataIOOrder=15) private double motionFraction
@Parameter(label="Maximum Iterations", required=true, direction=IN, description="Maximum iteration count to stop optimization.", mode=ADVANCED, dataIOOrder=16) private int maxIterations
@Parameter(label="Neurite Color", supplemental=true, direction=IN, description="Color of neurite regions in result image.") protected Color neuriteColor
@Parameter(label="Detection Result Table", direction=OUT, required=true, description="Table of detection results.") private transient MTBTableModel detectionResultTable
private transient Vector<String> imageFiles
private transient Vector<String> analyzedImages
private transient String outputDir
private transient Vector<MTBNeurite2DSet> detectedNeurites
private transient org.rosuda.JRI.Rengine rEngine
public NeuriteDetector2D() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public NeuriteDetector2D(String _inputDir, Integer _nucleiChannel, int _nucleusSize, double _nucleusRation, Integer[] _neuronChannels, double _niblackConstant, int _maxFragmentDistance, NeuriteDetector2D.NeuriteDetector2DMode _detectorMode, NeuriteDetector2DAlgos.DetectorExternalEnergy _energy, double _alpha, double _beta, double _stepSize, double _motionFraction, int _maxIterations, int _resampleConstant, int _maxSpineLength, int _neuriteMaskSize, Color _neuriteColor, Boolean _verbose) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
_inputDir
- input directory with multichannel fluorescence images_nucleiChannel
- channel number including nuclei image_nucleusSize
- minimum size of nucleus region_nucleusRation
- ratio of nucleus pixels which should be included in an intact
neuron region_neuronChannels
- channel numbers including neuron stains for detection_niblackConstant
- constant for niblack thresholding_maxFragmentDistance
- maximum distance to connect a fragment to the neuron, in pixel_detectorMode
- mode of neurite detection_energy
- label of available external energies for detection using snakes_alpha
- weighting factor for snake length term_beta
- weighting factor for snake curvature term_stepSize
- step size gamma to move snake in a optimization step_motionFraction
- minimum fraction of not moving points to stop optimization_maxIterations
- maximum iteration to stop optimization_resampleConstant
- constant for resampling snake control points_maxSpineLength
- maximum length of a branch to define it as spine, in pixel_neuriteMaskSize
- mask size of average neurite width, in pixel_neuriteColor
- color for neurite regions in result image_verbose
- flag for standard console outputsde.unihalle.informatik.Alida.exceptions.ALDOperatorException
public void validateCustom() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
validateCustom
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public de.unihalle.informatik.Alida.datatypes.ALDDirectoryString getInputDir()
public Integer getNucleiChannel()
public int getNucleusSize()
public double getNucleusRatio()
public Integer[] getNeuronChannles()
public int getMaxSpineLength()
public int getNeuriteMaskSize()
public int getMaxFragmentDistance()
public double getNiblackConstant()
public NeuriteDetector2D.NeuriteDetector2DMode getDetectorMode()
public NeuriteDetector2DAlgos.DetectorExternalEnergy getEnergy()
public double getAlpha()
public double getBeta()
public double getStepSize()
public int getResampleConstant()
public double getMotionFraction()
public int getMaxIterations()
public Color getNeuriteColor()
public Vector<MTBNeurite2DSet> getDetectedNeurites()
public MTBTableModel getResultTable()
public Vector<String> getImageFiles()
public Vector<String> getAnalyzedImages()
public org.rosuda.JRI.Rengine getREngine()
public String getOutputDir()
private void init()
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
private boolean startDetectionMode()
private void createResultDir(String file)
file
- name of the current experiment (directory name where input images
are stored)private String getDate()
private org.rosuda.JRI.Rengine createRengine()
private MTBTableModel makeTable()
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.