Changeset 2730 for trunk/gui


Ignore:
Timestamp:
Dec 13, 2011 1:28:39 PM (12 years ago)
Author:
gah
Message:
 
Location:
trunk/gui
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/Makefile.in

    r2721 r2730  
    130130                $(srcdir)/vtkstreamlinesviewer.tcl \
    131131                $(srcdir)/vtkvolumeviewer.tcl \
     132                $(srcdir)/vtkheightmapviewer.tcl \
    132133                $(srcdir)/xylegend.tcl \
    133134                $(srcdir)/xyprint.tcl \
  • trunk/gui/scripts/field.tcl

    r2727 r2730  
    587587    catch {unset _comp2dims}
    588588    catch {unset _comp2style}
     589    array unset _comp2volume
    589590    array unset _comp2vtkstreamlines
    590591    array unset _comp2unirect2d
     
    821822            set data [Rappture::encoding::decode -as zb64 $data]
    822823            if 1 {
    823             set file "/tmp/junk.dx"
     824            set file "/tmp/$cname.dx"
    824825            set f [open $file "w"]
    825826            puts $f $data
     
    828829            set data [Rappture::ConvertDxToVtk $data]
    829830            if 1 {
    830             set file "/tmp/junk.vtk"
     831            set file "/tmp/$cname.vtk"
    831832            set f [open $file "w"]
    832833            puts $f $data
  • trunk/gui/scripts/field3dresult.tcl

    r2722 r2730  
    8383            }
    8484            "vtkvolume" {
     85                catch {
    8586                itk_component add renderer {
    8687                    Rappture::VtkVolumeViewer $itk_interior.ren $servers
    8788                }
     89                } errs
     90                puts stderr errs=$errs
    8891            }
    8992            "vtkstreamlines" {
  • trunk/gui/scripts/vtkvolumeviewer.tcl

    r2728 r2730  
    10251025                SendCmd "dataset visible 0 $tag"
    10261026            }
     1027            break
    10271028        }
    10281029    }
     
    10731074        }
    10741075        foreach { name title units } [$_first hints scalars] {
     1076            set _scalarFields($title) $name
     1077            $itk_component(field) choices insert end "$name" "$title"
     1078            $itk_component(fieldmenu) add radiobutton -label "$title" \
     1079                -value $title -variable [itcl::scope _currentField] \
     1080                -selectcolor red \
     1081                -activebackground black \
     1082                -activeforeground white \
     1083                -font "Arial 8" \
     1084                -command [itcl::code $this Combo invoke]
     1085            set _fields($name) [list $title $units]
     1086        }
     1087        foreach { name title units } { default Default ??? } {
    10751088            set _scalarFields($title) $name
    10761089            $itk_component(field) choices insert end "$name" "$title"
     
    14591472            }
    14601473            foreach dataset [CurrentDatasets -visible] {
    1461                 puts stderr "volume colormode $_colorMode ${name} $dataset"
     1474                #puts stderr "volume colormode $_colorMode ${name} $dataset"
    14621475                puts stderr "cutplane colormode $_colorMode ${name} $dataset"
    1463                 SendCmd "volume colormode $_colorMode ${name} $dataset"
     1476                #SendCmd "volume colormode $_colorMode ${name} $dataset"
    14641477                SendCmd "cutplane colormode $_colorMode ${name} $dataset"
    14651478            }
     
    17571770    }
    17581771    set cmap {}
    1759     for {set i 0} {$i < [llength $clist]} {incr i} {
    1760         set x [expr {double($i)/([llength $clist]-1)}]
    1761         set color [lindex $clist $i]
    1762         append cmap "$x [Color2RGB $color] "
     1772    set nColors [llength $clist]
     1773    if { $nColors == 1 } {
     1774        append cmap "0.0 [Color2RGB $colors] "
     1775        append cmap "1.0 [Color2RGB $colors] "
     1776    } else {
     1777        for {set i 0} {$i < [llength $clist]} {incr i} {
     1778            set x [expr {double($i)/([llength $clist]-1)}]
     1779            set color [lindex $clist $i]
     1780            append cmap "$x [Color2RGB $color] "
     1781        }
    17631782    }
    17641783    return $cmap
     
    17801799
    17811800    set wmap "0.0 1.0 1.0 1.0"
     1801    set wmap "0.0 0.0 0.1 0.0 0.2 0.8 0.98 0.8 0.99 0.0 1.0 0.0"
    17821802    SendCmd "colormap add $name { $cmap } { $wmap }"
    17831803}
     
    19331953        "orange-to-blue"     "orange-to-blue"   
    19341954
    1935     $itk_component(palette) value "BCGYR"
     1955    $itk_component(palette) value "nanohub"
    19361956    bind $inner.palette <<Value>> \
    19371957        [itcl::code $this AdjustSetting volume-palette]
  • trunk/gui/src/RpConvertDxToVtk.c

    r2728 r2730  
    8888    scale = 1.0 / (vmax - vmin);
    8989    for (i = 0; i < nPoints; i++) {
     90#ifdef notdef
    9091        sprintf(mesg, "%g\n", (array[i] - vmin) * scale);
     92#endif
     93        sprintf(mesg, "%g\n", array[i]);
    9194        Tcl_AppendToObj(objPtr, mesg, -1);
    9295    }
     
    192195            }
    193196        } else if (sscanf(line, "object %*d class array type %*s rank 0"
    194                 " items %d data follows", &nPoints) == 1) {
     197                " %*s %d data follows", &nPoints) == 1) {
    195198#ifdef notdef
    196199            fprintf(stderr, "found class array type rank 0 nPoints=%d\n",
Note: See TracChangeset for help on using the changeset viewer.