From: jean-pierre roux Date: Wed, 3 Feb 2010 15:47:48 +0000 (+0000) Subject: upgrade X-Git-Tag: CREATOOLS.2-0-3~81 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=aae1d97463911e38ca22418dd7af1b91decd96f7;p=bbtk.git upgrade --- diff --git a/packages/demo/bbs/appli/SaveAsMhd.bbs b/packages/demo/bbs/appli/SaveAsMhd.bbs index 332ada5..9d96a5a 100644 --- a/packages/demo/bbs/appli/SaveAsMhd.bbs +++ b/packages/demo/bbs/appli/SaveAsMhd.bbs @@ -1,25 +1,52 @@ -//description "Example of the box Viewer2D." -author "jpr@creatis.univ-lyon1.fr" -category "tool, writer" +description "Reads and image file / stack of image files, writes it as a MHD file" +author "jpr@creatis.insa-lyon.fr" +category "tool, read/write" load vtk -include wxvtk +//include wxvtk load std load itk include vtk include wx load itkvtk -load creaImageIO +new LayoutLine main +# use Gimmick to select +# ---------------------- + +load creaImageIO new Gimmick reader -new FileSelector fs - set fs.OpenSave "Save" +new CommandButton cb1 + connect cb1.Widget main.Widget1 + set cb1.Label "1) Select File" + set cb1.WinDialog true + +connect cb1.BoxChange reader.BoxExecute + +new CommandButton cb + connect cb.Widget main.Widget2 + set cb.Label "2) Write (no '.mhd' extention needed!" + set cb.WinDialog true + +# Choose where you want to write +# ------------------------------ +new FileSelector fileDialog + set fileDialog.OpenSave Save + set fileDialog.Wildcard "*.mhd" +new MakeFileName mfn + connect fileDialog.Out mfn.File + set mfn.Extent ".mhd" + +# Write! +# ------ + new MetaImageWriter writer - connect reader.Out writer.In - connect fs.Out writer.Filename + connect reader.Out writer.In + connect mfn.Out writer.Filename + connect cb.BoxChange writer.BoxExecute + +exec main -exec reader -exec writer