Last change
on this file since 2586 was 2322, checked in by cmv, 23 years ago |
- passage xxstream.h en xxstream
- compile avec gcc_3.2, gcc_2.96 et cxx
En 3.2 le seek from ::end semble marcher (voir Eval/COS/pbseekios.cc)
rz+cmv 11/2/2003
|
File size:
745 bytes
|
Rev | Line | |
---|
[476] | 1 | // Utilisation des flots d'entree-sortie C++
|
---|
[2322] | 2 | #include <iostream>
|
---|
[476] | 3 | // Utilisation de la classe Image<T>
|
---|
[837] | 4 | #include "ntoolsinit.h"
|
---|
[476] | 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.