|
From: Gustavo P. B. <gb...@us...> - 2005-04-05 22:49:27
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/hsvcm/features/angsecmom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5220/src/methods/hsvcm/features/angsecmom Added Files: Makefile.am angsecmom.cpp angsecmom.h kimageprocess_hsvcm_angsecmom.desktop Log Message: Adding the HSVCM features. They are not implemented yet (too much numbers to take care hehe) --- NEW FILE: kimageprocess_hsvcm_angsecmom.desktop --- [Desktop Entry] Name=AngSecMom Comment=Angular Second Moment calculation over HSV CO-Occurrence Matrix ServiceTypes=KImageProcess/Feature Type=Service X-KDE-Library=kimageprocess_hsvcm_angsecmom X-Category=hsvcm --- NEW FILE: Makefile.am --- INCLUDES = $(all_includes) -I$(srcdir)/../../../libkimageprocess METASOURCES = AUTO kde_module_LTLIBRARIES = kimageprocess_hsvcm_angsecmom.la kimageprocess_hsvcm_angsecmom_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) noinst_HEADERS = angsecmom.h kimageprocess_hsvcm_angsecmom_la_SOURCES = angsecmom.cpp kde_services_DATA = kimageprocess_hsvcm_angsecmom.desktop kimageprocess_hsvcm_angsecmom_la_LIBADD = $(top_builddir)/src/libkimageprocess/libkimageprocess.la \ -lkdeui --- NEW FILE: angsecmom.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 "angsecmom.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_angsecmom, KGenericFactory<KTHSVCMAngSecMom>( "kimageprocess_hsvcm_angsecmom" ) ) KTHSVCMAngSecMom::KTHSVCMAngSecMom(QObject *parent, const char* name, const QStringList&) : KTFeature() { //check dependencies m_featureName = i18n("AngSecMom"); m_longName = i18n("Angular Second Moment"); } KTHSVCMAngSecMom::~KTHSVCMAngSecMom() { } float KTHSVCMAngSecMom::calculate(KTImage *img, int direction) { int cmSize[3]; float ***cm = (float***) method()->data(direction); KTMethod *method = method(); cmSize[0] = method->dataSize(0); cmSize[1] = method->dataSize(1); cmSize[2] = method->dataSize(2); return 0.0; } #include "angsecmom.moc" --- NEW FILE: angsecmom.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_ANGSECMOM_H #define KIMAGEPROCESS_HSVCM_ANGSECMOM_H #include <ktfeature.h> class KAction; class KTImage; /** * AngSecMom calculation * @author Gustavo Pichorim Boiko * */ class KTHSVCMAngSecMom : public KTFeature { Q_OBJECT public: KTHSVCMAngSecMom(QObject *parent, const char *name, const QStringList&); ~KTHSVCMAngSecMom(); float calculate(KTImage *img, int direction); }; #endif |