# remove comments/blank to count non-zero entries
set id [open "CsurfColorLUT.txt" r]
set lines [split [read -nonewline $id] "\n"]
set i 0
foreach line $lines {
  if [string match "#*" $line] { continue }
  if [string match "" $line] { continue }
  if [string match "0*" $line] { continue }
  incr i
}
puts "$i non-zero LUT entries"

