1 #ifndef mitkThresholdSplit_h
2 #define mitkThresholdSplit_h
4 #include <vigra/multi_array.hxx>
5 #include <vigra/random_forest.hxx>
9 template<
class TColumnDecisionFunctor,
class TFeatureCalculator,
class TTag = vigra::ClassificationTag>
34 void SetWeights(vigra::MultiArrayView<2, double> weights);
35 vigra::MultiArrayView<2, double>
GetWeights()
const;
45 template<
class T,
class C,
class T2,
class C2,
class Region,
class Random>
47 vigra::MultiArrayView<2, T2, C2> labels,
49 vigra::ArrayVector<Region>& childRegions,
57 typedef vigra::SplitBase<TTag> SB;
60 bool m_CalculatingFeature;
62 bool m_UseRandomSplit;
64 int m_MaximumTreeDepth;
65 TFeatureCalculator m_FeatureCalculator;
66 vigra::MultiArrayView<2, double> m_Weights;
69 vigra::ArrayVector<vigra::Int32> splitColumns;
70 TColumnDecisionFunctor bgfunc;
71 vigra::ArrayVector<double> min_gini_;
72 vigra::ArrayVector<std::ptrdiff_t> min_indices_;
73 vigra::ArrayVector<double> min_thresholds_;
80 #include <../src/Splitter/mitkThresholdSplit.cpp>
81 #endif //mitkThresholdSplit_h
bool IsUsingPointBasedWeights() const
void SetFeatureCalculator(TFeatureCalculator processor)
void set_external_parameters(vigra::ProblemSpec< T > const &in)
void UseRandomSplit(bool split)
vigra::MultiArrayView< 2, double > GetWeights() const
TFeatureCalculator GetFeatureCalculator() const
virtual int GetMaximumTreeDepth() const
DataCollection - Class to facilitate loading/accessing structured data.
void UsePointBasedWeights(bool weightsOn)
int bestSplitColumn() const
double GetPrecision() const
double bestSplitThreshold() const
void SetWeights(vigra::MultiArrayView< 2, double > weights)
void SetPrecision(double value)
void SetMaximumTreeDepth(int value)
static bool in(Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4)
void SetCalculatingFeature(bool calculate)
bool IsUsingRandomSplit() const
static std::vector< std::string > & split(const std::string &s, char delim, std::vector< std::string > &elems)
int findBestSplit(vigra::MultiArrayView< 2, T, C > features, vigra::MultiArrayView< 2, T2, C2 > labels, Region ®ion, vigra::ArrayVector< Region > &childRegions, Random &randint)
bool IsCalculatingFeature() const