00001 00002
00003 package require image
00004 package require display
00005 package require sas
00006
00007 namespace eval sas {
00008 proc drawCluster { img roi } {
00009 set x [::sas::SRoi_x_get $roi]
00010 set y [::sas::SRoi_y_get $roi]
00011 set w [::sas::SRoi_width_get $roi]
00012 set h [::sas::SRoi_height_get $roi]
00013 set a [::sas::SRoi_angle_get $roi]
00014 set a [expr [expr -$a * 3.141593] / 180]
00015 ::display::drawOrientedRectangle $img $y $x $h $w $a 1 red [list jafar clust]
00016 }00017
00018 proc drawClusters { img selec } {
00019 set nbRois [::sas::CSSelection_getNbSRoi $selec]
00020 for {set i 0} {$i < $nbRois} {incr i} {
00021 set roi [::sas::CSSelection_getSRoi $selec $i]
00022 ::sas::drawCluster $img $roi
00023 }
00024 }00025
00026 }00027
00028 package provide sas 1.0