#!/bin/csh
#######################################################################################################################################
# #
# R E D U C T I O N S G E N E R A L E S D ' U N E S E Q U E N C E D ' I M A G E S : #
# #
# #
# Utilisation : #
# #
# $xci/red_04_16_64$Z Sequence=... \ #
# Standard=... \ #
# Animation=... \ #
# [Reduction_R04=...] \ #
# [Reduction_R16=...] \ #
# [Reduction_R64=...] \ #
# [Couleurs=...] \ #
# [Premiere=...] \ #
# [Derniere=...] \ #
# [PremiereDerniere=...] \ #
# [Permuter=...] \ #
# [Attendre=...] \ #
# [Dilater=...] \ #
# [Moyenne=...] \ #
# [Maximum=...] #
# #
# #
# Author of '$xci/red_04_16_64$Z' : #
# #
# Jean-Francois Colonna (LACTAMME, 20120306100332). #
# #
#######################################################################################################################################
GetArg Reduction_R04=$NEXIST \
Reduction_R16=$EXIST \
Reduction_R64=$EXIST \
Standard=VRAI \
Couleurs="RVB" \
Premiere=1 \
Derniere=128 \
PremiereDerniere=FAUX \
Permuter=FAUX \
Attendre=FAUX \
Dilater=VRAI \
Moyenne=VRAI \
Maximum=FAUX
# Definition des Arguments facultatifs et de leurs valeurs par defaut... #
# #
# Je note le 20120306150644 qu'il faut utiliser : #
# #
# PremiereDerniere=FAUX #
# #
# si l'on veut retrouver exactement, par exemple, l'animation 'v $xiak/JVIG.81$R16' telle #
# qu'elle avait ete calculee avec 'v _____xivPdf_09_2/.LYAP.1.12.$U' avant cette date... #
# #
# Le 20151021173354 fut introduite la possibilite de permuter le postfixe et le numero : #
# #
# Permuter=FAUX #
# #
# et ce pour 'v $xiirc/$Fnota Debut_listG_LYAP_M3_HauteDef'... #
if ($Premiere < $Derniere) then
@ NombreImages = $Derniere - $Premiere
else
@ NombreImages = $Premiere - $Derniere
endif
@ NombreImages = $NombreImages + 1
set LProgrammes="$K_VIDE"
set LPostfixes_="$K_VIDE"
set LNpoints___="$K_VIDE"
# Listes definissant respectivement les '$X's utiles, les postfixes des Animations generees #
# et le nombre de points utiles lorsque '$Dilater' est "VRAI"... #
set NombreReductions=0
if ($Reduction_R04 == $EXIST) then
if ($NombreImages >= 4) then
set PrOgRaMmE=$xci/reduction_04$X
set LProgrammes=($LProgrammes $PrOgRaMmE)
set LPostfixes_=($LPostfixes_ $R04)
set LNpoints___=($LNpoints___ `GetParam $PrOgRaMmE points`)
unset PrOgRaMmE
@ NombreReductions = $NombreReductions + 1
else
EROR "Il y a moins de 4 images."
endif
else
endif
if ($Reduction_R16 == $EXIST) then
if ($NombreImages >= 16) then
set PrOgRaMmE=$xci/reduction_16$X
set LProgrammes=($LProgrammes $PrOgRaMmE)
set LPostfixes_=($LPostfixes_ $R16)
set LNpoints___=($LNpoints___ `GetParam $PrOgRaMmE points`)
unset PrOgRaMmE
@ NombreReductions = $NombreReductions + 1
else
EROR "Il y a moins de 16 images."
endif
else
endif
if ($Reduction_R64 == $EXIST) then
if ($NombreImages >= 64) then
set PrOgRaMmE=$xci/reduction_64$X
set LProgrammes=($LProgrammes $PrOgRaMmE)
set LPostfixes_=($LPostfixes_ $R64)
set LNpoints___=($LNpoints___ 121)
unset PrOgRaMmE
@ NombreReductions = $NombreReductions + 1
else
EROR "Il y a moins de 64 images."
endif
else
endif
if ($NombreReductions > 0) then
set CoMmAnDe1="$K_VIDE"
if ("$Permuter" == "FAUX") then
set CoMmAnDe1="$CoMmAnDe1"" A=$Sequence."
# Ceci est lie a 'v $xci/reduction.02$I chain_numero_avec_separateur' de facon a ce que #
# le nom complet soit bien de la forme : #
# #
# RACINE.NUMERO.POSTFIXE #
# #
else
set CoMmAnDe1="$CoMmAnDe1"" A=$Sequence"
# Ceci est lie a 'v $xci/reduction.02$I chain_numero_avec_separateur' de facon a ce que #
# le nom complet soit bien de la forme : #
# #
# RACINE.POSTFIXE.NUMERO #
# #
endif
set CoMmAnDe1="$CoMmAnDe1"" standard=$Standard"
# Introduit le 20151021184839 pour 'v $xiirc/$Fnota _listG_LYAP_M3_HauteDef'... #
set CoMmAnDe1="$CoMmAnDe1"" premiere=$Premiere"
set CoMmAnDe1="$CoMmAnDe1"" derniere=$Derniere"
set CoMmAnDe1="$CoMmAnDe1"" calculer=VRAI"
set CoMmAnDe1="$CoMmAnDe1"" premiere_derniere=$PremiereDerniere"
set CoMmAnDe1="$CoMmAnDe1"" permuter_postfixe_numero=$Permuter"
set CoMmAnDe1="$CoMmAnDe1"" moyenne=$Moyenne"
set CoMmAnDe1="$CoMmAnDe1"" maximum=$Maximum"
set CoMmAnDe1="$CoMmAnDe1"" dilater=$Dilater"
set CoMmAnDe1="$CoMmAnDe1"" tous_niveaux=VRAI"
set CoMmAnDe1="$CoMmAnDe1"" dilatation_carree=VRAI"
# Arguments independant des '$IndexReduction'... #
set IndexReduction=1
while ($IndexReduction <= $NombreReductions)
set CoMmAnDe2="$K_VIDE"
set CoMmAnDe2="$CoMmAnDe2"" $LProgrammes[$IndexReduction]"
set CoMmAnDe2="$CoMmAnDe2"" points=$LNpoints___[$IndexReduction]"
# Arguments dependant des '$IndexReduction'... #
set CoMmAnDe="$CoMmAnDe2 $CoMmAnDe1"
# Generation de la commande de reduction courante. #
unset CoMmAnDe2
#20151021104115____: if ("$Couleurs" == "RVB") then #
#20151021104115____: execRVB $CoMmAnDe postfixe="%s" R=$Animation$LPostfixes_[$IndexReduction]%s $formatI #
if ( ("$Couleurs" == "HLS") \
|| ("$Couleurs" == "RVB") \
|| ("$Couleurs" == "XYZ") \
) then
FilSTmpB FCoMmAnDe
echo "exec$Couleurs $CoMmAnDe postfixe='%s' R=$Animation$LPostfixes_[$IndexReduction]%s $formatI" \
>> $FCoMmAnDe
source $FCoMmAnDe
# Cas des vraies couleurs ("HLS", "RVB" ou "XYZ"). #
FilSTmpE FCoMmAnDe
else
$CoMmAnDe postfixe="$K_VIDE" R=$Animation$LPostfixes_[$IndexReduction] $formatI
# Cas des fausses couleurs. #
endif
unset CoMmAnDe
@ IndexReduction = $IndexReduction + 1
end
unset CoMmAnDe1
unset IndexReduction
else
EROR "Il n'y a rien a faire..."
endif
unset NombreReductions
unset LNpoints___
unset LPostfixes_
unset LProgrammes
unset NombreImages