Ignore:
Timestamp:
Jun 10, 2014 9:27:43 AM (7 years ago)
Author:
gah
Message:

temporary fix for alpha ramp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/vtkvolumeviewer.tcl

    r4343 r4377  
    8787    }
    8888
     89    private variable _alphamap
    8990    private variable _current "";       # Currently selected component
    9091    private variable _volcomponents   ; # Array of components found
     
    26292630    # reference.
    26302631
     2632    set static 0
    26312633    if { ![info exists _parsedFunction($cname)] || ![info exists _cname2transferFunction($cname)] } {
    26322634        array set styles {
    26332635            -color BCGYR
     2636            -alphamap ""
    26342637            -levels 6
    26352638            -markers ""
     
    26532656            ParseLevelsOption $cname $styles(-levels)
    26542657        }
     2658        if { $styles(-alphamap) != "" } {
     2659            set _alphamap($cname) $styles(-alphamap)
     2660        }
    26552661    } else {
    26562662        foreach {cmap amap} $_cname2transferFunction($cname) break
    2657     }
    2658 
    2659     set amap [ComputeAlphamap $cname]
     2663    puts stderr "_cname2transferFunction($cname) amap=$amap"
     2664    }
     2665    if { ![info exists _alphamap($cname)] } {
     2666        set amap [ComputeAlphamap $cname]
     2667    puts stderr "ComputeAlphamap amap=$amap"
     2668    } else {
     2669        set amap $_alphamap($cname)
     2670    }
    26602671    set opaqueAmap "0.0 1.0 1.0 1.0"
    26612672    set _cname2transferFunction($cname) [list $cmap $amap]
Note: See TracChangeset for help on using the changeset viewer.