summaryrefslogtreecommitdiffstats
path: root/ds9/library/export.tcl
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-05-29 21:27:31 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-05-29 21:27:31 (GMT)
commitb8395e8e32cccb75565a170160772857087901de (patch)
tree2494425c02897874ba1a957a51224522c4a2e10a /ds9/library/export.tcl
parent41505b4129a005e96c6afc3344ccf61097884fbd (diff)
downloadblt-b8395e8e32cccb75565a170160772857087901de.zip
blt-b8395e8e32cccb75565a170160772857087901de.tar.gz
blt-b8395e8e32cccb75565a170160772857087901de.tar.bz2
update parsers
Diffstat (limited to 'ds9/library/export.tcl')
-rw-r--r--ds9/library/export.tcl134
1 files changed, 0 insertions, 134 deletions
diff --git a/ds9/library/export.tcl b/ds9/library/export.tcl
index eff40ea..0188f1e 100644
--- a/ds9/library/export.tcl
+++ b/ds9/library/export.tcl
@@ -36,144 +36,10 @@ proc ProcessExportCmd {varname iname} {
# we need to be realized
ProcessRealizeDS9
- global debug
- if {$debug(tcl,parser)} {
export::YY_FLUSH_BUFFER
export::yy_scan_string [lrange $var $i end]
export::yyparse
incr i [expr $export::yycnt-1]
- } else {
-
- set format {}
- set fn [lindex $var $i]
- set fn2 {}
- if {$fn == {}} {
- return
- }
-
- switch -- $fn {
- array -
- rgbarray -
- nrrd -
- envi -
- gif -
- tiff -
- jpeg -
- png {
- set format $fn
- set fn {}
- incr i
- }
- jpg {
- set format jpeg
- set fn {}
- incr i
- }
- tif {
- set format tiff
- set fn {}
- incr i
- }
- }
-
- # one last time
- if {$fn == {}} {
- set fn [lindex $var $i]
- if {$fn == {}} {
- return
- }
- }
-
- if {$format == {}} {
- set format [ExtToFormat $fn]
- }
-
- global export
- set param [string tolower [lindex $var [expr $i+1]]]
- switch $format {
- array -
- rgbarray -
- nrrd {
- switch $param {
- native -
- big -
- bigendian -
- little -
- littleendian {
- set export(endian) $param
- incr i
- }
- }
- }
- envi {
- switch $param {
- {} {set fn2 "[file rootname $fn].bsq"}
- native -
- big -
- bigendian -
- little -
- littleendian {
- set fn2 "[file rootname $fn].bsq"
- set export(endian) $param
- incr i
- }
- default {
- if {[string range $param 0 0] == {-}} {
- set fn2 "[file rootname $fn].bsq"
- } else {
- set fn2 $param
- incr i
- set param [string tolower [lindex $var [expr $i+1]]]
- switch $param {
- native -
- big -
- bigendian -
- little -
- littleendian {
- set export(endian) $param
- incr i
- }
- }
- }
- }
- }
- }
- gif {}
- jpeg {
- if {$param != {} && [string is integer $param]} {
- set export(jpeg,quality) $param
- incr i
- }
- }
- tiff {
- switch $param {
- none -
- jpeg -
- packbits -
- deflate {
- set export(tiff,compress) $param
- incr i
- }
- }
- }
- png {}
- }
-
- switch -- $format {
- array {FileLast arrayfbox $fn}
- rgbarray {FileLast rgbarrayfbox $fn}
- nrrd {FileLast nrrdfbox $fn}
- envi {
- FileLast envifbox $fn
- FileLast envi2fbox $fn2
- }
- gif {FileLast giffbox $fn}
- jpeg {FileLast jpegfbox $fn}
- tiff {FileLast tifffbox $fn}
- png {FileLast pngfbox $fn}
- }
- Export $fn $format $fn2
-}
}
proc ExportCmdSet {which value {cmd {}}} {