7 #ifndef BALL_DATATYPE_CONTOUR_H
8 #define BALL_DATATYPE_CONTOUR_H
10 #ifndef BALL_DATATYPE_REGULARDATA2D_H
14 #ifndef BALL_DATATYPE_CONTOURLINE_H
37 TContour(
Size num_lines=0,
double start=0,
double end=0);
84 std::vector< TContourLine<T> >
lines_;
88 typename std::vector<TContourLine<T> >::const_iterator
it_;
98 TContour<T>::TContour(
Size num_lines,
double start,
double end) : lines_(num_lines), num_lines_(num_lines), start_(start), end_(end), index_(0)
102 template <
typename T>
103 TContour<T>::TContour(
const TContour& copyTContour) : lines_(copyTContour.lines_), num_lines_(copyTContour.num_lines_), start_(copyTContour.start_), end_(copyTContour.end_), index_(copyTContour.index_)
107 template <
typename T>
112 template <
typename T>
121 template <
typename T>
127 lines_ = std::vector< TContourLine<T> >(0);
131 template <
typename T>
134 return ((start_ == compTContour.
start_) && (end_ == compTContour.
end_) && (lines_ == compTContour.
lines_)
135 && (num_lines_ == compTContour.
num_lines_) && (it_ == compTContour.
it_) && (index_ == compTContour.
index_));
138 template <
typename T>
142 double step = (end_ - start_) / num_lines_;
144 for (i=0; i<num_lines_; i++)
153 it_ = lines_.begin();
158 template <
typename T>
161 if (index_<num_lines_)
172 template <
typename T>
175 it_ = lines_.begin();
#define BALL_CREATE(name)
TContour & operator=(const TContour &rhs)
Assignment operator.
void apply(TRegularData2D< T > &data)
TContour< float > Contour
bool operator==(const TContour &contour) const
Equality operator.
std::vector< TContourLine< T > >::const_iterator it_
TContour(Size num_lines=0, double start=0, double end=0)
Default constructor.
virtual void clear()
Clear method.
virtual ~TContour()
Destructor.
std::vector< TContourLine< T > > lines_
void resetCounter()
Reset the ContourLine-counter.
void createContourLine(TRegularData2D< T > &from)
Creates a contour line from a given data set.
bool getNextContourLine(TContourLine< T > &contour)
Gives access to the next ContourLine. Returns false if we had already returned the last line...