/
itkBinaryPerimeterEstimationCalculator.h
executable file
·107 lines (81 loc) · 2.92 KB
/
itkBinaryPerimeterEstimationCalculator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#ifndef __itkBinaryPerimeterEstimationCalculator_h
#define __itkBinaryPerimeterEstimationCalculator_h
#include "itkObject.h"
namespace itk {
/** \class BinaryPerimeterEstimationCalculator
* \brief TODO
*
* \author Gaëtan Lehmann. Biologie du Développement et de la Reproduction, INRA de Jouy-en-Josas, France.
*
* \sa
*/
template<class TInputImage>
class ITK_EXPORT BinaryPerimeterEstimationCalculator :
public Object
{
public:
/** Standard class typedefs. */
typedef BinaryPerimeterEstimationCalculator Self;
typedef Object Superclass;
typedef SmartPointer<Self> Pointer;
typedef SmartPointer<const Self> ConstPointer;
/** Some convenient typedefs. */
typedef TInputImage InputImageType;
typedef typename InputImageType::Pointer InputImagePointer;
typedef typename InputImageType::ConstPointer InputImageConstPointer;
typedef typename InputImageType::RegionType InputImageRegionType;
typedef typename InputImageType::PixelType InputImagePixelType;
typedef typename InputImageType::RegionType RegionType;
typedef typename InputImageType::SizeType SizeType;
typedef typename InputImageType::IndexType IndexType;
/** ImageDimension constants */
itkStaticConstMacro(ImageDimension, unsigned int,
TInputImage::ImageDimension);
/** Standard New method. */
itkNewMacro(Self);
/** Runtime information support. */
itkTypeMacro(BinaryPerimeterEstimationCalculator, Object);
/**
* Set/Get whether the connected components are defined strictly by
* face connectivity or by face+edge+vertex connectivity. Default is
* FullyConnectedOff. For objects that are 1 pixel wide, use
* FullyConnectedOn.
*/
itkSetMacro(FullyConnected, bool);
itkGetConstReferenceMacro(FullyConnected, bool);
itkBooleanMacro(FullyConnected);
/**
* Set/Get the value used as "foreground" in the output image.
* Defaults to NumericTraits<PixelType>::max().
*/
itkSetMacro(ForegroundValue, InputImagePixelType);
itkGetConstMacro(ForegroundValue, InputImagePixelType);
itkGetConstMacro(Perimeter, double);
itkSetObjectMacro( Image, InputImageType );
// void SetImage( const InputImageType * img )
// {
// m_Image = img;
// }
// itkGetObjectMacro( Image, InputImageType );
InputImageType * GetImage()
{
return m_Image;
}
void Compute();
protected:
BinaryPerimeterEstimationCalculator();
~BinaryPerimeterEstimationCalculator() {};
void PrintSelf(std::ostream& os, Indent indent) const;
private:
BinaryPerimeterEstimationCalculator(const Self&); //purposely not implemented
void operator=(const Self&); //purposely not implemented
bool m_FullyConnected;
InputImagePixelType m_ForegroundValue;
double m_Perimeter;
InputImageType * m_Image;
} ; // end of class
} // end namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
#include "itkBinaryPerimeterEstimationCalculator.txx"
#endif
#endif