proc cisosurf::extractIsosurf { inr {color "#E8E0D2"} {subcolor "#D8D0C2"}} { variable tmp set root .extractIsosurf if ![winfo exists $root] { toplevel $root -bg $color wm title $root "Isosurface Extraction" frame $root.d -bg $color frame $root.b -bg $color
frame $root.d.thresh -bg $color label $root.d.thresh.l -bg $color -text "Enter Threshold:" -anchor w entry $root.d.thresh.e -bg $color -fg black -relief sunken -width 10
pack $root.d.thresh.l $root.d.thresh.e -fill x pack $root.d.thresh
set cisosurf::keepMain 0 frame $root.d.keep -bg $color checkbutton $root.d.keep.c -bg $color -text "Keep Main Connected component" -anchor w -variable cisosurf::keepMain pack $root.d.keep.c -fill x pack $root.d.keep
set cisosurf::sample 1 frame $root.d.sample -bg $color label $root.d.sample.l -bg $color -text "Decimate triangulation ?" -anchor w radiobutton $root.d.sample.true -text "Yes" -variable cisosurf::sample -value 1 -anchor w -bg $color radiobutton $root.d.sample.false -text "No" -variable cisosurf::sample -value 0 -anchor w -bg $color pack $root.d.sample.l $root.d.sample.true $root.d.sample.false -fill x pack $root.d.sample frame $root.d.nbVertex -bg $color label $root.d.nbVertex.l -bg $color -text "Enter Approximate Number of Vertices:" -anchor w entry $root.d.nbVertex.e -bg $color -fg black -relief sunken -width 10 $root.d.nbVertex.e insert 0 "2000" pack $root.d.nbVertex.l $root.d.nbVertex.e pack $root.d.nbVertex
button $root.b.ok -text "OK" -bg $color -command "if \$cisosurf::keepMain { set tmp {-keepMain} } else { set tmp {} };if \$cisosurf::sample { evaluate \"extractIsosurfToTrian $inr \[ $root.d.thresh.e get\] -nfaces \[ $root.d.nbVertex.e get\] \$tmp \" } else {evaluate \"extractIsosurfToTrian $inr \[ $root.d.thresh.e get\] \$tmp\"}; new cam3D; destroy $root " button $root.b.dismiss -text "Dismiss" -command "destroy $root" -bg $color pack $root.b.ok $root.b.dismiss -side left -expand true -fill x -padx 20 -pady 10 pack $root.d $root.b
}
}
|