40 #include <Core/ITKCommon/extrema.hxx>
41 #include <Core/ITKCommon/common.hxx>
44 #include <itkGradientImageFilter.h>
46 #include <boost/filesystem.hpp>
52 namespace bfs=boost::filesystem;
58 typedef itk::GradientImageFilter<image_t> gradient_filter_t;
63 typedef gradient_filter_t::OutputImageType gradient_image_t;
68 typedef gradient_image_t::PixelType gradient_t;
106 void setup(
const unsigned int & octave,
111 const unsigned int s,
112 const bool & make_keys);
115 inline unsigned int scales()
const
116 {
return gL_.size(); }
119 void detect_extrema(
const unsigned int & pyramid,
120 const unsigned int & octave,
121 const double percent_below_threshold,
122 const bool threshold_by_area,
123 const bfs::path & fn_prefix =
"");
126 void generate_keys();
129 void generate_descriptors(
const unsigned int & descriptor_version);
132 unsigned int count_extrema()
const;
135 unsigned int count_keys()
const;
138 mask_t::ConstPointer mask_;
139 mask_t::ConstPointer mask_eroded_;
142 std::vector<image_t::Pointer> L_;
145 std::vector<image_t::Pointer> D_;
148 std::vector<gradient_image_t::Pointer> gL_;
151 std::vector<image_t::Pointer> raw_min_;
152 std::vector<image_t::Pointer> raw_max_;
155 std::vector<double> sigma_;
158 std::vector<std::list<extrema_t> > extrema_min_;
159 std::vector<std::list<extrema_t> > extrema_max_;
162 std::vector<std::list<descriptor_t> > keys_min_;
163 std::vector<std::list<descriptor_t> > keys_max_;
166 static const double r0_;
167 static const double r1_;
176 void setup(
const image_t * initial_image,
178 const double & initial_sigma,
179 const unsigned int s,
180 const double min_edge = 96.0,
181 const bool & make_keys =
true);
184 inline unsigned int octaves()
const
185 {
return octave_.size(); }
188 bool remove_lowest_resolution_octave(
const unsigned int how_many = 1);
189 bool remove_highest_resolution_octave(
const unsigned int how_many = 1);
192 void detect_extrema(
const unsigned int & pyramid,
193 const double percent_below_threshold,
194 const bool threshold_by_area =
true,
195 const bfs::path & fn_prefix =
"");
198 void generate_keys();
201 void generate_descriptors(
const unsigned int & descriptor_version);
204 unsigned int count_extrema()
const;
207 unsigned int count_keys()
const;
210 void debug(
const bfs::path & fn_prefix)
const;
213 bool save(
const bfs::path & fn_save)
const;
214 bool load(
const bfs::path & fn_save);
217 std::vector<octave_t> octave_;
227 load_pyramid(
const bfs::path & fn_load,
229 image_t::Pointer & mosaic,
230 mask_t::Pointer & mosaic_mask);
233 #endif // PYRAMID_HXX_
Definition: pyramid.hxx:103
Definition: pyramid.hxx:173