FotoSHOCK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
BWconversion/BWconversion.hpp

This is an example of how to declare an ImageOperation that converts image to grayscale using the transformImage() function.

/*
* Copyright 2011, 2012 Lukas Jirkovsky
*
* This file is part of FotoSHOCK.
*
* FotoSHOCK is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3 of the License.
*
* FotoSHOCK is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with FotoSHOCK. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BWCONVERSION_H
#define BWCONVERSION_H
#include <ImageOperation.hpp>
using namespace FotoSHOCKcore;
class BWconversion : public ImageOperation {
public:
virtual void runOperation (const Inputs& sources, const Outputs& dest, vector<UpdateInfo>& ROI, const long stamp);
};
public:
virtual const char* name() {return "B/W Conversion.";}
virtual const char* description() {return "Converts an image to grayscale.";}
virtual ImageOperation* operation() {return new BWconversion;}
};
#endif