brainrat-private  5.1.2
algorithm.h
Go to the documentation of this file.
1 /* Copyright (C) 2000-2013 CEA
2  *
3  * This software and supporting documentation were developed by
4  * bioPICSEL
5  * CEA/DSV/I²BM/MIRCen/LMN, Batiment 61,
6  * 18, route du Panorama
7  * 92265 Fontenay-aux-Roses
8  * France
9  */
10 
11 #ifndef BRAINRAT_MORPHOLOGY_ALGORITHM_H
12 #define BRAINRAT_MORPHOLOGY_ALGORITHM_H
13 
14 #include <cartobase/smart/rcptr.h>
15 #include <aims/data/data_g.h>
16 #include <aims/roi/maskIterator.h>
17 #include <aims/connectivity/structuring_element.h>
18 
19 // Get a structuring element of amplitude pixels
20 carto::rc_ptr<aims::StructuringElement> getSE(int se, double amplitude, bool planar, bool usecenter);
21 
22 template <class T>
23 class morpho {
24  private:
25  morpho(){}
26 
27  public:
28  virtual ~morpho(){}
29 
30  static double ApplySE(const AimsData<T> &image,
31  const Point3dl &p,
32  const aims::StructuringElement &sev,
33  const bool &notest = false);
34 
35  // Applies a structuring element of amplitude pixels on image.
36  // Returns a double image
37  static AimsData<double> ApplySE(const AimsData<T> &image,
38  const aims::StructuringElement &sev,
39  const bool &notest = false);
40 
41  // Applies a structuring element of amplitude pixels on image using a mask.
42  // Returns a double image
43  static AimsData<double> ApplySE(const AimsData<T> &image,
44  carto::rc_ptr<aims::MaskIterator> maskiterator,
45  const aims::StructuringElement &sev,
46  const bool &notest = false);
47 
48  // Applies a structuring element of amplitude pixels on image.
49  // Returns a double image
50  static AimsData<double> ApplySE(const AimsData<T> &image,
51  int se, double amplitude,
52  bool planar = true, bool usecenter = true,
53  const bool &notest = false);
54 
55  // Applies a structuring element of amplitude pixels on image using a mask.
56  // Returns a double image
57  static AimsData<double> ApplySE(const AimsData<T> &image,
58  carto::rc_ptr<aims::MaskIterator> maskiterator,
59  int se, double amplitude,
60  bool planar = true, bool usecenter = true,
61  const bool &notest = false);
62 };
63 
64 #endif
carto::rc_ptr< aims::StructuringElement > getSE(int se, double amplitude, bool planar, bool usecenter)
static AimsData< double > ApplySE(const AimsData< T > &image, int se, double amplitude, bool planar=true, bool usecenter=true, const bool &notest=false)
static AimsData< double > ApplySE(const AimsData< T > &image, carto::rc_ptr< aims::MaskIterator > maskiterator, int se, double amplitude, bool planar=true, bool usecenter=true, const bool &notest=false)
virtual ~morpho()
Definition: algorithm.h:28
static AimsData< double > ApplySE(const AimsData< T > &image, const aims::StructuringElement &sev, const bool &notest=false)
static double ApplySE(const AimsData< T > &image, const Point3dl &p, const aims::StructuringElement &sev, const bool &notest=false)
static AimsData< double > ApplySE(const AimsData< T > &image, carto::rc_ptr< aims::MaskIterator > maskiterator, const aims::StructuringElement &sev, const bool &notest=false)