!------------------------------------------------------------------------
! @ p_scale.ima HeaderVariable
!
! Procedure to define bitmap scale for multichannel image
! Variables SCALE and TRUE_SCALE defined in define.ima
!
! Derived from P_SCALE.GREG created by S.Guilloteau 15-Oct-1992
!------------------------------------------------------------------------
define real tmin tmax
if (&1%extrema.eq.0.or.(&1%min.eq.&1%max)) then   ! means no extrema section
  if (&1%blan.eq.0) then
    compute tmin min &1
    compute tmax max &1
  else
    compute tmin min &1 /blank &1%blank[1] &1%blank[2]
    compute tmax max &1 /blank &1%blank[1] &1%blank[2]
  endif
else
  let tmin &1%min
  let tmax &1%max
endif
!
if (scale[1].eq.0) then
  let true_scale[1] tmin
else
  let true_scale[1] scale[1]
endif
if (scale[2].eq.0) then
  let true_scale[2] tmax
else
  let true_scale[2] scale[2]
endif
!
@ p_spacing &1
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
