highres-cortex 6.0.4
yl Namespace Reference

Classes

class  Advection
 Advect a visitor along a vector field. More...
 
class  BooleanScalarField
 Access a boolean field stored in a volume. More...
 
class  ConstantStepAdvection
 Forward advection using a constant step size. More...
 
class  CortexColumnRegionQuality
 
class  Field
 Store and access a field (scalar or vector) defined over a 3D domain. More...
 
class  IterativeRegionMerger
 
class  LabelVolume
 
class  LaplaceSolver
 
class  LinearlyInterpolatedScalarField
 Access a scalar field stored in a volume. More...
 
class  LinearlyInterpolatedScalarFieldGradient
 
class  LinearlyInterpolatedVectorField3d
 Access a vector field stored as three volumes. More...
 
struct  MomentAccumulator
 
struct  PointHasher
 Helper class to use Point3d & friends in hash tables. More...
 
class  PropagateAlongField
 Propagate labels along a vector field. More...
 
class  ScalarField
 Store a scalar field and access it at any coordinates. More...
 
class  select1st
 Return the first element of a std::pair, like non-standard std::select1st. More...
 
class  SortedFront
 
class  VectorField3d
 Store a vector field and access it at any coordinates. More...
 

Enumerations

enum  { CSF_LABEL = 0 , CORTEX_LABEL = 100 , WHITE_LABEL = 200 }
 
enum  { DEFAULT_FRONT_LABEL = -123 , DEFAULT_DONE_LABEL = -10 }
 

Functions

std::pair< carto::VolumeRef< float >, carto::VolumeRef< float > > advect_tubes (const carto::VolumeRef< int16_t > &seeds, const yl::ScalarField &domain, const yl::VectorField3d &advection_field, const yl::ScalarField &divergence_field, float max_advection_distance, float step_size, int verbosity=0)
 Advect a tube along a field, starting with unit surface.
 
carto::VolumeRef< float > advect_euclidean (const carto::VolumeRef< int16_t > &seeds, const yl::ScalarField &domain, const yl::VectorField3d &advection_field, float max_advection_distance, float step_size, int verbosity=0)
 Advect a point along a field, keeping track of the distance.
 
template<typename T>
carto::VolumeRef< T > advect_value (const carto::VolumeRef< int16_t > &seeds, const yl::ScalarField &domain, const yl::VectorField3d &advection_field, const carto::VolumeRef< T > &values, float max_advection_distance, float step_size, int verbosity=0)
 Advect a point along a field, and propagate end points values to the starting point.
 
AimsSurface< 2 > advect_path (const carto::VolumeRef< int16_t > &seeds, const yl::ScalarField &domain, const yl::VectorField3d &advection_field, float max_advection_distance, float step_size, int verbosity=0)
 Advect a point along a field, recording advection tracts in a wireframe mesh.
 
template<class TDomainField>
yl::ScalarFieldcreate_domain_field (const carto::VolumeRef< int16_t > &domain)
 Build a ScalarField of the given type from an int16_t volume.
 
carto::VolumeRef< float > upwind_distance (const carto::VolumeRef< float > &upwind_field, carto::VolumeRef< int16_t > domain, int16_t domain_label, int16_t origin_label, int16_t done_label=DEFAULT_DONE_LABEL, int16_t front_label=DEFAULT_FRONT_LABEL, int verbosity=0)
 Compute the distance along the gradient of a scalar field.
 
int xyz_min_border (const std::vector< int > &borders)
 Minimum border width along X, Y, and Z dimensions.
 
template<typename T>
int xyz_min_border (const carto::VolumeRef< T > &volume)
 Minimum border width along X, Y, and Z dimensions.
 
template<typename T, class Predicate>
bool check_border_values (const carto::VolumeRef< T > &volume, const Predicate &predicate)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CSF_LABEL 
CORTEX_LABEL 
WHITE_LABEL 

Definition at line 43 of file cortex.hh.

◆ anonymous enum

anonymous enum
Enumerator
DEFAULT_FRONT_LABEL 
DEFAULT_DONE_LABEL 

Definition at line 65 of file front.hh.

Function Documentation

◆ advect_euclidean()

carto::VolumeRef< float > yl::advect_euclidean ( const carto::VolumeRef< int16_t > & seeds,
const yl::ScalarField & domain,
const yl::VectorField3d & advection_field,
float max_advection_distance,
float step_size,
int verbosity = 0 )

Advect a point along a field, keeping track of the distance.

This non-template function differs from the other (template) one in that it takes the domain field as an additional, dynamic argument.

  • seeds : mask of advection starting points mask
  • domain : the advection domain with zero outside, one inside
  • advection_field : vector field to advect along
  • max_advection_distance : the maximum length of the advection path
  • step_size : the constant length of an advection step. Can be negative to advect in the opposite direction.
  • verbosity : verbosity to stderr, (verbosity - 1) is passed to Advection::set_verbose() and to Advection::Visitor::set_verbose()
Returns
Euclidean length of the advection path

◆ advect_path()

AimsSurface< 2 > yl::advect_path ( const carto::VolumeRef< int16_t > & seeds,
const yl::ScalarField & domain,
const yl::VectorField3d & advection_field,
float max_advection_distance,
float step_size,
int verbosity = 0 )

Advect a point along a field, recording advection tracts in a wireframe mesh.

This non-template function differs from the other (template) one in that it takes the domain field as an additional, dynamic argument.

  • seeds : mask of advection starting points
  • domain : the advection domain with zero outside, one inside
  • advection_field : vector field to advect along
  • max_advection_distance : the maximum length of the advection path
  • step_size : the constant length of an advection step. Can be negative to advect in the opposite direction.
  • verbosity : verbosity to stderr, (verbosity - 1) is passed to Advection::set_verbose() and to Advection::Visitor::set_verbose()
Returns
Euclidean length of the advection path

◆ advect_tubes()

std::pair< carto::VolumeRef< float >, carto::VolumeRef< float > > yl::advect_tubes ( const carto::VolumeRef< int16_t > & seeds,
const yl::ScalarField & domain,
const yl::VectorField3d & advection_field,
const yl::ScalarField & divergence_field,
float max_advection_distance,
float step_size,
int verbosity = 0 )

Advect a tube along a field, starting with unit surface.

This non-template function differs from the other (template) one in that it takes the domain field as an additional, dynamic argument.

  • seeds : mask of advection starting points
  • domain : the advection domain with zero outside, one inside
  • advection_field : vector field to advect along
  • divergence_field : the divergence of the normalized advection field
  • max_advection_distance : the maximum length of the advection path
  • step_size : the constant length of an advection step. Can be negative to advect in the opposite direction.
  • verbosity : verbosity to stderr, (verbosity - 1) is passed to Advection::set_verbose() and to Advection::Visitor::set_verbose()
Returns
pair of (tube's volume, tube's end surface)

◆ advect_value()

template<typename T>
carto::VolumeRef< T > yl::advect_value ( const carto::VolumeRef< int16_t > & seeds,
const yl::ScalarField & domain,
const yl::VectorField3d & advection_field,
const carto::VolumeRef< T > & values,
float max_advection_distance,
float step_size,
int verbosity = 0 )

Advect a point along a field, and propagate end points values to the starting point.

This function differs from the other one (with 2 template parameters) in that it takes the domain field as an additional, dynamic argument.

T : values image voxel type

  • seeds : mask of advection starting points
  • domain : the advection domain with zero outside, one inside
  • advection_field : vector field to advect along
  • values : values to be propagated
  • max_advection_distance : the maximum length of the advection path
  • step_size : the constant length of an advection step. Can be negative to advect in the opposite direction.
  • verbosity : verbosity to stderr, (verbosity - 1) is passed to Advection::set_verbose() and to Advection::Visitor::set_verbose()
Returns
advected values

◆ check_border_values()

template<typename T, class Predicate>
bool yl::check_border_values ( const carto::VolumeRef< T > & volume,
const Predicate & predicate )

◆ create_domain_field()

template<class TDomainField>
yl::ScalarField * yl::create_domain_field ( const carto::VolumeRef< int16_t > & domain)

Build a ScalarField of the given type from an int16_t volume.

◆ upwind_distance()

carto::VolumeRef< float > yl::upwind_distance ( const carto::VolumeRef< float > & upwind_field,
carto::VolumeRef< int16_t > domain,
int16_t domain_label,
int16_t origin_label,
int16_t done_label = DEFAULT_DONE_LABEL,
int16_t front_label = DEFAULT_FRONT_LABEL,
int verbosity = 0 )

Compute the distance along the gradient of a scalar field.

In the object defined by domain_label, the distance $d$ to origin_label is computed along the field lines of the gradient of upwind_field ( $T$). This is done by integrating the following equation in a single sweep through the domain, using an upwinding condition on $T$:

\[\nabla d \cdot \frac{\nabla T}{\|\nabla T\|} = 1
\]

The domain image will be modified in-place for keeping track of the front (front_label) and visited voxels (done_label).

Preconditions:

  • upwind_field must have at least a 1-voxel border, which must be filled with NaN
  • domain must have at least a 1-voxel border, which will must not contain domain_label
  • domain_label, origin_label, done_label, and front_label must all have different values (except origin_label and done_label can be equal)

References DEFAULT_DONE_LABEL, and DEFAULT_FRONT_LABEL.

◆ xyz_min_border() [1/2]

template<typename T>
int yl::xyz_min_border ( const carto::VolumeRef< T > & volume)

Minimum border width along X, Y, and Z dimensions.

◆ xyz_min_border() [2/2]

int yl::xyz_min_border ( const std::vector< int > & borders)

Minimum border width along X, Y, and Z dimensions.

Call this function like this, or use the overload xyz_min_border(const carto::VolumeRef<T>&):

yl::xyz_min_border(volume->getBorders())
int xyz_min_border(const std::vector< int > &borders)
Minimum border width along X, Y, and Z dimensions.