38#ifndef YL_PROPAGATE_ALONG_FIELD_HH
39#define YL_PROPAGATE_ALONG_FIELD_HH
41#include <boost/shared_ptr.hpp>
43#include <cartodata/volume/volume.h>
44#include <aims/vector/vector.h>
102 template<
typename Tlabel>
106 Tlabel ignore_label)
const;
120 template<
typename Tlabel>
123 Tlabel target_label=0)
const;
133 template<
typename Tlabel>
136 Tlabel target_label=0)
const;
147 template <
class TVisitor,
typename Tlabel>
152 TVisitor& visitor)
const;
159 template <
typename Tlabel>
163 const boost::shared_ptr<ScalarField>& field,
164 Tlabel ignore_label)
const;
172 template<
typename Tlabel>
175 const boost::shared_ptr<ScalarField>& field,
176 Tlabel target_label=0)
const;
179 boost::shared_ptr<VectorField3d> m_vector_field;
180 unsigned int m_max_iter;
184 static const int debug_output = 0;
186 template <
template <
typename>
class ResultChooserTemplate,
typename Tlabel>
187 typename ResultChooserTemplate<Tlabel>::result_type
188 internal_ascension(
const Point3df &start_point,
191 const ResultChooserTemplate<Tlabel>& result_chooser)
const;
193 template <
class ResultChooser,
typename Tlabel>
194 typename ResultChooser::result_type
195 internal_ascension(
const Point3df &start_point,
198 const ResultChooser& result_chooser)
const;
200 template<
class ResultRecorder,
typename Tlabel>
204 ResultRecorder& result_recorder)
const;
Exception raised by certain members if an advection cannot be completed.
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.
void setMaxIter(unsigned int max_iter)
Abort following the gradient after a number of iterations.
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.
carto::VolumeRef< float > integrate_from_region(const carto::VolumeRef< Tlabel > &seeds, const boost::shared_ptr< ScalarField > &field, Tlabel target_label=0) const
PropagateAlongField(const carto::VolumeRef< float > &fieldx, const carto::VolumeRef< float > &fieldy, const carto::VolumeRef< float > &fieldz)
Provide the field as separate scalar components.
static const unsigned int default_max_iter
void setStep(float step)
Move in steps of the specified size (millimetres).
PropagateAlongField(const boost::shared_ptr< VectorField3d > &vector_field)
static const float default_step
void setVerbose(int verbosity=1)
Indicate progress on stderr.
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.
carto::VolumeRef< Tlabel > propagate_regions(const carto::VolumeRef< Tlabel > &seeds, Tlabel target_label=0) const
Propagate labelled regions down a vector field.
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.
virtual ~PropagateAlongField()