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