source: Sophya/trunk/SophyaPI/PI/pidemoup.cc@ 8

Last change on this file since 8 was 8, checked in by eros, 30 years ago

Version X OK apres PIOptmenu, et modif ds pibwdgx.cc - Ajout de pidraw

et pihisto - Nettoyage et ajout de pidemo. Reza

File size: 1.4 KB
RevLine 
[8]1#include <stdlib.h>
2#include <stdio.h>
3#include <string.h>
4
5#include "ctimer.h"
6#include "imageop.h"
7
8#include "pidemoup.h"
9
10FitsImageR4 * PIUserProc_1(FitsImageR4 * myimg, int xp, int yp,
11 char * arg1, char * arg2)
12{
13printf(" PIUserProc_1(%d %d %s %s) Filtrage passe-bas 3*3 \n", xp, yp, arg1, arg2);
14ImageR4 filt(3,3);
15FitsImageR4 * out;
16
17// Definition du filtre passe-bas
18int i,j;
19for(i=0; i<3; i++)
20 for(j=0; j<3; j++) filt(i,j) = 0.06;
21filt(1,1) = 0.52;
22
23filt.PrintPave();
24out = new FitsImageR4(myimg->XSize(), myimg->YSize());
25TIMEF ;
26FilterImage((ImageR4 *) myimg, (ImageR4 *)out, &filt);
27return(out);
28}
29
30FitsImageR4 * PIUserProc_2(FitsImageR4 * myimg, int xp, int yp,
31 char * arg1, char * arg2)
32{
33printf(" PIUserProc_2(%d %d %s %s) Ombre 3*3 \n", xp, yp, arg1, arg2);
34ImageR4 filt(3,3);
35FitsImageR4 * out;
36
37// Definition du filtre ombre
38int i,j;
39filt(0,0) = filt(1,1) = filt(2,2) = 0.;
40filt(0,1) = filt(1,2) = -1.;
41filt(1,0) = filt(2,1) = 1.;
42filt(0,2) = -2.;
43filt(2,0) = 2.;
44filt.PrintPave();
45out = new FitsImageR4(myimg->XSize(), myimg->YSize());
46TIMEF ;
47FilterImage((ImageR4 *) myimg, (ImageR4 *)out, &filt);
48return(out);
49}
50
51FitsImageR4 * PIUserProc_3(FitsImageR4 * /*myimg*/, int xp, int yp,
52 char * arg1, char * arg2)
53{
54printf(" PIUserProc_3(%d %d %s %s) ne fait rien \n", xp, yp, arg1, arg2);
55return(NULL);
56}
57
Note: See TracBrowser for help on using the repository browser.