Changeset 3966 for trunk/gui


Ignore:
Timestamp:
Sep 30, 2013 6:29:29 PM (11 years ago)
Author:
ldelgass
Message:

Allow overriding viewer for DICOM (with about.view), fixes for styles in
isosurface viewer. Also, make isosurface opaque if there is only one level
as translucency is expensive to render.

Location:
trunk/gui/scripts
Files:
2 edited

Legend:

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

    r3965 r3966  
    953953            set contents [$_field get $cname.dicom]
    954954            if { $contents == "" } {
    955                 continue;               # Ignore this compoennt
     955                continue;               # Ignore this component
    956956            }
    957957            set vtkdata [DicomToVtk $cname $contents]
     958            set viewer [$_field get "about.view"]
     959            if { $viewer != "" } {
     960                set _viewer $viewer
     961            }
    958962            if { $_viewer == "" } {
    959963                set _viewer [expr {($_dim == 3) ? "nanovis" : "contour"}]
     
    965969            set contents [$_field get $cname.ucd]
    966970            if { $contents == "" } {
    967                 continue;               # Ignore this compoennt
     971                continue;               # Ignore this component
    968972            }
    969973            set vtkdata [AvsToVtk $cname $contents]
     
    974978        }
    975979        set _isValidComponent($cname) 1
     980        #puts stderr "Field $cname type is: $_type"
    976981    }
    977982    if { [array size _isValidComponent] == 0 } {
     
    992997        }
    993998    }
     999
    9941000    # FIXME: about.scalars and about.vectors are temporary.  With views
    9951001    #        the label and units for each field will be specified there.
  • trunk/gui/scripts/vtkisosurfaceviewer.tcl

    r3963 r3966  
    21172117    }
    21182118    array set style [$dataobj style $comp]
    2119     if { $dataobj != $_first } {
     2119    if { $dataobj != $_first || $style(-levels) == 1 } {
    21202120        set style(-opacity) 1
    2121     }
    2122     if { $_currentColormap == "" } {
    2123         set stylelist [$dataobj style $comp]
    2124         if { $stylelist != "" } {
    2125             array set style $stylelist
    2126             set stylelist [array get style]
    2127             SetCurrentColormap $stylelist
    2128         }
    2129         $itk_component(colormap) value $style(-color)
    21302121    }
    21312122    SendCmd "cutplane add $tag"
     
    21512142    }
    21522143    if { $_currentColormap == "" } {
     2144        SetCurrentColormap $style(-color)
    21532145        $itk_component(colormap) value $style(-color)
    21542146    }
     
    24972489    set _currentColormap $name
    24982490    SendCmd "contour3d colormap $_currentColormap"
     2491    SendCmd "cutplane colormap $_currentColormap"
    24992492}
    25002493
Note: See TracChangeset for help on using the changeset viewer.