X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fdemo%2Fbbs%2Fappli%2FSaveAsMhd.bbs;h=ccd0ae652450579bdcb4b73f77d358a085ce26b4;hb=2441c154e1940e42455187049718d0a15d7fb81f;hp=9d96a5ae5d0ed448ab45e851d99cf01f5e6d20f1;hpb=aae1d97463911e38ca22418dd7af1b91decd96f7;p=bbtk.git diff --git a/packages/demo/bbs/appli/SaveAsMhd.bbs b/packages/demo/bbs/appli/SaveAsMhd.bbs index 9d96a5a..ccd0ae6 100644 --- a/packages/demo/bbs/appli/SaveAsMhd.bbs +++ b/packages/demo/bbs/appli/SaveAsMhd.bbs @@ -1,9 +1,10 @@ -description "Reads and image file / stack of image files, writes it as a MHD file" + +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 @@ -12,23 +13,46 @@ load itkvtk new LayoutLine main -# use Gimmick to select -# ---------------------- - +# Use new box (choose the way you want to select images) +# ----------------------------------------------------- load creaImageIO -new Gimmick reader +//new ImagesChooserDialogBox chooser +new ImagesChooserDialogBox reader + +# Concatenate all the supposed-to-be consistent 2D images into a single vtkImageData +# WARNING : File names alphabetical order is suposed to be meaningful ... + +//new ConcatImages reader +// connect chooser.OutImages reader.In + new CommandButton cb1 - connect cb1.Widget main.Widget1 set cb1.Label "1) Select File" set cb1.WinDialog true - + connect cb1.Widget main.Widget1 + connect cb1.BoxChange reader.BoxExecute - + +new SimpleSlicer slc + set slc.Orientation 2 + set slc.SliderReactiveOnTrack 1 + connect reader.Out slc.In + // It doesn't work ?!?, needs to "exec slc" // JPR + connect reader.BoxChange slc.BoxExecute + +exec slc + new CommandButton cb connect cb.Widget main.Widget2 set cb.Label "2) Write (no '.mhd' extention needed!" set cb.WinDialog true + +new CommandButton next + connect next.Widget main.Widget3 + set next.Label "Next !" + set next.WinDialog true + // It doesn't work : <> + set next.In "delete main" # Choose where you want to write # ------------------------------