|
highres-cortex 6.0.4
|
Propagate labels along a vector field. More...
#include <highres-cortex/propagate_along_field.hh>
Classes | |
| class | AbortedAdvection |
| Exception raised by certain members if an advection cannot be completed. More... | |
Public Member Functions | |
| PropagateAlongField (const boost::shared_ptr< VectorField3d > &vector_field) | |
| PropagateAlongField (const carto::VolumeRef< float > &fieldx, const carto::VolumeRef< float > &fieldy, const carto::VolumeRef< float > &fieldz) | |
| Provide the field as separate scalar components. | |
| virtual | ~PropagateAlongField () |
| void | setVerbose (int verbosity=1) |
| Indicate progress on stderr. | |
| void | setStep (float step) |
| Move in steps of the specified size (millimetres). | |
| void | setMaxIter (unsigned int max_iter) |
| Abort following the gradient after a number of iterations. | |
| template<typename Tlabel> | |
| Tlabel | ascend_until_nonzero (const Point3df &start_point, const carto::VolumeRef< Tlabel > &seeds, Tlabel ignore_label) const |
| Move along the field until a nonzero label is found. | |
| template<typename Tlabel> | |
| carto::VolumeRef< Tlabel > | propagate_regions (const carto::VolumeRef< Tlabel > &seeds, Tlabel target_label=0) const |
| Propagate labelled regions down a vector field. | |
| template<typename Tlabel> | |
| std::pair< carto::VolumeRef< Tlabel >, carto::VolumeRef< float > > | propagate_regions_keeping_dests (const carto::VolumeRef< Tlabel > &seeds, Tlabel target_label=0) const |
| Propagate regions, keeping track of the provenance of each voxel. | |
| template<class TVisitor, typename Tlabel> | |
| bool | visitor_ascension (const Point3df &start_point, const carto::VolumeRef< Tlabel > &seeds, Tlabel ignore_label, TVisitor &visitor) const |
| Visit each point along the advection path. | |
| template<typename Tlabel> | |
| float | integrate_field_along_advection (const Point3df &start_point, const carto::VolumeRef< Tlabel > &seeds, const boost::shared_ptr< ScalarField > &field, Tlabel ignore_label) const |
| Return the integral of a scalar field along an advection path. | |
| template<typename Tlabel> | |
| carto::VolumeRef< float > | integrate_from_region (const carto::VolumeRef< Tlabel > &seeds, const boost::shared_ptr< ScalarField > &field, Tlabel target_label=0) const |
Static Public Attributes | |
| static const float | default_step |
| static const unsigned int | default_max_iter |
Propagate labels along a vector field.
From a given starting point, the field is followed in fixed-size steps until a seed is reached, or the maximum number of iterations is exceeded.
Definition at line 55 of file propagate_along_field.hh.
|
explicit |
| yl::PropagateAlongField::PropagateAlongField | ( | const carto::VolumeRef< float > & | fieldx, |
| const carto::VolumeRef< float > & | fieldy, | ||
| const carto::VolumeRef< float > & | fieldz ) |
Provide the field as separate scalar components.
The field will be linearly interpolated.
|
virtual |
| Tlabel yl::PropagateAlongField::ascend_until_nonzero | ( | const Point3df & | start_point, |
| const carto::VolumeRef< Tlabel > & | seeds, | ||
| Tlabel | ignore_label ) const |
Move along the field until a nonzero label is found.
Return the value of the seed encountered, or zero in the following cases:
| float yl::PropagateAlongField::integrate_field_along_advection | ( | const Point3df & | start_point, |
| const carto::VolumeRef< Tlabel > & | seeds, | ||
| const boost::shared_ptr< ScalarField > & | field, | ||
| Tlabel | ignore_label ) const |
Return the integral of a scalar field along an advection path.
| AbortedAdvection | is thrown if the advection cannot be completed. |
| carto::VolumeRef< float > yl::PropagateAlongField::integrate_from_region | ( | const carto::VolumeRef< Tlabel > & | seeds, |
| const boost::shared_ptr< ScalarField > & | field, | ||
| Tlabel | target_label = 0 ) const |
| carto::VolumeRef< Tlabel > yl::PropagateAlongField::propagate_regions | ( | const carto::VolumeRef< Tlabel > & | seeds, |
| Tlabel | target_label = 0 ) const |
Propagate labelled regions down a vector field.
The labels are interpreted as follows:
negative: forbidden region, propagation is stopped and the target voxel remains unset.
An optional target_label can be given, in which case the propagation is started only from thus labelled voxels.
| std::pair< carto::VolumeRef< Tlabel >, carto::VolumeRef< float > > yl::PropagateAlongField::propagate_regions_keeping_dests | ( | const carto::VolumeRef< Tlabel > & | seeds, |
| Tlabel | target_label = 0 ) const |
Propagate regions, keeping track of the provenance of each voxel.
The second output volume is the same size as the input seeds volume, except is has 3 time points which represent x, y, and z coordinates of the point of origin, respectively.
| void yl::PropagateAlongField::setMaxIter | ( | unsigned int | max_iter | ) |
Abort following the gradient after a number of iterations.
This is to prevent infinite looping when the propagation falls in a local minimum or loops over itself. By default this is default_max_iter.
| void yl::PropagateAlongField::setStep | ( | float | step | ) |
Move in steps of the specified size (millimetres).
The default step size is default_step.
| void yl::PropagateAlongField::setVerbose | ( | int | verbosity = 1 | ) |
Indicate progress on stderr.
| bool yl::PropagateAlongField::visitor_ascension | ( | const Point3df & | start_point, |
| const carto::VolumeRef< Tlabel > & | seeds, | ||
| Tlabel | ignore_label, | ||
| TVisitor & | visitor ) const |
Visit each point along the advection path.
| true | if the advection succeeds (reaches a goal region). |
| false | if the advection it is stopped early and fails. |
|
static |
Definition at line 140 of file propagate_along_field.hh.
|
static |
Definition at line 139 of file propagate_along_field.hh.