Line | |
---|
1 | // Utilisation des flots d'entree-sortie C++
|
---|
2 | #include <iostream.h>
|
---|
3 | // Utilisation de la classe Image<T>
|
---|
4 | #include "outilsinit.h"
|
---|
5 | #include "cimage.h"
|
---|
6 | // Utilisation des generateurs aleatoires
|
---|
7 | #include "nbrandom.h"
|
---|
8 | #include "fitsioserver.h"
|
---|
9 | int main()
|
---|
10 | {
|
---|
11 |
|
---|
12 | // ----- ATTENTION -------
|
---|
13 | // Initialisation de Peida
|
---|
14 | // A faire au debut de main()
|
---|
15 | PeidaInit();
|
---|
16 | ImageI4 img(20, 10);
|
---|
17 | int_4 compt=0;
|
---|
18 | for(int i=0; i<20; i++)
|
---|
19 | {
|
---|
20 | for(int j=0; j<10; j++)
|
---|
21 | {
|
---|
22 | compt+=1;
|
---|
23 | img(i,j) =compt;
|
---|
24 | }
|
---|
25 | }
|
---|
26 | img.CheckDyn();
|
---|
27 | img.Print();
|
---|
28 | img.PrintImage();
|
---|
29 | FitsIoServer fserv;
|
---|
30 | fserv.save(img,"image.fits");
|
---|
31 | ImageR4 img2(20, 10);
|
---|
32 | fserv.load(img2,"image.fits");
|
---|
33 | img2.Print();
|
---|
34 | img2.PrintImage();
|
---|
35 |
|
---|
36 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.