Allink  v0.1
DrEffect.h
1 #ifndef DREFFECT_H
2 #define DREFFECT_H
3 
4 #include <qapplication.h>
5 #include <qwidget.h>
6 #include <qtimer.h>
7 #include <qpainter.h>
8 #include <qpixmap.h>
9 #include <qdatetime.h>
10 #include <qslider.h>
11 #include <qlabel.h>
12  //#include <qvbox.h>
13 #include <Q3VBox>
14 #include <stdlib.h>
15 #include <math.h>
16 #include <qerrormessage.h>
17 #include <qmessagebox.h>
18 #include <qstatusbar.h>
19  //#include <qpointarray.h>
20 #include <Q3PointArray>
21 #include <qimage.h>
22 #include <qpixmap.h>
23 #include <qevent.h>
24 #include <qprinter.h>
25  //#include <qpaintdevicemetrics.h>
26 #include <Q3PaintDeviceMetrics>
27 #include <Q3ButtonGroup>
28 #include <QGLWidget>
29 #include <QLineEdit>
30  //#include <QMenuBar>
31 #include "../include/Matematica.h"
32 #include "../include/Draw.h"
33 #include "../include/VarDatFile.h"
34 
35 class DrEffect:public Draw{
36  private:
37  public:
38  DrEffect();
40  void EffectFilter();
42  void EffectMotion();
44  void EffectMC();
46  void EffectCoarseGrain(int Grana);
48  void EffectIncrease();
50  void Run();
51  void Initialize();
52  void Histo();
53  void NablaPhi();
54  void BlackWhite();
55  void DReshape(int weight,int height);
56  void DrEkeyboard(unsigned char key);
57  void PrintIntensity();
58  int Contrast();
59  int Binary(int Mode);
60  int Noise(unsigned char *Picture,unsigned char *OutPicture,int width,int height);
61  int SwapBlocks(unsigned char *Picture,unsigned char *OutPicture,int width,int height,PERMUTE *Perm,int NGridw,int NGridh,int *Sequence1,int NPartition);
62  int ShiftBlocks(unsigned char *Picture,unsigned char *OutPicture,int width,int height,int *Sequence,int NGridw,int NGridh,int *Sequence1,int NPartition);
63  int Discretize(unsigned char *Picture,unsigned char *OutPicture,int ImWidth,int ImHeight,int WWidth,int WHeight,int Blockw,int Blokh);
64  int Edges(unsigned char *Picture,unsigned char *OutPicture,int width,int height);
65  int IncreaseResolution(unsigned char *Picture,unsigned char *OutPicture,int ImWidth,int ImHeight,int Times);
66  int BuffSize(){return ImWidth*ImHeight;};
67  int NChar;
68  Matematica *Mat;
69  unsigned char Median[4];
70  unsigned char Quart1[4];
71  unsigned char Quart3[4];
72  double **Hist;
73  double **Phi;
74  int **Patch;
75 };
76 class Animation : public QGLWidget
77 {
78  Q_OBJECT
79  public slots:
80  void setXRotation(int angle);
81  void setYRotation(int angle);
82  void setZRotation(int angle);
83  void NomeFile(const QString &);
84  void NomeFile(char *ExtName);
85  void Open();
86  void Filter();
87  void Motion();
88  void Run();
89  void FilterMC();
90  void ImpGrana(int Grana);
91  void FilterCoarseGrain();
92  void FilterIncrease();
93  void FilterContrast();
94  void Histo();
95  void NablaPhi();
96  void BlackWhite();
97  void Binary();
98  void Punta();
99  void IncrSlide();
100  signals:
101  void xRotationChanged(int angle);
102  void yRotationChanged(int angle);
103  void zRotationChanged(int angle);
104  void PuntaCoord(VarDatFile *v1);
105  void PuntaCoord(double **,int,int,int);
106  public:
107  Animation(QWidget *parent);
108  void InitConstant();
109  void Menu();
110  void Particle();
111  void keyboard(unsigned char key, int x, int y);
112  VarDatFile *v1;
113  double **st;
114  private:
115  void DrMessage(const char * s, ...);
116  char *FileName;
117  double ScaleUn;
118  double Edge[3];
119  int xRot;
120  int yRot;
121  int zRot;
122  int Grana;
123  int Slide;
124  int NMass;
125  int NVar;
126  int Valori;
127  QPoint lastPos;
128  int MainWindow;
129  protected:
130  virtual void initializeGL();
131  virtual void paintEvent(QPaintEvent (event));
132  virtual void paintGL();
133  virtual void resizeGL(int width,int height);
134  void mousePressEvent(QMouseEvent *event);
135  void mouseMoveEvent(QMouseEvent *event);
136 };
137 
138 
139 
140 
141 #endif//DREFFECT
Draw provides the basic configuration of the openGL libraries used in every derived program...
Definition: Draw.h:15
void Run()
Create an animation.
Definition: DrOpenGL.cpp:15
void EffectCoarseGrain(int Grana)
Defocus the images in blocks.
Definition: DrOpenGL.cpp:94
Indices for the permutation.
int Picture()
Write a tiff file of the data in pixel.
Definition: DrawFile.cpp:183
void EffectMotion()
Shifting of pixels.
Definition: DrOpenGL.cpp:197
int ImWidth
Width and height of the image.
Definition: Draw.h:153
int MainWindow
Refers to optional different windows.
Definition: Draw.h:226
void EffectMC()
Applies a random disposition of blocks.
Definition: DrOpenGL.cpp:68
void InitConstant()
Initializes all the view constants.
void Initialize()
Definition: DrDefinition.cpp:3
void EffectFilter()
Applies a filter to pixel.
Definition: DrOpenGL.cpp:168
Reads and stores a data file to be elaborated via Matematica.
Definition: VarDatFile.h:26
void EffectIncrease()
Increase the resolution.
Definition: DrOpenGL.cpp:54
Implementation of useful algorythms.
Definition: Matematica.h:76
double Edge[3]
Box size.
Definition: Draw.h:262