|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.MiToBo.apps.neurites2D.NeuriteDetector2DAlgos
public class NeuriteDetector2DAlgos
The class implements the basic algorithm for neurite detection based on a 2D multichannel fluorescence image. The basic steps are: 1. pre-segmentation step to get a coarse contour of the neurons, yielding a initialization for the active contour models (snake) 2. refinement of the initial contours by the active contour models 3. identification of structural neuron parts, like soma, neurites and growth cones via a wavelet based detection A lot of intermediate results are save to the special result directories. After detection of the neurites a result table with all measured morphology values is shown. An result image showing the detected neurites with their neurite traces and special points is saved to the output directory.
NeuriteExtractor2D
Nested Class Summary | |
---|---|
static class |
NeuriteDetector2DAlgos.DetectorExternalEnergy
Label for different external energies of the snake which can be used by the detector. |
Field Summary | |
---|---|
private double |
alpha
Weighting factor for snake length term. |
private double |
beta
Weighting factor for snake curvature term. |
private MTBNeurite2DSet |
detectedNeuritesSet
Final set of detected neurites. |
private NeuriteDetector2DAlgos.DetectorExternalEnergy |
energyLabel
Label of available external snake energies, which are usable by the detector. |
private java.lang.String |
file_name_noExtension
Current image name without file extension. |
private java.lang.String |
fileName
File name of the current multichannel fluorescence image. |
private int |
height
Image size in y-direction, given in pixel. |
private MTBImage |
inputImage
Multichannel fluorescence image of the labeled neuron. |
private int |
maxFragmentDistance
Maximum distance to connect a fragment to a detected neuron, given in pixel. |
private int |
maxIterations
Number of snake iterations. |
private int |
maxSpineLength
Maximum length to define a branch of a neurite as spine (filopodia-like protrusion) in pixel. |
private double |
motionFraction
Minimum fraction of points which should have stooped to move until the snake optimization stops. |
private java.awt.Color |
neuriteColor
Region color of detected neurites to view the neurites in the result image. |
private int |
neuriteMaskSize
Mask size of average neurite with in pixel. |
private int[] |
neuronChannels
Channel numbers, including the neuron stains for detection of the neurons in the current multichannel fluorescence image. |
private MTBImage |
neuronMIP
Maximum intensity projection (MIP) image of the neuron. |
private double |
niblackConstant
Application based constant for Niblack thresholding. |
private int |
nucleiChannel
Channel number, including the nuclei, in the current multichannel fluorescence image. |
private MTBImage |
nucleus
Fluorescence labeled nuclei image from the multichannel microscope image. |
private double |
nucleusRatio
Ratio of nucleus pixels which should be included in a intact neuron region to specify the neuron region as active and use for detection. |
private int |
nucleusSize
Minimum size of nucleus region to set region as intact nucleus. |
private org.rosuda.JRI.Rengine |
rEngine
R engine to start R thread. |
private int |
resampleConstant
Constant for resampling the snake control points. |
private java.lang.String |
result_energy
Result directory for snake energy results. |
private java.lang.String |
result_extraction
Result directory for neurite extraction results. |
private java.lang.String |
result_presegmentation
Result directory for pre-segmentation. |
private java.lang.String |
result_snakes
Result directory for snake results. |
private java.lang.String |
resultDir
Main directory for result output. |
private MTBTableModel |
resultTable
Result table showing the the detection and morphology measurements. |
private int[] |
snakeIterCount
Number of snake iterations used in current optimization process. |
private double |
stepSize
Step size value for a snake step (gamma) during optimization. |
private java.lang.Boolean |
verbose
Verbose flag for standard console outputs. |
private int |
width
Image size in x-direction, given in pixel. |
Constructor Summary | |
---|---|
NeuriteDetector2DAlgos()
Standard constructor. |
|
NeuriteDetector2DAlgos(MTBImage _inputImage,
int _nucleiChannel,
int _nucleusSize,
double _nucleusRation,
int[] _neuronChannels,
double _niblackConstant,
int _maxFragmentDistance,
java.lang.String _pathToFile,
java.lang.String _resultDir,
NeuriteDetector2DAlgos.DetectorExternalEnergy _energyLabel,
double _alpha,
double _beta,
double _stepSize,
double _motionFraction,
int _maxIterations,
int _resampleConstant,
int _maxSpineLength,
int _neuriteMaskSize,
java.awt.Color _neuriteColor,
MTBTableModel _table,
java.lang.Boolean _verbose,
org.rosuda.JRI.Rengine _re)
Constructor. |
Method Summary | |
---|---|
double |
getAlpha()
Get weighting factor for snake length term. |
double |
getBeta()
Get weighting factor for snake curvature term. |
MTBNeurite2DSet |
getDetectedNeuritesSet()
Get set of detected neurites. |
NeuriteDetector2DAlgos.DetectorExternalEnergy |
getEnergyLabel()
Get energy label for external energy, used for optimization. |
private MTBImage |
getExtEnergyInit()
Calculate the initial image for the external energy of the snake. |
MTBImage |
getInputImage()
Get multichannel fluorescence input image. |
int |
getMaxFragmentDistance()
Get maximum fragment distance , in pixel. |
int |
getMaxIterations()
Get maximum number of iterations to finish snake optimization, |
int |
getMaxSpineLength()
Get maximum length of a spine, in pixel. |
double |
getMotionFraction()
Get minimum motion fraction of snake control points, to finish snake optimization. |
java.awt.Color |
getNeuriteColor()
Get neurite region color (RGB) for result image. |
int |
getNeuriteMaskSize()
Get maximum neurite mask size, in pixel. |
int[] |
getNeuronChannles()
Get neuron channels, used for detection. |
double |
getNiblackConstant()
Get Niblack thresholding constant. |
int |
getNucleiChannel()
Get channel number, including the labeled 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 |
int |
getResampleConstant()
Get constant for snake point resampling. |
java.lang.String |
getResultDir()
Get directory of intermediate and final results. |
MTBTableModel |
getResultTable()
Get final result table of morphology measurements. |
private java.util.Vector<MTBSnakePoint2D> |
getSnakeControlPoints(MTBContour2D initContour)
Method to get each 7th point of the initial contour as snake control point. |
int[] |
getSnakeIterCount()
Get snake iteration counts, used for optimization. |
private MTBRegion2DSet |
getSnakeRegion(MTBPolygon2DSet theSnakes)
Get the region which is included in the snake contour. |
double |
getStepSize()
Get step size of snake point movement. |
private void |
init()
Initialize detector. |
void |
neuriteDetection(MTBContour2DSet initContourSet)
Main method for 2D neurite detection. |
private MTBPolygon2DSet |
optimizeSnakes(MTBPolygon2DSet initSnakeSet)
Optimization of the snakes (main snake and inner snakes) with its specified parameters and energies. |
MTBContour2DSet |
preSegmentation()
Method for pre-segmentation. |
private void |
setResultDirs()
Create all output directories for the single detection steps. |
private boolean |
testRegions(MTBRegion2D cell,
MTBRegion2D core)
Test whether the number of pixels from a neuron region contains more than 90% of the pixels from a nucleus region. |
private boolean |
testRegions2(MTBRegion2D cell,
MTBRegion2D core)
Test whether a single pixel from a neuron region contains a pixel from a nucleus region. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private double alpha
private double beta
private MTBNeurite2DSet detectedNeuritesSet
private NeuriteDetector2DAlgos.DetectorExternalEnergy energyLabel
private java.lang.String file_name_noExtension
private java.lang.String fileName
private int height
private MTBImage inputImage
private int maxFragmentDistance
private int maxIterations
private int maxSpineLength
private double motionFraction
private java.awt.Color neuriteColor
private int neuriteMaskSize
private int[] neuronChannels
private MTBImage neuronMIP
private double niblackConstant
private int nucleiChannel
private MTBImage nucleus
private double nucleusRatio
private int nucleusSize
private org.rosuda.JRI.Rengine rEngine
private int resampleConstant
private java.lang.String result_energy
private java.lang.String result_extraction
private java.lang.String result_presegmentation
private java.lang.String result_snakes
private java.lang.String resultDir
private MTBTableModel resultTable
private int[] snakeIterCount
private double stepSize
private java.lang.Boolean verbose
private int width
Constructor Detail |
---|
public NeuriteDetector2DAlgos()
public NeuriteDetector2DAlgos(MTBImage _inputImage, int _nucleiChannel, int _nucleusSize, double _nucleusRation, int[] _neuronChannels, double _niblackConstant, int _maxFragmentDistance, java.lang.String _pathToFile, java.lang.String _resultDir, NeuriteDetector2DAlgos.DetectorExternalEnergy _energyLabel, double _alpha, double _beta, double _stepSize, double _motionFraction, int _maxIterations, int _resampleConstant, int _maxSpineLength, int _neuriteMaskSize, java.awt.Color _neuriteColor, MTBTableModel _table, java.lang.Boolean _verbose, org.rosuda.JRI.Rengine _re)
_inputImage
- multichannel fluorescence image_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_pathToFile
- path to current image fileresultDir
- directory of output results_energyLabel
- 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_table
- result table_verbose
- flag for standard console outputs_re
- R engine to call R scripts from a Java threadMethod Detail |
---|
public double getAlpha()
public double getBeta()
public MTBNeurite2DSet getDetectedNeuritesSet()
public NeuriteDetector2DAlgos.DetectorExternalEnergy getEnergyLabel()
private MTBImage getExtEnergyInit()
public MTBImage getInputImage()
public int getMaxFragmentDistance()
public int getMaxIterations()
public int getMaxSpineLength()
public double getMotionFraction()
public java.awt.Color getNeuriteColor()
public int getNeuriteMaskSize()
public int[] getNeuronChannles()
public double getNiblackConstant()
public int getNucleiChannel()
public double getNucleusRatio()
public int getNucleusSize()
public int getResampleConstant()
public java.lang.String getResultDir()
public MTBTableModel getResultTable()
private java.util.Vector<MTBSnakePoint2D> getSnakeControlPoints(MTBContour2D initContour)
initContour
- initial contour to extract snake control points
public int[] getSnakeIterCount()
private MTBRegion2DSet getSnakeRegion(MTBPolygon2DSet theSnakes)
snake
- current snake
public double getStepSize()
private void init()
public void neuriteDetection(MTBContour2DSet initContourSet) throws NeuriteDetector2DException
initContourSet
- set of initial contours for snakes
NeuriteDetector2DException
private MTBPolygon2DSet optimizeSnakes(MTBPolygon2DSet initSnakeSet)
initSnakes
- initial snakes for optimization start
public MTBContour2DSet preSegmentation() throws NeuriteDetector2DException
NeuriteDetector2DException
private void setResultDirs()
private boolean testRegions(MTBRegion2D cell, MTBRegion2D core)
cell
- region of the neuron cellcore
- region of the nucleus
private boolean testRegions2(MTBRegion2D cell, MTBRegion2D core)
cell
- region of the neuron cellcore
- region of the nucleus
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |