public class MTBNeurite2D
extends de.unihalle.informatik.Alida.operator.ALDData
MTBNeuriteSkelGraph
Modifier and Type | Field and Description |
---|---|
private Vector<Vector<Line2D.Double>> |
featureLines
Borderlines that separate the neurite from the soma and additionally
separate the neurite from its growth cone.
|
private Vector<Vector<Point2D.Double>> |
featurePoints
Features of the single neurite branches.
|
private MTBRegion2DSet |
growthCones
Neurite corresponding growth cone regions as MTBRegion2D objects.
|
private int |
maxSpineLength
Given maximum lengths for definition of spines.
|
private MTBNeuriteSkelGraph |
neuriteGraph
Neurite skeleton Graph (NSG) of the current neurite.
|
private MTBRegion2D |
neuriteRegion
Neurite corresponding region as MTBRegion2D object.
|
private MTBRegion2D |
neuriteShaft
Neurite corresponding neurite shaft region as MTBRegion2D object.
|
private int[] |
neuriteShaftLengths
Lengths of the single branches of a neurite shaft.
|
private Vector<Vector<Double>> |
neuriteWidths
Average widths of the whole neurite, the neurite shaft and the growth cone.
|
Constructor and Description |
---|
MTBNeurite2D(MTBNeuriteSkelGraph _neuriteGraph,
Vector<Vector<Point2D.Double>> _featurePoints,
Vector<Vector<Line2D.Double>> _featureLines,
MTBRegion2D _neuriteRegion,
int _maxSpineLength,
int[] _neuriteShaftLengths,
Vector<Vector<Double>> _neuriteWidths)
Constructor to generate a new neurite object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addData(Vector<Vector<Point2D.Double>> p,
Vector<Vector<Line2D.Double>> f,
int[] n,
Vector<Vector<Double>> w)
Add data to the current neurite object.
|
MTBImageByte |
drawLine2D(Line2D.Double line,
Point2D.Double point,
MTBImageByte tmpNeuronImg)
Draws a 2D line into the neuron image.
|
double[] |
getAvgConeWidths()
Get average widths of each neurite growth cone.
|
double[] |
getAvgNeuriteWidths()
Get average widths of each complete neurite branch.
|
double[] |
getAvgShaftWidths()
Get average widths of each neurite shaft.
|
int |
getBrancheCount()
Get number of neurite branches.
|
int[] |
getBranchLengths()
Get lengths of neurite branches along the complete neurite skeleton graph.
|
int[] |
getConeAreas()
Get areas of growth cone regions.
|
int[] |
getConeLengths()
Get length of the growth cone region along the neurite skeleton graph
without neurite shaft areas.
|
double[] |
getConeRoundness()
Get roundness of growth cone regions, 1 means a perfect circle.
|
int[] |
getConeSpineCount()
Get number of spines (filopodia-like protrusions) per growth cones.
|
int |
getDefinedSpineLength()
Get length to define a neurite branch as spine (filopodia-like
protrusions).
|
int |
getEndCount()
Get number of end points.
|
Vector<Vector<Line2D.Double>> |
getFeatureLines()
Get neurite corresponding feature lines of borders between soma and neurite
shafts and neurite shafts and growth cones.
|
Vector<Vector<Point2D.Double>> |
getFeaturePoints()
Get neurite corresponding feature points of borders between soma and
neurite shafts and neurite shafts and growth cones.
|
Point2D.Double |
getfirstFeatureAt(int index)
Get first feature of neurite corresponding feature points from borders
between soma and neurite shafts.
|
MTBRegion2DSet |
getGrowthConeRegions()
Get regions of the separated growth cones.
|
MTBNeuriteSkelGraph |
getNeuriteGraph()
Get neurite corresponding skeleton graph.
|
MTBRegion2D |
getNeuriteRegion()
Get neurite corresponding region.
|
int |
getNeuriteShaftArea()
Get area of neurite shaft region (without growth cone).
|
MTBRegion2D |
getNeuriteShaftRegion()
Get neurite shaft region (without growth cone).
|
Vector<Vector<Double>> |
getNeuriteWidths()
Get average widths of each neurite branch, including the average widths of
the whole branches, the shafts and the growth cones.
|
Point2D.Double |
getsecondFeatureAt(int index)
Get second feature of neurite corresponding feature points from borders
between neurite shafts and growth cones.
|
int[] |
getShaftLengths()
Get neurite shaft lengths of all branches without growth cone areas.
|
int |
getSpineCount()
Get number of spines (filopodia-like protrusions).
|
MTBImageRGB |
toImage(Color regionColor)
Visualize the neurites skeleton graph as RGB image.
|
MTBImageRGB |
toImage(MTBImageRGB rgbImage,
Color regionColor)
Visualize the neurites skeleton graph in the given RGB image.
|
void |
updateRegions()
Update neurite shaft and growth cone regions, due to changes of this
regions by adding features or something else.
|
private MTBNeuriteSkelGraph neuriteGraph
private Vector<Vector<Point2D.Double>> featurePoints
private Vector<Vector<Line2D.Double>> featureLines
private MTBRegion2D neuriteRegion
private MTBRegion2DSet growthCones
private MTBRegion2D neuriteShaft
private int maxSpineLength
private int[] neuriteShaftLengths
public MTBNeurite2D(MTBNeuriteSkelGraph _neuriteGraph, Vector<Vector<Point2D.Double>> _featurePoints, Vector<Vector<Line2D.Double>> _featureLines, MTBRegion2D _neuriteRegion, int _maxSpineLength, int[] _neuriteShaftLengths, Vector<Vector<Double>> _neuriteWidths)
_neuriteGraph
- NSG of the current neurite_featurePoints
- vector of feature points_featureLines
- vector of feature lines_neuriteRegion
- 2D region of the neurite_maxSpineLength
- maximum spine (filopodia-like protrusions) length_neuriteShaftLengths
- array of neurite branch lengths_neuriteWidths
- average widths of neurite branches, shafts and growth cones for
the current neurite objectpublic MTBNeuriteSkelGraph getNeuriteGraph()
public Vector<Vector<Point2D.Double>> getFeaturePoints()
public Point2D.Double getfirstFeatureAt(int index)
public Point2D.Double getsecondFeatureAt(int index)
public Vector<Vector<Line2D.Double>> getFeatureLines()
public MTBRegion2D getNeuriteRegion()
public boolean addData(Vector<Vector<Point2D.Double>> p, Vector<Vector<Line2D.Double>> f, int[] n, Vector<Vector<Double>> w)
p
- vector of feature points to addf
- vector of feature lines to addn
- array of neurite branch lengths to addw
- vector of average widths to addpublic void updateRegions()
public MTBRegion2DSet getGrowthConeRegions()
public MTBRegion2D getNeuriteShaftRegion()
public int getNeuriteShaftArea()
public int[] getConeAreas()
public double[] getConeRoundness()
public int[] getConeSpineCount()
public int getDefinedSpineLength()
public int[] getBranchLengths()
public int[] getShaftLengths()
public int[] getConeLengths()
public Vector<Vector<Double>> getNeuriteWidths()
public double[] getAvgNeuriteWidths()
public double[] getAvgShaftWidths()
public double[] getAvgConeWidths()
public int getBrancheCount()
public int getSpineCount()
public int getEndCount()
public MTBImageRGB toImage(Color regionColor)
regionColor
- neurite region color in 3-element RGB array red[0], green[1],
blue[2], if null no regions are drawnpublic MTBImageRGB toImage(MTBImageRGB rgbImage, Color regionColor)
rgbImage
- image to draw neurite intoregionColor
- neurite region color in 3-element RGB array red[0], green[1],
blue[2], if null no regions are drawnpublic MTBImageByte drawLine2D(Line2D.Double line, Point2D.Double point, MTBImageByte tmpNeuronImg)
This function implements the Bresenham algorithm. Code was 'stolen' from
Wikipedia, http://de.wikipedia.org/wiki/Bresenham-Algorithmus
, and
then translated into Java (German comments where kept).
xstart
- x-coordinate of start point.ystart
- y-coordinate of start point.xend
- x-coordinate of end point.yend
- y-coordinate of end point.value
- Color/gray-scale value of the polygon.Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.