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