8 #define MAGICKCORE_IMPLEMENTATION 1
9 #define MAGICK_PLUSPLUS_IMPLEMENTATION 1
20 _channel(UndefinedChannel),
26 _ellipseEccentricity(0.0),
27 _ellipseIntensity(0.0)
32 : _huInvariants(channelMoments_._huInvariants),
33 _channel(channelMoments_._channel),
34 _centroidX(channelMoments_._centroidX),
35 _centroidY(channelMoments_._centroidY),
36 _ellipseAxisX(channelMoments_._ellipseAxisX),
37 _ellipseAxisY(channelMoments_._ellipseAxisY),
38 _ellipseAngle(channelMoments_._ellipseAngle),
39 _ellipseEccentricity(channelMoments_._ellipseEccentricity),
40 _ellipseIntensity(channelMoments_._ellipseIntensity)
49 const MagickCore::ChannelMoments *channelMoments_)
52 _centroidX(channelMoments_->centroid.x),
53 _centroidY(channelMoments_->centroid.y),
54 _ellipseAxisX(channelMoments_->ellipse_axis.x),
55 _ellipseAxisY(channelMoments_->ellipse_axis.y),
56 _ellipseAngle(channelMoments_->ellipse_angle),
57 _ellipseEccentricity(channelMoments_->ellipse_eccentricity),
58 _ellipseIntensity(channelMoments_->ellipse_intensity)
64 _huInvariants.push_back(channelMoments_->I[i]);
84 return(_ellipseAxisX);
89 return(_ellipseAxisY);
94 return(_ellipseAngle);
99 return(_ellipseEccentricity);
104 return(_ellipseIntensity);
112 return(_huInvariants.at(index_));
121 : _channels(imageMoments_._channels)
130 const ChannelType channel_)
const
132 for (std::vector<ChannelMoments>::const_iterator it = _channels.begin();
133 it != _channels.end(); ++it)
135 if (it->channel() == channel_)
144 MagickCore::ChannelMoments*
148 channel_moments=GetImageChannelMoments(image_.
constImage(),exceptionInfo);
149 if (channel_moments != (MagickCore::ChannelMoments *) NULL)
156 &channel_moments[RedChannel]));
158 &channel_moments[GreenChannel]));
160 &channel_moments[BlueChannel]));
164 &channel_moments[CyanChannel]));
166 &channel_moments[MagentaChannel]));
168 &channel_moments[YellowChannel]));
170 &channel_moments[BlackChannel]));
174 &channel_moments[GrayChannel]));
177 if (image_.
constImage()->matte != MagickFalse)
179 &channel_moments[AlphaChannel]));
180 if (image_.
constImage()->colorspace != GRAYColorspace)
182 &channel_moments[CompositeChannels]));
183 channel_moments=(MagickCore::ChannelMoments *) RelinquishMagickMemory(
double huInvariants(const size_t index_) const
double ellipseIntensity(void) const
void quiet(const bool quiet_)
double ellipseAngle(void) const
double ellipseEccentricity(void) const
double ellipseAxisY(void) const
const MagickCore::Image * constImage(void) const
#define ThrowPPException(quiet)
double centroidY(void) const
ChannelType channel(void) const
double centroidX(void) const
ChannelMoments channel(const ChannelType channel_=CompositeChannels) const
double ellipseAxisX(void) const