|
From: <kin...@us...> - 2024-07-08 17:17:52
|
Revision: 7178
http://sourceforge.net/p/teem/code/7178
Author: kindlmann
Date: 2024-07-08 17:17:50 +0000 (Mon, 08 Jul 2024)
Log Message:
-----------
for testing limnCbfTVT
Added Paths:
-----------
teem/trunk/src/limn/test/01-test-tvt.sh
Added: teem/trunk/src/limn/test/01-test-tvt.sh
===================================================================
--- teem/trunk/src/limn/test/01-test-tvt.sh (rev 0)
+++ teem/trunk/src/limn/test/01-test-tvt.sh 2024-07-08 17:17:50 UTC (rev 7178)
@@ -0,0 +1,80 @@
+#!/usr/bin/env bash
+#
+# Teem: Tools to process and visualize scientific data and images
+# Copyright (C) 2009--2024 University of Chicago
+# Copyright (C) 2005--2008 Gordon Kindlmann
+# Copyright (C) 1998--2004 University of Utah
+#
+# This library is free software; you can redistribute it and/or modify it under the terms
+# of the GNU Lesser General Public License (LGPL) as published by the Free Software
+# Foundation; either version 2.1 of the License, or (at your option) any later version.
+# The terms of redistributing and/or modifying this software also include exceptions to
+# the LGPL that facilitate static linking.
+#
+# This library is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License along with
+# this library; if not, write to Free Software Foundation, Inc., 51 Franklin Street,
+# Fifth Floor, Boston, MA 02110-1301 USA
+#
+
+# 01=SECOND script to run to test limnCbfTVT via lpu cbfit -tvt
+
+set -o errexit
+set -o nounset
+shopt -s expand_aliases
+JUNK=""
+function junk { JUNK="$JUNK $@"; }
+function cleanup { rm -rf $JUNK; }
+trap cleanup err exit int term
+# https://devmanual.gentoo.org/tools-reference/bash/
+unset UNRRDU_QUIET_QUIT
+
+IN=circ.txt
+N=$(cat $IN | wc -l | xargs echo)
+VVOUT=out-vv.txt
+LTOUT=out-rt.txt
+RTOUT=out-lt.txt
+BIN=670
+
+rm -f $VVOUT; touch $VVOUT; junk $VVOUT
+rm -f $LTOUT; touch $LTOUT; junk $LTOUT
+rm -f $RTOUT; touch $RTOUT; junk $RTOUT
+for I in $(seq 0 $((N-1))); do
+ LO=$((I-4))
+ HI=$((I+4))
+ # 8-fold TEST:
+ # * without -loop and with -loop
+ # * -scl 0 and >0
+ # * oneside (4th arg to -tvt) 0 and 1
+ CMD="./lpu cbfit -i $IN -loop -scl 2 -tvt $LO $HI $I 1 -eps 1 -v 0"
+ echo $CMD
+ rm -f log.txt
+ (eval $CMD 2>&1) > log.txt
+ grep "lt =" log.txt | cut -d' ' -f 3,4 >> $LTOUT
+ grep "vv =" log.txt | cut -d' ' -f 3,4 >> $VVOUT
+ grep "rt =" log.txt | cut -d' ' -f 3,4 >> $RTOUT
+done
+rm -f log.txt
+
+MMB="-min -1.1 1.1 -max 1.1 -1.1 -b $BIN $BIN"
+unu jhisto -i $IN $MMB -t float | unu axinsert -a 0 -s 3 |
+ unu resample -s = x1 x1 -k gauss:1.3,6 | unu quantize -b 8 | unu 2op x - 0.5 -o in.png
+junk in.png
+unu jhisto -i $VVOUT $MMB | unu quantize -b 8 -max 1 -o vv.png
+junk vv.png
+
+TSCL=0.02
+unu 2op x $LTOUT $TSCL | unu 2op + - $VVOUT | unu jhisto $MMB | unu quantize -b 8 -max 1 -o lt.png
+unu 2op x $RTOUT $TSCL | unu 2op + - $VVOUT | unu jhisto $MMB | unu quantize -b 8 -max 1 -o rt.png
+junk {l,r}t.png
+
+# in: gray fuzzy blob
+# lt: blue vv: green rt: red points
+unu join -i rt.png vv.png lt.png -a 0 -incr |
+ unu 2op max in.png - |
+ unu resample -s = x2 x2 -k box -o tvt.png
+
+open tvt.png
Property changes on: teem/trunk/src/limn/test/01-test-tvt.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|