Last change
on this file since 820 was 768, checked in by ansari, 26 years ago |
Reorganisation - PeidaInit() -> SophyaInit() - Reza 2/3/2000
|
File size:
747 bytes
|
Rev | Line | |
---|
[476] | 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"
|
---|
[768] | 9 | #include "skymapinit.h"
|
---|
| 10 |
|
---|
| 11 |
|
---|
[476] | 12 | int main()
|
---|
| 13 | {
|
---|
| 14 |
|
---|
| 15 | // ----- ATTENTION -------
|
---|
[768] | 16 | // Initialisation de Sophya
|
---|
[476] | 17 | // A faire au debut de main()
|
---|
[768] | 18 | SophyaInit();
|
---|
| 19 |
|
---|
[573] | 20 | ImageR4 img(20, 10);
|
---|
| 21 | r_4 compt=0;
|
---|
[476] | 22 | for(int i=0; i<20; i++)
|
---|
| 23 | {
|
---|
| 24 | for(int j=0; j<10; j++)
|
---|
| 25 | {
|
---|
[573] | 26 | compt+=1.;
|
---|
| 27 | img(i,j) =compt+0.6;
|
---|
[476] | 28 | }
|
---|
| 29 | }
|
---|
| 30 | img.CheckDyn();
|
---|
| 31 | img.Print();
|
---|
| 32 | img.PrintImage();
|
---|
| 33 | FitsIoServer fserv;
|
---|
| 34 | fserv.save(img,"image.fits");
|
---|
[573] | 35 | ImageI4 img2(20, 10);
|
---|
[476] | 36 | fserv.load(img2,"image.fits");
|
---|
| 37 | img2.Print();
|
---|
| 38 | img2.PrintImage();
|
---|
| 39 |
|
---|
| 40 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.