source: trunk/src/Detection/ObjectGrower.hh @ 1062

Last change on this file since 1062 was 1052, checked in by MatthewWhiting, 12 years ago

Fixing some incomplete include statements

File size: 2.1 KB
Line 
1#ifndef OBJECT_GROWER_H
2#define OBJECT_GROWER_H
3
4#include <iostream>
5#include <duchamp/duchamp.hh>
6#include <duchamp/Detection/detection.hh>
7#include <duchamp/Cubes/cubes.hh>
8#include <duchamp/Utils/Statistics.hh>
9
10namespace duchamp {
11
12  /// @brief Flags defining the state of each pixel
13  enum STATE {AVAILABLE, DETECTED, BLANK, MW};
14
15  /// @brief A class to manage the growing of objects to a secondary
16  /// threshold
17  /// @details This class provides a mechanism for handling the
18  /// growing of objects. By keeping track of the state of each pixel,
19  /// through an array of flags indicating whether a pixel is
20  /// available or in an object, it is able to efficiently grow the
21  /// objects from pixels on the edge, rather than spending time
22  /// examining pixels that are completely surrounded by other object
23  /// pixels.
24  class ObjectGrower
25  {
26  public:
27    /// @brief Default constructor
28    ObjectGrower();
29    /// @brief Destrctor
30    virtual ~ObjectGrower(){};
31    /// @brief Copy constructor
32    ObjectGrower(ObjectGrower &o);
33    /// @brief Copy operator
34    ObjectGrower& operator=(const ObjectGrower &o);
35
36    /// @brief Set up the class with parameters & pointers from the cube
37    void define(Cube *theCube);
38    /// @brief Update a Cube's detectMap based on the flag array
39    void updateDetectMap(short *map);
40    /// @brief Grow an object
41    virtual void grow(Detection *theObject);
42    /// @brief Grow out from a single voxel, returning the list of new voxels.
43    std::vector<Voxel> growFromPixel(Voxel &vox);
44
45  protected:
46    std::vector<STATE> itsFlagArray;                   ///< The array of pixel flags
47    std::vector<size_t> itsArrayDim;                     ///< The dimensions of the array
48    Statistics::StatsContainer<float> itsGrowthStats;  ///< The statistics used to determine membership of an object
49    int itsSpatialThresh;                              ///< The spatial threshold for merging
50    int itsVelocityThresh;                             ///< The spectral threshold for merging
51    float* itsFluxArray;                               ///< The location of the pixel values
52  };
53
54}
55
56
57#endif
Note: See TracBrowser for help on using the repository browser.