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

## Public Member Functions

| ImageStatistics (const ImageStatistics &imageStatistics_)
ChannelStatistics | channel (const PixelChannel channel_) const
| ImageStatistics (const Image &image_)

## Private Attributes

std::vector< ChannelStatistics > | _channels

## Detailed Description

Definition at line 282 of file Statistic.h.

## Constructor & Destructor Documentation

## ImageStatistics() [1/3]

Magick::ImageStatistics::ImageStatistics | ( | void |  | ) |

Definition at line 608 of file Statistic.cpp.

: _channels()
{
}

## ImageStatistics() [2/3]

Magick::ImageStatistics::ImageStatistics | ( | const ImageStatistics & | imageStatistics_ | ) |

Definition at line 613 of file Statistic.cpp.

: _channels(imageStatistics_._channels)
{
}

## ~ImageStatistics()

Magick::ImageStatistics::~ImageStatistics | ( | void |  | ) |

Definition at line 619 of file Statistic.cpp.

{
}

## ImageStatistics() [3/3]

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

Definition at line 635 of file Statistic.cpp.

: _channels()
{
MagickCore::ChannelStatistics*
channel_statistics;
GetPPException;
channel_statistics=GetImageStatistics(image_.constImage(),exceptionInfo);
if (channel_statistics != (MagickCore::ChannelStatistics *) 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::ChannelStatistics(channel,
&channel_statistics[channel]));
}
_channels.push_back(Magick::ChannelStatistics(CompositePixelChannel,
&channel_statistics[CompositePixelChannel]));
channel_statistics=(MagickCore::ChannelStatistics *) RelinquishMagickMemory(
channel_statistics);
}
ThrowPPException(image_.quiet());
}

## Member Function Documentation

## channel()

Magick::ChannelStatistics Magick::ImageStatistics::channel | ( | const PixelChannel | channel_ | ) | const

Definition at line 623 of file Statistic.cpp.

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

## Field Documentation

## _channels

std::vector<ChannelStatistics> Magick::ImageStatistics::_channels

private

Definition at line 304 of file Statistic.h.

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

- Statistic.h
- Statistic.cpp