;+ ; NAME: ; MORPHING ; ; PURPOSE: ; Opere le "stretching" d'une image ; ; CATEGORY: ; stretching, traitement d'images. ; ; CALLING SEQUENCE: ; morph data_1,data_str,dx,dy ; ; INPUTS: ; data_1 : image de reference (deja lu) ; ; KEYWORD PARAMETERS: ; ; OUTPUTS: ; data_str: image traitee (a ecrire dans un fichier pour la conserver) ; ; OPTIONAL OUTPUT PARAMETERS: ; ; COMMON BLOCKS: ; ; SIDE EFFECTS: ; Creation d'un nouveau fichier de meme taille que les fichiers d'entree. ; ; MODIFICATION HISTORY: ; Creation : 20-12-2000 - Thierry Roudier (OMP) ; Modif le 3 Juin 2004 PRO morphing_image, data_brut, data_dstr,dx,dy ; npix=size(data_brut) ;print,'taille fichier entree',npix(1),npix(2) ; ;Image a distordre ;tvscl,data_brut ; ; fabrication des tableaux d'interpolation ; X_int = FLTARR(npix(1), npix(2)) Y_int = FLTARR(npix(1), npix(2)) ; findex = FINDGEN(npix(1)) ; print,'dx et dy =', dx,dy FOR i = 0, npix(2)-1 DO X_int(*,i) = findex(*) - dx ; findex = FINDGEN(npix(2)) FOR i = 0, npix(1)-1 DO Y_int(i,*) = findex(*) - dy ; ; ; on interpole ; data_dstr = INTERPOLATE (FLOAT(TEMPORARY(data_brut)), X_int, Y_int, CUBIC=(-0.5)) ;tvscl,data_dstr ; END