- Timestamp:
- Sep 28, 2013 9:07:58 PM (11 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/field.tcl
r3964 r3965 147 147 148 148 private method AvsToVtk { cname contents } 149 private method Dicom SeriesToVtk { cname contents }149 private method DicomToVtk { cname contents } 150 150 private method BuildPointsOnMesh { cname } 151 151 private method ConvertToVtkData { cname } … … 955 955 continue; # Ignore this compoennt 956 956 } 957 if { ![file isdir $contents] } { 958 puts stderr "dicom path \"$contents\" is not a directory." 959 return 0 960 } 961 set vtkdata [DicomSeriesToVtk $cname $contents] 957 set vtkdata [DicomToVtk $cname $contents] 962 958 if { $_viewer == "" } { 963 set _viewer "nanovis"959 set _viewer [expr {($_dim == 3) ? "nanovis" : "contour"}] 964 960 } 965 961 set _comp2vtk($cname) $vtkdata 966 962 set _comp2style($cname) [$_field get $cname.style] 967 set _dim 3968 963 incr _counter 969 964 } elseif { $type == "ucd"} { … … 1736 1731 } 1737 1732 1738 itcl::body Rappture::Field::Dicom SeriesToVtk { cname path } {1733 itcl::body Rappture::Field::DicomToVtk { cname path } { 1739 1734 package require vtk 1740 1735 1736 if { ![file exists $path] } { 1737 puts stderr "path \"$path\" doesn't exist." 1738 return 0 1739 } 1741 1740 set reader $this-datasetreader 1742 1741 vtkDICOMImageReader $reader 1743 1744 set files [glob -nocomplain $path/*.dcm] 1745 if { [llength $files] == 0 } { 1746 puts stderr "no dicom files found in \"$path\"" 1747 return 0 1748 } 1749 $reader SetDirectoryName $path 1742 if { [file isdir $path] } { 1743 set files [glob -nocomplain $path/*.dcm] 1744 if { [llength $files] == 0 } { 1745 puts stderr "no dicom files found in \"$path\"" 1746 return 0 1747 } 1748 $reader SetDirectoryName $path 1749 } else { 1750 $reader SetFileName $path 1751 } 1750 1752 $reader Update 1751 1753 … … 1763 1765 incr _dim 1764 1766 } 1767 1765 1768 set _comp2dims($cname) "${_dim}D" 1766 1769 -
trunk/gui/scripts/filechoiceentry.tcl
r3964 r3965 305 305 } 306 306 } 307 return $files307 return [lsort -dictionary $files] 308 308 } 309 309
Note: See TracChangeset
for help on using the changeset viewer.