示例#1
0
CSMDoc::Operation::Operation (int type, bool ordered, bool finalAlways)
: mType (type), mStages(std::vector<std::pair<Stage *, int> >()), mCurrentStage(mStages.begin()),
  mCurrentStep(0), mCurrentStepTotal(0), mTotalSteps(0), mOrdered (ordered),
  mFinalAlways (finalAlways), mError(false)
{
    connect (this, SIGNAL (finished()), this, SLOT (operationDone()));
}
void OperationsController::showSelectedPreview(cv::Mat result)
{
	cv::Mat image;
	if(result.type() == CV_8U)
		cv::cvtColor(result, image, CV_GRAY2RGB);
	else
		cv::cvtColor(result, image, CV_BGR2RGB);

	QImage img = QImage((const unsigned char*)(image.data),
			 image.cols, image.rows, image.step, QImage::Format_RGB888);
	emit operationDone(img);
}
示例#3
0
CSMDoc::Operation::Operation (int type, bool ordered, bool finalAlways)
: mType (type), mOrdered (ordered), mFinalAlways (finalAlways)
{
    connect (this, SIGNAL (finished()), this, SLOT (operationDone()));
}