Loading...
Searching...
No Matches
Magick::ImageMoments Class Reference

## Public Member Functions

| ImageMoments (const ImageMoments &imageMoments_)
ChannelMoments | channel (const PixelChannel channel_) const
| ImageMoments (const Image &image_)

## Private Attributes

std::vector< ChannelMoments > | _channels

## Detailed Description

Definition at line 219 of file Statistic.h.

## Constructor & Destructor Documentation

## ImageMoments() [1/3]

Magick::ImageMoments::ImageMoments | ( | void |  | ) |

Definition at line 427 of file Statistic.cpp.

: _channels()
{
}

## ImageMoments() [2/3]

Magick::ImageMoments::ImageMoments | ( | const ImageMoments & | imageMoments_ | ) |

Definition at line 432 of file Statistic.cpp.

: _channels(imageMoments_._channels)
{
}

## ~ImageMoments()

Magick::ImageMoments::~ImageMoments | ( | void |  | ) |

Definition at line 437 of file Statistic.cpp.

{
}

## ImageMoments() [3/3]

Magick::ImageMoments::ImageMoments | ( | const Image & | image_ | ) |

Definition at line 453 of file Statistic.cpp.

: _channels()
{
MagickCore::ChannelMoments*
channel_moments;
GetPPException;
channel_moments=GetImageMoments(image_.constImage(),exceptionInfo);
if (channel_moments != (MagickCore::ChannelMoments *) NULL)
{
ssize_t
i;
for (i=0; i < (ssize_t) GetPixelChannels(image_.constImage()); i++)
{
PixelChannel channel=GetPixelChannelChannel(image_.constImage(),i);
PixelTrait traits=GetPixelChannelTraits(image_.constImage(),channel);
if (traits == UndefinedPixelTrait)
continue;
if ((traits & UpdatePixelTrait) == 0)
continue;
_channels.push_back(Magick::ChannelMoments(channel,
&channel_moments[channel]));
}
_channels.push_back(Magick::ChannelMoments(CompositePixelChannel,
&channel_moments[CompositePixelChannel]));
channel_moments=(MagickCore::ChannelMoments *) RelinquishMagickMemory(
channel_moments);
}
ThrowPPException(image_.quiet());
}

## Member Function Documentation

## channel()

Magick::ChannelMoments Magick::ImageMoments::channel | ( | const PixelChannel | channel_ | ) | const

Definition at line 441 of file Statistic.cpp.

{
for (std::vector<ChannelMoments>::const_iterator it = _channels.begin();
it != _channels.end(); ++it)
{
if (it->channel() == channel_)
return(*it);
}
return(ChannelMoments());
}

## Field Documentation

## _channels

std::vector<ChannelMoments> Magick::ImageMoments::_channels

private

Definition at line 241 of file Statistic.h.

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

- Statistic.h
- Statistic.cpp