Magick++ 7.1.1
Loading...
Searching...
No Matches
Magick::ChannelMoments Class Reference
Collaboration diagram for Magick::ChannelMoments:

Public Member Functions

 ChannelMoments (const ChannelMoments &channelMoments_)
 
double centroidX (void) const
 
double centroidY (void) const
 
PixelChannel channel (void) const
 
double ellipseAxisX (void) const
 
double ellipseAxisY (void) const
 
double ellipseAngle (void) const
 
double ellipseEccentricity (void) const
 
double ellipseIntensity (void) const
 
double huInvariants (const size_t index_) const
 
bool isValid () const
 
 ChannelMoments (const PixelChannel channel_, const MagickCore::ChannelMoments *channelMoments_)
 

Private Attributes

PixelChannel _channel
 
std::vector< double > _huInvariants
 
double _centroidX
 
double _centroidY
 
double _ellipseAxisX
 
double _ellipseAxisY
 
double _ellipseAngle
 
double _ellipseEccentricity
 
double _ellipseIntensity
 

Detailed Description

Definition at line 19 of file Statistic.h.

Constructor & Destructor Documentation

◆ ChannelMoments() [1/3]

Magick::ChannelMoments::ChannelMoments ( void  )

Definition at line 19 of file Statistic.cpp.

20 : _channel(SyncPixelChannel),
21 _huInvariants(8),
22 _centroidX(0.0),
23 _centroidY(0.0),
24 _ellipseAxisX(0.0),
25 _ellipseAxisY(0.0),
26 _ellipseAngle(0.0),
27 _ellipseEccentricity(0.0),
28 _ellipseIntensity(0.0)
29{
30}

◆ ChannelMoments() [2/3]

Magick::ChannelMoments::ChannelMoments ( const ChannelMoments channelMoments_)

Definition at line 32 of file Statistic.cpp.

33 : _channel(channelMoments_._channel),
34 _huInvariants(channelMoments_._huInvariants),
35 _centroidX(channelMoments_._centroidX),
36 _centroidY(channelMoments_._centroidY),
37 _ellipseAxisX(channelMoments_._ellipseAxisX),
38 _ellipseAxisY(channelMoments_._ellipseAxisY),
39 _ellipseAngle(channelMoments_._ellipseAngle),
40 _ellipseEccentricity(channelMoments_._ellipseEccentricity),
41 _ellipseIntensity(channelMoments_._ellipseIntensity)
42{
43}

◆ ~ChannelMoments()

Magick::ChannelMoments::~ChannelMoments ( void  )

Definition at line 45 of file Statistic.cpp.

46{
47}

◆ ChannelMoments() [3/3]

Magick::ChannelMoments::ChannelMoments ( const PixelChannel  channel_,
const MagickCore::ChannelMoments *  channelMoments_ 
)

Definition at line 102 of file Statistic.cpp.

104 : _channel(channel_),
105 _huInvariants(),
106 _centroidX(channelMoments_->centroid.x),
107 _centroidY(channelMoments_->centroid.y),
108 _ellipseAxisX(channelMoments_->ellipse_axis.x),
109 _ellipseAxisY(channelMoments_->ellipse_axis.y),
110 _ellipseAngle(channelMoments_->ellipse_angle),
111 _ellipseEccentricity(channelMoments_->ellipse_eccentricity),
112 _ellipseIntensity(channelMoments_->ellipse_intensity)
113{
114 ssize_t
115 i;
116
117 for (i=0; i<8; i++)
118 _huInvariants.push_back(channelMoments_->invariant[i]);
119}

Member Function Documentation

◆ centroidX()

double Magick::ChannelMoments::centroidX ( void  ) const

Definition at line 49 of file Statistic.cpp.

50{
51 return(_centroidX);
52}

◆ centroidY()

double Magick::ChannelMoments::centroidY ( void  ) const

Definition at line 54 of file Statistic.cpp.

55{
56 return(_centroidY);
57}

◆ channel()

Magick::PixelChannel Magick::ChannelMoments::channel ( void  ) const

Definition at line 59 of file Statistic.cpp.

60{
61 return(_channel);
62}

◆ ellipseAngle()

double Magick::ChannelMoments::ellipseAngle ( void  ) const

Definition at line 74 of file Statistic.cpp.

75{
76 return(_ellipseAngle);
77}

◆ ellipseAxisX()

double Magick::ChannelMoments::ellipseAxisX ( void  ) const

Definition at line 64 of file Statistic.cpp.

65{
66 return(_ellipseAxisX);
67}

◆ ellipseAxisY()

double Magick::ChannelMoments::ellipseAxisY ( void  ) const

Definition at line 69 of file Statistic.cpp.

70{
71 return(_ellipseAxisY);
72}

◆ ellipseEccentricity()

double Magick::ChannelMoments::ellipseEccentricity ( void  ) const

Definition at line 79 of file Statistic.cpp.

80{
81 return(_ellipseEccentricity);
82}

◆ ellipseIntensity()

double Magick::ChannelMoments::ellipseIntensity ( void  ) const

Definition at line 84 of file Statistic.cpp.

85{
86 return(_ellipseIntensity);
87}

◆ huInvariants()

double Magick::ChannelMoments::huInvariants ( const size_t  index_) const

Definition at line 89 of file Statistic.cpp.

90{
91 if (index_ > 7)
92 throw ErrorOption("Valid range for index is 0-7");
93
94 return(_huInvariants.at(index_));
95}

◆ isValid()

bool Magick::ChannelMoments::isValid ( ) const

Definition at line 97 of file Statistic.cpp.

98{
99 return(_channel != SyncPixelChannel);
100}

Member Data Documentation

◆ _centroidX

double Magick::ChannelMoments::_centroidX
private

Definition at line 72 of file Statistic.h.

◆ _centroidY

double Magick::ChannelMoments::_centroidY
private

Definition at line 73 of file Statistic.h.

◆ _channel

PixelChannel Magick::ChannelMoments::_channel
private

Definition at line 70 of file Statistic.h.

◆ _ellipseAngle

double Magick::ChannelMoments::_ellipseAngle
private

Definition at line 76 of file Statistic.h.

◆ _ellipseAxisX

double Magick::ChannelMoments::_ellipseAxisX
private

Definition at line 74 of file Statistic.h.

◆ _ellipseAxisY

double Magick::ChannelMoments::_ellipseAxisY
private

Definition at line 75 of file Statistic.h.

◆ _ellipseEccentricity

double Magick::ChannelMoments::_ellipseEccentricity
private

Definition at line 77 of file Statistic.h.

◆ _ellipseIntensity

double Magick::ChannelMoments::_ellipseIntensity
private

Definition at line 78 of file Statistic.h.

◆ _huInvariants

std::vector<double> Magick::ChannelMoments::_huInvariants
private

Definition at line 71 of file Statistic.h.


The documentation for this class was generated from the following files: