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