public class TreeParser extends Object implements Parser
Modifier and Type | Field and Description |
---|---|
static int |
ROOT_NODES_ANY
Flag for defining the profile center as the average position of root nodes
of all primary Paths.
|
static int |
ROOT_NODES_APICAL_DENDRITE
Flag for defining the profile center as the average position of root nodes
of Paths tagged as Apical Dendrite.
|
static int |
ROOT_NODES_AXON
Flag for defining the profile center as the average position of root nodes
of Paths tagged as Axon.
|
static int |
ROOT_NODES_CUSTOM
Flag for defining the profile center as the average position of root nodes
of Paths tagged as Custom.
|
static int |
ROOT_NODES_DENDRITE
Flag for defining the profile center as the average position of root nodes
of Paths tagged as (Basal) Dendrite
|
static int |
ROOT_NODES_SOMA
Flag for defining the profile center as the average position of root nodes
of Paths tagged as Soma
|
static int |
ROOT_NODES_UNDEFINED
Flag for defining the profile center as the average position of root nodes
of Paths tagged as Undefined
|
HEMI_EAST, HEMI_NONE, HEMI_NORTH, HEMI_SOUTH, HEMI_WEST, INTG_MEAN, INTG_MEDIAN, INTG_MODE, KEY_2D3D, KEY_CALIBRATION, KEY_CENTER, KEY_CHANNEL_POS, KEY_FRAME_POS, KEY_HEMISHELLS, KEY_ID, KEY_NSAMPLES, KEY_NSAMPLES_INTG, KEY_SLICE_POS, KEY_SOURCE, KEY_THRESHOLD_RANGE, SRC_IMG, SRC_TABLE, SRC_TRACES, UNSET
Constructor and Description |
---|
TreeParser(Tree tree)
Instantiates a new Tree Parser.
|
Modifier and Type | Method and Description |
---|---|
PointInImage |
getCenter()
Returns the center coordinates
|
ij.ImagePlus |
getLabelsImage(ij.ImagePlus templateImg,
ColorTable cTable)
Gets the labels image.
|
Profile |
getProfile() |
Tree |
getTree()
Returns the tree associated with this parser
|
boolean |
isSkipSomaticSegments() |
static void |
main(String... args) |
void |
parse() |
void |
setCenter(int choice)
Computes the center of the Profile.
|
void |
setCenter(PointInImage center)
Sets the center of the profile.
|
void |
setSkipSomaticSegments(boolean skipSomaticSegments)
If primary paths start far-away from the soma (expected to be defined by a
single-point (soma centroid)), should segments between the soma and neurite
be ignored.
|
void |
setStepSize(double stepSize)
Sets the radius step size.
|
boolean |
successful() |
void |
terminate() |
public static final int ROOT_NODES_ANY
public static final int ROOT_NODES_APICAL_DENDRITE
public static final int ROOT_NODES_AXON
public static final int ROOT_NODES_CUSTOM
public static final int ROOT_NODES_DENDRITE
public static final int ROOT_NODES_SOMA
public static final int ROOT_NODES_UNDEFINED
public TreeParser(Tree tree)
tree
- the Tree to be profiledpublic void setCenter(int choice) throws IllegalArgumentException
choice
- the flag specifying the center (e.g.,
ROOT_NODES_SOMA
, ROOT_NODES_ANY
, etc.)IllegalArgumentException
- if choice is not a recognized flag or if
no Paths in the Tree match the choice criteriapublic PointInImage getCenter()
public void setCenter(PointInImage center)
center
- the focal point of the profilepublic void setStepSize(double stepSize)
stepSize
- the radius step sizepublic void parse() throws IllegalArgumentException
parse
in interface Parser
IllegalArgumentException
public boolean successful()
successful
in interface Parser
public Profile getProfile()
getProfile
in interface Parser
public ij.ImagePlus getLabelsImage(ij.ImagePlus templateImg, ColorTable cTable)
templateImg
- the template imgcTable
- the c tablepublic static void main(String... args)
public Tree getTree()
public boolean isSkipSomaticSegments()
setSkipSomaticSegments(boolean)
public void setSkipSomaticSegments(boolean skipSomaticSegments)
skipSomaticSegments
- the skipFirsNode to setCopyright © 2015–2021 Fiji. All rights reserved.