Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

omg_pseudocolour.cpp

Go to the documentation of this file.
00001 /**************************************************************************
00002  *   Copyright (C) 2005 by Tim Sutton   *
00003  *   tim@linfiniti.com   *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #include <omggdal.h>
00021 #include <QFileInfo>
00022 #include <QDir>
00023 #include <QString>
00024 #include <QDebug>
00025 int main(int argc, char *argv[])
00026 {
00027   printf("Started with : %s\n",argv[1]);
00028 
00029   QString myInputFileName(argv[1]);
00030   //save a nice looking png of the image to disk
00031   OmgGdal myGdal;
00032   QFileInfo myFileInfo(myInputFileName);
00033   //get the raw wild name but without its extension
00034   QString myBaseName=myFileInfo.dir().absolutePath()+QDir::separator()+myFileInfo.baseName();
00035   QString myOutputFileName (myBaseName+".png");
00036   //convert tif generated by om to pseudocolor png
00037   qDebug("Calling omggdal::writeImage(" +  myInputFileName.toLocal8Bit() + ","
00038       + myOutputFileName.toLocal8Bit()+")");
00039   myGdal.writeImage(myInputFileName,myOutputFileName);
00040 
00041 
00042   return EXIT_SUCCESS;
00043 }
00044 
00045 

Generated on Mon Apr 28 15:06:40 2008 for openModellerDesktop by  doxygen 1.4.1-20050210