;+ ; NAME: ; RemoteView_Matte ; PURPOSE: ; Sets up the opacity matte values for a volume data set ; CATEGORY: ; Visualization ; CALLING SEQUENCE: PRO RemoteView_Matte, FOVLoc, cue_radial=cue_radial, matte=matte ; INPUTS: ; FOVLoc array[3,n,l,m]; type: float ; locations of volume elements in FOVCube in ; heliographic coordinates ; (longitude, latitude, heliocentric distance). ; OPTIONAL INPUT PARAMETERS: ; cue_radial=cue_radial ; array[4]; type: float ; [rmin, rmax, depth, depth_power] ; If depth_power is not specified then 1.0 is assumed. ; Causes an opacity that drops off with distance from ; 1 at 'rmin' to 'depth' at 'rmax'. ; The opacity drops off as a power law with power ; 'depth_power' (the power should be positive) ; OUTPUTS: ; matte=matte array[n,l,m]; type: float ; opacity matrix (values between 0 and 1) ; This matrix is passed to href=RGBO_Project=, where ; it is multiplied with the rgbo vector. ; INCLUDE: @compile_opt.pro ; On error, return to caller ; CALLS: ; IsType, RGBO_DepthCue ; PROCEDURE: ; This procedures applies modification to the ; opacities which depend on location in the volume data (rather ; than just the color). The resulting opacities are folded into ; the rgb color indices before returning. ; MODIFICATION HISTORY: ; AUG-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- IF n_elements(cue_radial) GE 2 THEN BEGIN ndim = (size(FOVLoc))[2:4] message, /info, 'radial cueing on' CASE n_elements(cue_radial) of 2 : radial = [cue_radial,0.0,1.0] 3 : radial = [cue_radial ,1.0] ELSE: radial = cue_radial[0:3] ENDCASE rmin = radial[0] rmax = radial[1] omin = 1.0 omax = radial[2] powr = radial[3] r = reform(FOVLoc[2,*,*,*]) r = omin+(omax-omin)*( (r-rmin)/(rmax-rmin) )^powr r = (r > 0.0) < 1.0 CASE IsType(matte, /undefined) OF 0: matte = r*matte 1: matte = r ENDCASE ENDIF RETURN & END