|
From: Gustavo P. B. <gb...@us...> - 2005-04-05 22:49:27
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/hsvcm/features/contrast In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5220/src/methods/hsvcm/features/contrast Added Files: Makefile.am contrast.cpp contrast.h kimageprocess_hsvcm_contrast.desktop Log Message: Adding the HSVCM features. They are not implemented yet (too much numbers to take care hehe) --- NEW FILE: kimageprocess_hsvcm_contrast.desktop --- [Desktop Entry] Name=Contrast Comment=Contrast calculation over HSV CO-Occurrence Matrix ServiceTypes=KImageProcess/Feature Type=Service X-KDE-Library=kimageprocess_hsvcm_contrast X-Category=hsvcm --- NEW FILE: contrast.cpp --- /*************************************************************************** * Copyright (C) 2004 by * * Gustavo Pichorim Boiko <gus...@kd...> * * Herton Ronaldo Krzesinski <he...@my...> * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program 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 General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "contrast.h" #include <kgenericfactory.h> #include <kaction.h> #include <klocale.h> #include <kdebug.h> #include <ktimage.h> #include <ktfeaturemanager.h> K_EXPORT_COMPONENT_FACTORY( kimageprocess_hsvcm_contrast, KGenericFactory<KTHSVCMContrast>( "kimageprocess_hsvcm_contrast" ) ) KTHSVCMContrast::KTHSVCMContrast(QObject *parent, const char* name, const QStringList&) : KTFeature() { //check dependencies m_featureName = i18n("Contrast"); m_longName = i18n("Contrast"); } KTHSVCMContrast::~KTHSVCMContrast() { } float KTHSVCMContrast::calculate(KTImage *img, int direction) { int cmSize[3]; float ***cm = (float***) method()->data(direction); cmSize[0] = method->dataSize(0); cmSize[1] = method->dataSize(1); cmSize[2] = method->dataSize(2); return 0.0; } #include "contrast.moc" --- NEW FILE: Makefile.am --- INCLUDES = $(all_includes) -I$(srcdir)/../../../libkimageprocess METASOURCES = AUTO kde_module_LTLIBRARIES = kimageprocess_hsvcm_contrast.la kimageprocess_hsvcm_contrast_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) noinst_HEADERS = contrast.h kimageprocess_hsvcm_contrast_la_SOURCES = contrast.cpp kde_services_DATA = kimageprocess_hsvcm_contrast.desktop kimageprocess_hsvcm_contrast_la_LIBADD = $(top_builddir)/src/libkimageprocess/libkimageprocess.la \ -lkdeui --- NEW FILE: contrast.h --- /*************************************************************************** * Copyright (C) 2004 by * * Gustavo Pichorim Boiko <gus...@kd...> * * Herton Ronaldo Krzesinski <he...@my...> * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program 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 General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef KIMAGEPROCESS_HSVCM_CONTRAST_H #define KIMAGEPROCESS_HSVCM_CONTRAST_H #include <ktfeature.h> class KAction; class KTImage; /** * Contrast calculation * @author Gustavo Pichorim Boiko * */ class KTHSVCMContrast : public KTFeature { Q_OBJECT public: KTHSVCMContrast(QObject *parent, const char *name, const QStringList&); ~KTHSVCMContrast(); float calculate(KTImage *img, int direction); }; #endif |