#!/bin/csh

#######################################################################################################################################
#                                                                                                                                     #
#         M I S E   E N   M O N T A G N E   T E X T U R E E   E T   V U E   D ' A V I O N                                             #
#         D ' U N E   I M A G E   E N   V R A I E S   C O U L E U R S   P A R F A I T E S  :                                          #
#                                                                                                                                     #
#                                                                                                                                     #
#         Utilisation :                                                                                                               #
#                                                                                                                                     #
#                   $xci/montagne.31$Z  <surface> <Texture> <paletteT> <imageR>                                                       #
#                                                                                                                                     #
#                                                                                                                                     #
#         Author of '$xci/montagne.31$Z' :                                                                                            #
#                                                                                                                                     #
#                     Jean-Francois Colonna (LACTAMME, AAAAMMJJhhmmss).                                                               #
#                                                                                                                                     #
#######################################################################################################################################

set  surface=$1
set  Texture=$2
set  paletteT=$3
set  imageR=$4

set  avion='avion=VRAI alias=FAUX depth=FAUX'
                                        # Pour faire une vue d'avion.                                                                 #

set  texture=`get_feuille$Z $Texture`
                                        # Recuperation du nom de la texture dans son directory.                                       #

$xci/vraies_C$X     A=$Texture p=$paletteT RR=$xiim/$texture$ROUGE RV=$xiim/$texture$VERTE RB=$xiim/$texture$BLEUE $formatI
                                        # Recuperation des trois composantes 'RVB' de la texture.                                     #

$xci/montagne.01$X  A=$surface T=$xiim/$texture$ROUGE R=$imageR$ROUGE $avion $formatI
$xci/montagne.01$X  A=$surface T=$xiim/$texture$VERTE R=$imageR$VERTE $avion $formatI
$xci/montagne.01$X  A=$surface T=$xiim/$texture$BLEUE R=$imageR$BLEUE $avion $formatI
                                        # Mise en montagne ($imageR$RVB) de l'image argument ($surface) suivant                       #
                                        # les trois composantes.                                                                      #

if                  (-e $xci/faux_HLS.01$X) then
                    $xci/faux_HLS.01$X  AR=$imageR$ROUGE AV=$imageR$VERTE AB=$imageR$BLEUE p=$paletteT R=$imageR $formatI
                                        # Et reconstitution finale en fausses couleurs parfaites.                                     #
else
endif

$DELETE             $xiim/$texture$ROUGE
$DELETE             $xiim/$texture$VERTE
$DELETE             $xiim/$texture$BLEUE
                                        # Et enfin, nettoyage...                                                                      #



Copyright © Jean-François Colonna, 2019-2021.
Copyright © CMAP (Centre de Mathématiques APpliquées) UMR CNRS 7641 / Ecole Polytechnique, 2019-2021.