本文整理汇总了C++中MyImage::getImage方法的典型用法代码示例。如果您正苦于以下问题:C++ MyImage::getImage方法的具体用法?C++ MyImage::getImage怎么用?C++ MyImage::getImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MyImage
的用法示例。
在下文中一共展示了MyImage::getImage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: preProcessImage
MyImage ReverseProcessor::preProcessImage(const MyImage& image) const
{
QImage *resultImage = ImageAlgorithm::reverse(image.getImage());
MyImage result(*resultImage, image.getType());
delete resultImage;
return result;
}
示例2: preProcessImage
MyImage HistogramEqualizationProcessor::preProcessImage(const MyImage& image) const
{
QImage *resultImage = processImage(image.getImage());
MyImage result(*resultImage, MyImage::Gray);
delete resultImage;
return result;
}
示例3: preProcessImage
MyImage ToGrayProcessor::preProcessImage(const MyImage& image) const
{
QImage *resultImage = ImageAlgorithm::convertToGrayScale(image.getImage(),
_type);
MyImage result(*resultImage, MyImage::Gray);
delete resultImage;
return result;
}
示例4: QDialog
ToBlackAndWhiteDialog::ToBlackAndWhiteDialog(const MyImage& image,
const Area& area,
QWidget *parent) :
QDialog(parent),
ui(new Ui::ToBlackAndWhiteDialog),
_area(area)
{
ui->setupUi(this);
_image = image.getImage();
changing = false;
single = true;
black = true;
singleThreshold = 0;
thresholdItem = new ThresholdItem();
plot = new BasicStatisticPlot(
ImageAlgorithm::getStatistic(image.getImage(), ImageAlgorithm::Green));
ui->widget_2->layout()->addWidget(plot);
plot->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
thresholdItem->attach(plot);
QVector<int> thresholds;
thresholds.push_back(0);
thresholdItem->setThresholds(thresholds);
connect(thresholdItem,
SIGNAL(thresholdChanged(QVector<int>)),
this,
SLOT(multipleChanged(QVector<int>)));
xPlotPicker = new XPlotPicker(QwtPlot::xBottom,
QwtPlot::yLeft,
QwtPlotPicker::VLineRubberBand,
QwtPicker::AlwaysOn,
plot->canvas());
xPlotPicker->setRubberBandPen(QColor(0, 0, 255, 160));
xPlotPicker->setTrackerPen(QColor(0, 0, 255, 160));
xPlotPicker->setEnabled(true);
connect(xPlotPicker, SIGNAL(pressAt(int)), this, SLOT(singleChanged(int)));
connect(ui->thresholdSpinBox,
SIGNAL(valueChanged(int)),
this,
SLOT(singleChanged(int)));
marker = new QwtPlotMarker();
marker->setValue(0.0, 0.0);
marker->setLineStyle(QwtPlotMarker::VLine);
marker->setLabelAlignment(Qt::AlignRight | Qt::AlignBottom);
marker->setLinePen(QPen(Qt::green, 0, Qt::DashDotLine));
marker->attach(plot);
connect(ui->thresholdsEdit,
SIGNAL(textEdited(QString)),
this,
SLOT(multipleTextChanged(QString)));
connect(ui->blackButton,
SIGNAL(toggled(bool)),
this,
SLOT(startWithBlack(bool)));
connect(ui->whiteButton,
SIGNAL(toggled(bool)),
this,
SLOT(startWithWhite(bool)));
resetPreview();
}