1 #ifndef TIL_POINTLISTTOOLS_H 2 #define TIL_POINTLISTTOOLS_H 4 #include <cartobase/config/cartobase_config.h> 17 template <
typename T >
20 typename std::vector<numeric_array<T,3> >::const_iterator iPl;
22 for (iPl = pl->begin(); iPl != pl->end(); ++iPl)
24 if ((*iPl) == v)
return true;
33 template <
typename T1,
typename T2 >
36 typename std::vector<numeric_array<T1,3> >::const_iterator iPl;
38 for (iPl = pl.begin(); iPl != pl.end(); ++iPl)
45 template <
typename T1,
typename T2 >
48 typename std::vector<numeric_array<T1,3> >::const_iterator iPl;
53 for (iPl = pl->begin(); iPl != pl->end(); ++iPl)
101 template <
class TImage1,
class TImage2>
102 std::unique_ptr<std::vector<numeric_array<int,3> > >
108 typename TImage1::value_type threshold,
109 typename TImage2::value_type background
113 std::unique_ptr<std::vector<numeric_array<int,3> > > newPl =
new std::vector<numeric_array<int,3> >;
114 std::vector<numeric_array<int,3> >::const_iterator iPl;
116 for (iPl = pl.begin(); iPl != pl.end(); ++iPl)
118 if (im.getValue(*iPl) > threshold)
120 newPl->push_back(*iPl);
124 seg(*iPl) = background;
void add2ndOrder(const std::vector< numeric_array< T1, 3 > > &pl, SymMatrix3< T2 > &mat)
A class to store a 3*3 symetric matrix.
Belongs to package Box Do not include directly, include til/Box.h instead.
General macros, definitions and functions.
void tdot(numeric_array< T, 3 > const &v, SymMatrix3< T > &mat)
Stores v.v^T in mat.
boost::enable_if< is_numeric_container< TStorage >, bool >::type contains(const Box< T, D > &box, const TStorage &v)
Check whether a point lies within box.
std::unique_ptr< std::vector< numeric_array< int, 3 > > > keepPointsAboveThreshold(const std::vector< numeric_array< int, 3 > > &pl, const TImage1 &im, TImage2 &seg, typename TImage1::value_type threshold, typename TImage2::value_type background)
std::for_each(pl.begin(), pl.end(), setImageVoxel(im, value))