Changeset 3964
- Timestamp:
- Sep 27, 2013, 1:44:55 PM (11 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/Makefile.in
r3940 r3964 53 53 $(srcdir)/field2dresult.tcl \ 54 54 $(srcdir)/field3dresult.tcl \ 55 $(srcdir)/filechoiceentry.tcl \ 56 $(srcdir)/filelistentry.tcl \ 55 57 $(srcdir)/filexfer.tcl \ 56 58 $(srcdir)/flowdial.tcl \ -
trunk/gui/scripts/controls.tcl
r3762 r3964 139 139 choice { 140 140 Rappture::ChoiceEntry $w $_owner $path 141 bind $w <<Value>> [itcl::code $this _controlChanged $name] 142 } 143 filechoice { 144 Rappture::FileChoiceEntry $w $_owner $path 145 bind $w <<Value>> [itcl::code $this _controlChanged $name] 146 } 147 filelist { 148 Rappture::FileListEntry $w $_owner $path 141 149 bind $w <<Value>> [itcl::code $this _controlChanged $name] 142 150 } -
trunk/gui/scripts/field.tcl
r3960 r3964 960 960 } 961 961 set vtkdata [DicomSeriesToVtk $cname $contents] 962 ReadVtkDataSet $cname $vtkdata 962 if { $_viewer == "" } { 963 set _viewer "nanovis" 964 } 963 965 set _comp2vtk($cname) $vtkdata 964 966 set _comp2style($cname) [$_field get $cname.style] 967 set _dim 3 965 968 incr _counter 966 if { $_viewer == "" } {967 set _viewer "nanovis"968 }969 969 } elseif { $type == "ucd"} { 970 970 set contents [$_field get $cname.ucd] … … 1379 1379 foreach {vmin vmax} [$array GetRange -1] break 1380 1380 1381 set numTuples [$array GetNumberOfTuples] 1381 1382 if 0 { 1382 1383 for { set i 0 } { $i < $numTuples } { incr i } { 1383 1384 $vector append [$array GetComponent $i 0] 1385 } 1384 1386 } 1385 1387 for {set i 0} {$i < [$dataAttrs GetNumberOfArrays] } {incr i} { … … 1747 1749 $reader SetDirectoryName $path 1748 1750 $reader Update 1751 1752 set dataset [$reader GetOutput] 1753 set limits {} 1754 foreach {xmin xmax ymin ymax zmin zmax} [$dataset GetBounds] break 1755 set _dim 0 1756 if { $xmax > $xmin } { 1757 incr _dim 1758 } 1759 if { $ymax > $ymin } { 1760 incr _dim 1761 } 1762 if { $zmax > $zmin } { 1763 incr _dim 1764 } 1765 set _comp2dims($cname) "${_dim}D" 1766 1767 lappend limits x [list $xmin $xmax] 1768 lappend limits y [list $ymin $ymax] 1769 lappend limits z [list $zmin $zmax] 1770 set dataAttrs [$dataset GetPointData] 1771 if { $dataAttrs == ""} { 1772 puts stderr "WARNING: no point data found in \"$_path\"" 1773 rename $reader "" 1774 return 0 1775 } 1776 set vmin 0 1777 set vmax 1 1778 set numArrays [$dataAttrs GetNumberOfArrays] 1779 if { $numArrays > 0 } { 1780 set array [$dataAttrs GetArray 0] 1781 # Calling GetRange with component set to -1 will return 1782 # either the scalar range or vector magnitude range 1783 foreach {vmin vmax} [$array GetRange -1] break 1784 for {set i 0} {$i < [$dataAttrs GetNumberOfArrays] } {incr i} { 1785 set array [$dataAttrs GetArray $i] 1786 set fname [$dataAttrs GetArrayName $i] 1787 foreach {min max} [$array GetRange -1] break 1788 lappend limits $fname [list $min $max] 1789 set _fld2Units($fname) "" 1790 set _fld2Label($fname) $fname 1791 # Let the VTK file override the <type> designated. 1792 set _fld2Components($fname) [$array GetNumberOfComponents] 1793 lappend _comp2fldName($cname) $fname 1794 } 1795 } 1796 lappend limits v [list $vmin $vmax] 1797 set _comp2limits($cname) $limits 1749 1798 1750 1799 set tmpfile $cname[pid].vtk … … 1753 1802 $writer SetInputConnection [$reader GetOutputPort] 1754 1803 $writer SetFileName $tmpfile 1804 $writer SetFileTypeToBinary 1755 1805 $writer Write 1756 1806 rename $reader "" … … 1761 1811 set vtkdata [read $f] 1762 1812 close $f 1763 #file delete $tmpfile1813 file delete $tmpfile 1764 1814 return $vtkdata 1765 1815 }
Note: See TracChangeset
for help on using the changeset viewer.