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 Gives information about a wavelet file
51
** OUTPUTI[1] = number of lines
52
** OUTPUTI[2] = number of columns
53
** OUTPUTI[3] = number of scales
54
** OUTPUTI[4] = algorithm number
55
** OUTPUTR[1] = Frequency cut-off
56
** OUT_A = PYR, CUB or IMA
58
** File_Name_Transform (keyword: OU_A):
59
** File name of the input wavelet transform
64
******************************************************************************/
71
#include <midas_def.h>
75
#include "Def_Wavelet.h"
77
extern void wave_io_read();
81
/*****************************************************************************/
85
wave_transf_des Wavelet;
86
int Stat, Actvals, Maxvals, Felem, Noelm;
87
string File_Name_Transform, Send;
94
SCSPRO("info_header");
96
/* read the image file name */
99
Stat = SCKGETC("IN_A", Felem, Maxvals, &Actvals, File_Name_Transform);
101
/* read the wavelet */
102
wave_io_read (File_Name_Transform, &Wavelet);
104
sprintf (Send,"\n Wavelet file : %s\n", File_Name_Transform);
106
sprintf (Send,"\n Original name image : %s", Wavelet.Name_Imag);
108
sprintf(Send," Number of lines : %d", Wavelet.Nbr_Ligne);
110
sprintf (Send," Number of columns : %d", Wavelet.Nbr_Col);
112
sprintf (Send," Number of scales : %d", Wavelet.Nbr_Plan);
117
Buffer_Int = Wavelet.Nbr_Ligne;
118
Stat = SCKWRI("OUTPUTI", &Buffer_Int, Felem, Maxvals, &Unit);
121
Buffer_Int = Wavelet.Nbr_Col;
122
Stat = SCKWRI("OUTPUTI", &Buffer_Int, Felem, Maxvals, &Unit);
125
Buffer_Int = Wavelet.Nbr_Plan;
126
Stat = SCKWRI("OUTPUTI", &Buffer_Int, Felem, Maxvals, &Unit);
129
Buffer_Int = Wavelet.Type_Wave_Transform;
130
Stat = SCKWRI("OUTPUTI", &Buffer_Int, Felem, Maxvals, &Unit);
135
switch (Wavelet.Type_Wave_Transform)
137
case TO_PAVE_BSPLINE_FFT:
138
Buffer_Float = Wavelet.Pave.Freq_Coup;
140
case TO_PAVE_BSPLINE:
141
sprintf (Send," cube : %d", Wavelet.Type_Wave_Transform);
144
SCKWRC("OUT_A", Noelm, "CUB", Felem, Maxvals, &Unit);
146
case TO_PYR_FFT_DIFF_RESOL:
147
case TO_PYR_FFT_DIFF_SQUARE_RESOL:
148
Buffer_Float = Wavelet.Pyramid.Freq_Coup;
151
sprintf (Send," pyramid : %d", Wavelet.Type_Wave_Transform);
153
SCKWRC("OUT_A", Noelm, "PYR", Felem, Maxvals, &Unit);
155
case TO_MALLAT_BARLAUD:
156
sprintf (Send," image : %d", Wavelet.Type_Wave_Transform);
158
SCKWRC("OUT_A", Noelm, "IMA", Felem, Maxvals, &Unit);
164
Stat = SCKWRR("OUTPUTR", &Buffer_Float, Felem, Maxvals, &Unit);