single_image_call.hpp 1.02 KB
Newer Older
1 2 3 4 5 6 7
#ifndef CVVISUAL_SINGLE_IMAGE_CALL_HPP
#define CVVISUAL_SINGLE_IMAGE_CALL_HPP

#include "call.hpp"

#include <QString>

Maksim Shabunin's avatar
Maksim Shabunin committed
8
#include "opencv2/core.hpp"
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55

namespace cvv
{
namespace impl
{

/**
 * All data of a filter-call: Location, original image and result.
 */
class SingleImageCall : public Call
{
      public:
	/**
	 * @brief Constructs a SingleImageCall.
	 */
	SingleImageCall(cv::InputArray img, impl::CallMetaData data,
	                QString type, QString description,
	                QString requestedView);

	size_t matrixCount() const override
	{
		return 1;
	}
	const cv::Mat &matrixAt(size_t index) const override;

	/**
	 * @returns the original image
	 */
	const cv::Mat &mat() const
	{
		return img;
	}

      private:
	cv::Mat img;
};

/**
 * Constructs a SingleImageCall and adds it to the global data-controller.
 */
void debugSingleImageCall(cv::InputArray img, const CallMetaData &data,
                          const char *description, const char *view,
                          const char *filter);
}
} // namespaces

#endif