Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
Bial::Sequence Class Reference

#include <DrawSequence.hpp>

Inheritance diagram for Bial::Sequence:
Inheritance graph
Collaboration diagram for Bial::Sequence:
Collaboration graph

Public Member Functions

template<class D >
 Sequence (const Image< D > &label, size_t start_pxl, Adjacency &adj, const Color color=Color(1))
 basic constructor. Creates a sequence of connected points from a connected component that begins at start_pxl and have the same label. More...
 
template<class D >
void Draw (Image< D > &img) const
 Draws 2D or 3D sequence in input image. More...
 
template<class D >
void Draw (Image< D > &img, const Vector< float > &displacement) const
 Draws 2D or 3D sequence in input image. More...
 
Vector< Vector< int > > Pixels () const
 Returns a vector with coordinates of the pixels from this Figure. More...
 
Vector< Vector< int > > Pixels (const Vector< float > &displacement) const
 Returns a vector with coordinates of the pixels from this figure. More...
 
template<class O >
void Print (O &os) const
 Prints sequence information to stream. More...
 
double size () const
 Returns the number of pixels in this sequence. More...
 
bool ValidateSize (float min_sequence_size, float max_sequence_size=std::numeric_limits< float >::max())
 Checks if the sequence in the expected range. More...
 
bool ValidateCircularity (Vector< float > &center, float min_center_dist, float max_center_dist=std::numeric_limits< float >::max(), float min_radius=0.0f, float max_radius=std::numeric_limits< float >::max(), float min_circularity=0.0f, float max_circularity=std::numeric_limits< float >::max())
 Calculate and updates sequence's Center, Radius, and Circularity variables. More...
 
Vector< float > CircleCenter (float max_radius)
 Calculates the center of an estimated circle to the sequence. More...
 
float MeanRadius (const Vector< float > &center, size_t begin, size_t end)
 Calculates the sequence's radius using Euclidian distance. More...
 
float Circularity (const Vector< float > &center, float radius, size_t begin, size_t end)
 Calculates the sequence's circularity given its center and radius. More...
 
- Public Member Functions inherited from Bial::Figure< Sequence >
 Figure (const Color &color)
 Basic Constructor. More...
 
void Draw (Image< D > &img)
 Draws figure in input image. More...
 
void Draw (Image< D > &img, const Vector< float > &displacement) const
 Draws n-dimensional figure in input image. More...
 
Vector< Vector< int > > Pixels () const
 Returns a vector with coordinates of the pixels from this Figure. More...
 
Vector< Vector< int > > Pixels (const Vector< float > &displacement) const
 Returns a vector with coordinates of the pixels from this figure. More...
 
void Print (O &os) const
 Prints figure information to stream. More...
 

Public Attributes

Vector< Vector< float > > point
 
- Public Attributes inherited from Bial::Figure< Sequence >
Color color
 The color of the figure. More...
 

Detailed Description

Definition at line 25 of file DrawSequence.hpp.

Constructor & Destructor Documentation

template<class D >
Bial::Sequence::Sequence ( const Image< D > &  label,
size_t  start_pxl,
Adjacency adj,
const Color  color = Color(1) 
)

basic constructor. Creates a sequence of connected points from a connected component that begins at start_pxl and have the same label.

Date
2015/Apr/29
Parameters
labelLabel image used just to get its dimensions.
start_pxlOne of the sequence extremeties.
adjAn adjacency relation to be used to follow sequence points.
Returns
none.
Warning
none.

Member Function Documentation

Vector< float > Bial::Sequence::CircleCenter ( float  max_radius)

Calculates the center of an estimated circle to the sequence.

Date
2015/Jul/08
Parameters
max_radiusMaximum expected radius.
Returns
The center of the estimated circle.
Warning
none.
float Bial::Sequence::Circularity ( const Vector< float > &  center,
float  radius,
size_t  begin,
size_t  end 
)

Calculates the sequence's circularity given its center and radius.

Date
2015/Jul/08
Parameters
centerEstimated circle center to the sequence.
radiusMean radius of the sequence.
beginFirst index of the sequence to take into account.
lastIndex of the sequence to take into account.
Returns
The radius of this circle sequence.
Warning
none.
template<class D >
void Bial::Sequence::Draw ( Image< D > &  img) const

Draws 2D or 3D sequence in input image.

Date
2014/Mar/18
Version
1.0.00
Parameters
imgAn image.
Returns
none.
Warning
none.
template<class D >
void Bial::Sequence::Draw ( Image< D > &  img,
const Vector< float > &  displacement 
) const

Draws 2D or 3D sequence in input image.

Date
2014/Mar/17
Version
1.0.00
Parameters
imgAn image.
displacementDisplacement from sequence's coordinates to start drawing.
Returns
none.
Warning
none.
float Bial::Sequence::MeanRadius ( const Vector< float > &  center,
size_t  begin,
size_t  end 
)

Calculates the sequence's radius using Euclidian distance.

Date
2015/Jul/08
Parameters
centerEstimated circle center to the sequence.
beginFirst index of the sequence to take into account.
lastIndex of the sequence to take into account.
Returns
The radius of this circle sequence.
Warning
none.
Vector< Vector< int > > Bial::Sequence::Pixels ( ) const

Returns a vector with coordinates of the pixels from this Figure.

Date
2015/Jul/07
Parameters
none.
Returns
Vector with pixels.
Warning
none.
Vector< Vector< int > > Bial::Sequence::Pixels ( const Vector< float > &  displacement) const

Returns a vector with coordinates of the pixels from this figure.

Date
2015/Jul/07
Parameters
displacementDisplacement from low coordinate of the figure.
Returns
Vector with pixels.
Warning
none.
template<class O >
void Bial::Sequence::Print ( O &  os) const

Prints sequence information to stream.

Date
2014/Mar/18
Version
1.0.00
Parameters
osan output stream.
Returns
none.
Warning
none.
double Bial::Sequence::size ( ) const

Returns the number of pixels in this sequence.

Date
2015/Jul/08
Parameters
none.
Returns
The number of pixels in this sequence.
Warning
none.
bool Bial::Sequence::ValidateCircularity ( Vector< float > &  center,
float  min_center_dist,
float  max_center_dist = std::numeric_limits< float >::max(),
float  min_radius = 0.0f,
float  max_radius = std::numeric_limits< float >::max(),
float  min_circularity = 0.0f,
float  max_circularity = std::numeric_limits< float >::max() 
)

Calculate and updates sequence's Center, Radius, and Circularity variables.

Date
2015/Jul/14
Parameters
centerExpected center for a circle composed by this sequence.
min_center_distMinimum distance from expected to estimated center.
max_center_distMaximum distance from expected to estimated center.
min_radiusMinimum expected mean radius to estimated center.
min_radiusMaximum expected mean radius to estimated center.
min_circularityMinimum circularity of the sequence given the estimated radius and center.
max_circularityMaximum circularity of the sequence given the estimated radius and center.
Returns
'false' if the sequence is out of required standards.
Warning
The sequence of points must be sorted.
bool Bial::Sequence::ValidateSize ( float  min_sequence_size,
float  max_sequence_size = std::numeric_limits< float >::max() 
)

Checks if the sequence in the expected range.

Date
2015/Jul/14
Parameters
min_sequence_sizeMinimum size of sequence to be validated.
min_sequence_sizeMaximum size of sequence to be validated.
Returns
'false' if the sequence is out of required standards.
Warning
none.

Member Data Documentation

Vector< Vector< float > > Bial::Sequence::point

Definition at line 28 of file DrawSequence.hpp.


The documentation for this class was generated from the following file: