1
/*===========================================================================
2
Copyright (C) 1993-2009 European Southern Observatory (ESO)
4
This program is free software; you can redistribute it and/or
5
modify it under the terms of the GNU General Public License as
6
published by the Free Software Foundation; either version 2 of
7
the License, or (at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public
15
License along with this program; if not, write to the Free
16
Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,
19
Correspondence concerning ESO-MIDAS should be addressed as follows:
20
Internet e-mail: midas@eso.org
21
Postal address: European Southern Observatory
22
Data Management Division
23
Karl-Schwarzschild-Strasse 2
24
D 85748 Garching bei Muenchen
26
===========================================================================*/
28
/******************************************************************************
34
** Author: Jean-Luc Starck
43
*******************************************************************************
45
** DESCRIPTION Extraction of a plane from a wavelet transform
48
******************************************************************************
50
** DESCRIPTION program which allows to replace a plane of a wavelet
51
** ----------- transform by an image
56
** File_Name_Transform (keyword: IN_A) =
57
** input file name of the wavelet transform
58
** File_Name_Imag (keyword: IN_B) = input file name of the image
59
** File_Name_Transform (keyword: OUT_A) =
60
** output file name of the wavelet transform
61
** Num_Plan (keyword: INPUTI) =
62
** plane number to extract (Num_Plan = 1 .. Number_of_Planes)
64
******************************************************************************/
71
#include <midas_def.h>
75
#include "Def_Wavelet.h"
77
#define VISU_PARAM FALSE
79
extern void wavelet_enter_plan_file();
82
/*****************************************************************************/
86
string File_Name_Transform, File_Name_Imag, File_Trans_Out;
89
int Stat, Null, Actvals, Buffer_Int, Maxvals, Felem;
94
/* read the image file name */
97
Stat = SCKGETC("IN_A", Felem, Maxvals, &Actvals, File_Name_Transform);
99
/* read the output image file name */
100
Stat = SCKGETC("IN_B", Felem, Maxvals, &Actvals, File_Name_Imag);
104
Stat= SCKRDI("INPUTI", Felem, Maxvals, &Actvals, &Buffer_Int, &Unit, &Null);
105
Num_Plan = Buffer_Int;
107
/* read the output image file name */
110
Stat = SCKGETC("OUT_A", Felem, Maxvals, &Actvals, File_Trans_Out);
114
sprintf (Send,"Nom du fichier de la transformee =%s\n",File_Name_Transform);
116
sprintf (Send,"Nom de fichier image =%s\n",File_Name_Imag);
118
sprintf (Send,"Nom du fichier ondelette en sortie =%s\n",File_Trans_Out);
120
sprintf(Send,"Numero du plan=%d\n",Num_Plan);
125
wavelet_enter_plan_file (File_Name_Imag, File_Name_Transform,
126
Num_Plan, File_Trans_Out);