Tengo Linux SUSE y necesito instalar un programaa de elmentos fini tas para
micoestructuras llamado OOF , con la version OOF2-2.0.4 , no he podido y no se
si son los requerimientos o que otro problema tiene , pero al tratar de
compilar me aparecen los siguientes errores :
ERROR:
[EMAIL PROTECTED]:~/oof2-2.0.4> python setup.py build --blas-libraries="lapack
blas gfortran m"
> /home/andres/error_oof2.txt
In file included from ./SRC/image/oofimage.C:19:
SRC/image/oofimage.h:210:3: warning: no newline at end of file
In file included from ./SRC/image/oofimage.C:19:
SRC/image/oofimage.h:46: error: ‘Magick’ has not been declared
SRC/image/oofimage.h:46: error: ISO C++ forbids declaration of ‘Image’ with no
type
SRC/image/oofimage.h:46: error: expected ‘;’ before ‘image’
SRC/image/oofimage.h:55: error: expected ‘,’ or ‘...’ before ‘::’ token
SRC/image/oofimage.h:55: error: ISO C++ forbids declaration of ‘Magick’ with no
type
SRC/image/oofimage.h:58: error: expected ‘,’ or ‘...’ before ‘::’ token
SRC/image/oofimage.h:59: error: ISO C++ forbids declaration of ‘Magick’ with no
type
SRC/image/oofimage.h:62: error: ‘Magick’ has not been declared
SRC/image/oofimage.h:62: error: ISO C++ forbids declaration of ‘Geometry’ with
no type
SRC/image/oofimage.h:62: error: expected ‘;’ before ‘geometry’
SRC/image/oofimage.h:64: error: expected `;' before ‘const’
SRC/image/oofimage.h:210: error: expected unqualified-id before ‘[’ token
error: command 'gcc' failed with exit status 1
PROGRAMA :
#include <oofconfig.h>
#ifndef OOFIMAGE_H
#define OOFIMAGE_H
#include <Python.h>
#include "common/abstractimage.h"
#include "common/array.h"
#include "common/ccolor.h"
#include "common/colordifference.h"
#include "common/coord.h"
#include "common/ooferror.h"
#include "common/timestamp.h"
#include <string>
#include <vector>
//#include "/usr/include/magick/Magick++.h"
#include <Magick++.h>
class BitmapOverlay;
class BoolArray;
class DoubleArray;
class CMicrostructure;
class StringImage;
class OOFImageIterator;
class ConstOOFImageIterator;
/*----------*/
class OOFImage : public AbstractImage {
protected:
std::string name_;
Magick::Image image;
Coord size_;
ICoord sizeInPixels_; // width, height.
double scale; // converts from int rgb to doubles in [0,1]
void setup();
TimeStamp timestamp;
CMicrostructure *microstructure;
public:
OOFImage(const std::string &nm);
OOFImage(const std::string &nm, const Coord &sz, const Magick::Geometry &g);
OOFImage(const std::string &nm, const std::string &filename);
OOFImage(const std::string &nm, const ICoord&,
const std::string &colortype, const Magick::StorageType,
const void*);
OOFImage(const OOFImage&);
virtual ~OOFImage();
void save(const std::string &filename);\
const Magick::Geometry geometry() const { return image.size(); }
const std::string &name() const { return name_; }
void rename(const std::string &nm) { name_ = nm; }
void setSize(const Coord*);
virtual const Coord &size() const { return size_; }
virtual const ICoord &sizeInPixels() const { return sizeInPixels_; }
ICoord pixelFromPoint(const Coord*) const;
bool pixelInBounds(const ICoord*) const;
std::string comment() const;
void setMicrostructure(CMicrostructure *ms) { microstructure = ms; }
CMicrostructure *getCMicrostructure() const { return microstructure; }
void removeMicrostructure() { microstructure = 0; }
typedef OOFImageIterator iterator;
typedef ConstOOFImageIterator const_iterator;
iterator begin();
const_iterator begin() const;
iterator end();
const_iterator end() const;
const CColor operator[](const ICoord &c) const;
// Version taking ICoord* arg is provided for use in SWIG typemaps.
const CColor operator[](const ICoord *c) const { return operator[](*c); }
// Since OOFImage isn't actually made up of CColors, it's hard to
// use operator[] to set values. Use this instead:
void set(const ICoord&, const CColor&);
void imageChanged(); // call this when done setting pixels.
// Convert to an Array of doubles. f is a function that takes a
// CColor and returns a double.
Array<double> convert(double (*f)(const CColor&)) const;
// Same for ints and bools.
Array<int> convert(int (*f)(const CColor&)) const;
Array<bool> convert(bool (*f)(const CColor&)) const;
// Set pixels in the image to values from an array. These call imageChanged()
void set(const Array<double> &array, CColor (*f)(double));
void set(const Array<int> &array, CColor (*f)(int));
void set(const Array<bool> &array, CColor (*f)(bool));
virtual void fillstringimage(StringImage*) const;
OOFImage *clone(const std::string &name) const;
void getColorPoints(const CColor &reference,
const ColorDifference &diff,
BoolArray &selected) const;
bool compare(const OOFImage&, double) const;
std::vector<unsigned short> *getPixels();
void flip(const std::string &axis);
void fade(double);
void dim(double);
TimeStamp *getTimeStamp() { return ×tamp }
// ImageMagick effects
void blur(double radius, double sigma);
void contrast(bool sharpen);
void despeckle();
void edge(double);
void enhance();
void equalize();
void medianFilter(double);
void negate(bool);
void normalize();
void reduceNoise(double);
void sharpen(double, double);
void gray();
void evenly_illuminate(int windowsize);
};
OOFImage *newImageFromData(const std::string &name,
const ICoord *isize,
const std::vector<unsigned short> *data);
// Parallel image send/recv
#ifdef HAVE_MPI
void _Send_Image(OOFImage*, std::vector<int>*, int);
OOFImage *_Recv_Image(int, int);
#endif //HAVE_MPI
//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//
class ImageMagickError : public ErrErrorBase<ImageMagickError> {
std::string msg;
public:
ImageMagickError(const std::string&);
virtual std::string pythonequiv() const {
return "ImageMagickError('" + msg + "')";
}
std::string message() const { return msg; }
};
//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//
class OOFImageIterator {
private:
OOFImageIterator(OOFImage ℑ, int pos)
: pos(pos), image(image)
{}
int pos;
OOFImage ℑ
public:
void operator++() { pos++; }
CColor operator*() const { return image[coord()]; }
ICoord coord() const;
friend class OOFImage;
friend bool operator==(const OOFImageIterator&, const
----- Mensaje original -----
De Andres Ricardo Galvis Escobar <[EMAIL PROTECTED]>
Fecha Sun, 11 Nov 2007 13:40:23 -0500
A [EMAIL PROTECTED]
Asunto C++
Buenas Alfonso , soyAndres el sobrino de Alfredo Escobar y amigo de Miguel ,
como habalmos aca le mando
el problema de C++ que tengo con el programa que le mencione por favor mire de
que trata bien por que el
error dice como que no se ha declarado una variabl pero nose como hacerlo , le
adjunto el error y el codigo
fuente del programa , muchisimas gracias
ERROR:
[EMAIL PROTECTED]:~/oof2-2.0.4> python setup.py build --blas-libraries="lapack
blas gfortran m"
> /home/andres/error_oof2.txt
In file included from ./SRC/image/oofimage.C:19:
SRC/image/oofimage.h:210:3: warning: no newline at end of file
In file included from ./SRC/image/oofimage.C:19:
SRC/image/oofimage.h:46: error: ‘Magick’ has not been declared
SRC/image/oofimage.h:46: error: ISO C++ forbids declaration of ‘Image’ with no
type
SRC/image/oofimage.h:46: error: expected ‘;’ before ‘image’
SRC/image/oofimage.h:55: error: expected ‘,’ or ‘...’ before ‘::’ token
SRC/image/oofimage.h:55: error: ISO C++ forbids declaration of ‘Magick’ with no
type
SRC/image/oofimage.h:58: error: expected ‘,’ or ‘...’ before ‘::’ token
SRC/image/oofimage.h:59: error: ISO C++ forbids declaration of ‘Magick’ with no
type
SRC/image/oofimage.h:62: error: ‘Magick’ has not been declared
SRC/image/oofimage.h:62: error: ISO C++ forbids declaration of ‘Geometry’ with
no type
SRC/image/oofimage.h:62: error: expected ‘;’ before ‘geometry’
SRC/image/oofimage.h:64: error: expected `;' before ‘const’
SRC/image/oofimage.h:210: error: expected unqualified-id before ‘[’ token
error: command 'gcc' failed with exit status 1
PROGRAMA :
#include <oofconfig.h>
#ifndef OOFIMAGE_H
#define OOFIMAGE_H
#include <Python.h>
#include "common/abstractimage.h"
#include "common/array.h"
#include "common/ccolor.h"
#include "common/colordifference.h"
#include "common/coord.h"
#include "common/ooferror.h"
#include "common/timestamp.h"
#include <string>
#include <vector>
//#include "/usr/include/magick/Magick++.h"
#include <Magick++.h>
class BitmapOverlay;
class BoolArray;
class DoubleArray;
class CMicrostructure;
class StringImage;
class OOFImageIterator;
class ConstOOFImageIterator;
/*----------*/
class OOFImage : public AbstractImage {
protected:
std::string name_;
Magick::Image image;
Coord size_;
ICoord sizeInPixels_; // width, height.
double scale; // converts from int rgb to doubles in [0,1]
void setup();
TimeStamp timestamp;
CMicrostructure *microstructure;
public:
OOFImage(const std::string &nm);
OOFImage(const std::string &nm, const Coord &sz, const Magick::Geometry &g);
OOFImage(const std::string &nm, const std::string &filename);
OOFImage(const std::string &nm, const ICoord&,
const std::string &colortype, const Magick::StorageType,
const void*);
OOFImage(const OOFImage&);
virtual ~OOFImage();
void save(const std::string &filename);\
const Magick::Geometry geometry() const { return image.size(); }
const std::string &name() const { return name_; }
void rename(const std::string &nm) { name_ = nm; }
void setSize(const Coord*);
virtual const Coord &size() const { return size_; }
virtual const ICoord &sizeInPixels() const { return sizeInPixels_; }
ICoord pixelFromPoint(const Coord*) const;
bool pixelInBounds(const ICoord*) const;
std::string comment() const;
void setMicrostructure(CMicrostructure *ms) { microstructure = ms; }
CMicrostructure *getCMicrostructure() const { return microstructure; }
void removeMicrostructure() { microstructure = 0; }
typedef OOFImageIterator iterator;
typedef ConstOOFImageIterator const_iterator;
iterator begin();
const_iterator begin() const;
iterator end();
const_iterator end() const;
const CColor operator[](const ICoord &c) const;
// Version taking ICoord* arg is provided for use in SWIG typemaps.
const CColor operator[](const ICoord *c) const { return operator[](*c); }
// Since OOFImage isn't actually made up of CColors, it's hard to
// use operator[] to set values. Use this instead:
void set(const ICoord&, const CColor&);
void imageChanged(); // call this when done setting pixels.
// Convert to an Array of doubles. f is a function that takes a
// CColor and returns a double.
Array<double> convert(double (*f)(const CColor&)) const;
// Same for ints and bools.
Array<int> convert(int (*f)(const CColor&)) const;
Array<bool> convert(bool (*f)(const CColor&)) const;
// Set pixels in the image to values from an array. These call imageChanged()
void set(const Array<double> &array, CColor (*f)(double));
void set(const Array<int> &array, CColor (*f)(int));
void set(const Array<bool> &array, CColor (*f)(bool));
virtual void fillstringimage(StringImage*) const;
OOFImage *clone(const std::string &name) const;
void getColorPoints(const CColor &reference,
const ColorDifference &diff,
BoolArray &selected) const;
bool compare(const OOFImage&, double) const;
std::vector<unsigned short> *getPixels();
void flip(const std::string &axis);
void fade(double);
void dim(double);
TimeStamp *getTimeStamp() { return ×tamp; }
// ImageMagick effects
void blur(double radius, double sigma);
void contrast(bool sharpen);
void despeckle();
void edge(double);
void enhance();
void equalize();
void medianFilter(double);
void negate(bool);
void normalize();
void reduceNoise(double);
void sharpen(double, double);
void gray();
void evenly_illuminate(int windowsize);
};
OOFImage *newImageFromData(const std::string &name,
const ICoord *isize,
const std::vector<unsigned short> *data);
// Parallel image send/recv
#ifdef HAVE_MPI
void _Send_Image(OOFImage*, std::vector<int>*, int);
OOFImage *_Recv_Image(int, int);
#endif //HAVE_MPI
//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//
class ImageMagickError : public ErrErrorBase<ImageMagickError> {
std::string msg;
public:
ImageMagickError(const std::string&);
virtual std::string pythonequiv() const {
return "ImageMagickError('" + msg + "')";
}
std::string message() const { return msg; }
};
//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//=\\=//
class OOFImageIterator {
private:
OOFImageIterator(OOFImage &image, int pos)
: pos(pos), image(image)
{}
int pos;
OOFImage ℑ
public:
void operator++() { pos++; }
CColor operator*() const { return image[coord()]; }
ICoord coord() const;
friend class OOFImage;
friend bool operator==(const OOFImageIterator&, const OOFImageIterator&);
friend bool operator!=(const OOFImageIterator&, const OOFImageIterator&);
};
class ConstOOFImageIterator {
private:
ConstOOFImageIterator(const OOFImage &image, int pos)
: pos(pos), image(image)
{}
int pos;
const OOFImage ℑ
public:
void operator++() { pos++; }
const CColor operator*() const { return image[coord()]; }
ICoord coord() const;
friend class OOFImage;
friend bool operator==(const ConstOOFImageIterator&,
const ConstOOFImageIterator&);
friend bool operator!=(const ConstOOFImageIterator&,
const ConstOOFImageIterator&);
};
OOFImage makeNewImage(const std::string &name,const ICoord*); /////////////////
double color2gray(const CColor&);
CColor gray2color(double);
CColor bool2color(bool);
CColor int2color(int);
DoubleArray grayify(const OOFImage& image);
void setFromBool(OOFImage&, const BoolArray&);
BoolArray threshold(const DoubleArray&, double);
#endif // OOFIMAGE_H
[B
Le agradeceria a alguien que tenga idea sobre este programa que me ayude porque
no se que hacer y lo necesito instalado con mucha urgencia , gracias
_______________________________________________
Lista de correo del Grupo GNU/Linux de la Universidad del Cauca, Colombia
[email protected]
http://listas.el-directorio.org/cgi-bin/mailman/listinfo/gluc
Página principal del GLUC:
http://gluc.unicauca.edu.co