X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fdemo%2Fbbs%2Fappli%2FdemoViewing1.bbs;h=594564e8871ec715d94443c25e0a778ced25b022;hb=79d06fa7c6441e99291ad3a1949d241f336573d5;hp=60d826ba91659e5931fad6cc2978d171de13ab5b;hpb=07fb04c0b3222d22afc7cf159b24657d98fc6c65;p=bbtk.git diff --git a/packages/demo/bbs/appli/demoViewing1.bbs b/packages/demo/bbs/appli/demoViewing1.bbs index 60d826b..594564e 100644 --- a/packages/demo/bbs/appli/demoViewing1.bbs +++ b/packages/demo/bbs/appli/demoViewing1.bbs @@ -1,3 +1,28 @@ + # --------------------------------------------------------------------- + # + # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image + # pour la SantÈ) + # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton + # Previous Authors : Laurent Guigues, Jean-Pierre Roux + # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil + # + # This software is governed by the CeCILL-B license under French law and + # abiding by the rules of distribution of free software. You can use, + # modify and/ or redistribute the software under the terms of the CeCILL-B + # license as circulated by CEA, CNRS and INRIA at the following URL + # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html + # or in the file LICENSE.txt. + # + # As a counterpart to the access to the source code and rights to copy, + # modify and redistribute granted by the license, users are provided only + # with a limited warranty and the software's author, the holder of the + # economic rights, and the successive licensors have only limited + # liability. + # + # The fact that you are presently reading this means that you have had + # knowledge of the CeCILL-B license and that you accept its terms. + # ------------------------------------------------------------------------ */ + description "3 slicers and a 3D view" author "jpr@creatis.insa-lyon.fr" category "demo" @@ -17,86 +42,26 @@ load gdcmvtk include wxvtk/boxes/bbSimpleSlicer new LayoutX4 main -new LayoutLine upright -new LayoutLine upleft -new LayoutLine downleft -connect upright.Widget main.Widget1 -connect upleft.Widget main.Widget2 -connect downleft.Widget main.Widget3 +new LayoutLine upright +new LayoutLine upleft +new LayoutLine downleft +new LayoutSplit downright + set downright.Proportion 85 + +connect upright.Widget main.Widget1 +connect upleft.Widget main.Widget2 +connect downleft.Widget main.Widget3 +connect downright.Widget main.Widget4 + +# Here loads 'hola.mhd' +# --------------------- -# Here loads hola.mhd -# ------------------- include vtk/boxes/bbLoadHola new LoadHola reader -# uncomment next lines to have a file selector -# -------------------------------------------- -/* -new FileSelector openFileDialog -new ImageReader reader - connect openFileDialog.Out reader.In -*/ - -# uncomment next lines to use Gimmick -# ----------------------------------- -/* -load creaImageIO -new Gimmick reader -*/ - -# uncomment next lines to Read a MHD file (and nothing else !) -# ------------------------------------------------------------ -/* -new FileSelector openFileDialog - set openFileDialog.Wildcard "(*.mhd)|*.mhd" -new MetaImageReader reader - connect openFileDialog.Out reader.In -*/ - -# uncomment the following lines to read a 3D images stack -# (only if file name order is meaningfull) -# ------------------------------------------------------- -/* -// To choose the directory -new DirectorySelector ds -// To get the image names into a vector -new FilesFromDirectory fd -// To read all the files, as a bbitk::ImagePointer -new ImageSeriesReader reader -// user choosen directory as input -connect ds.Out fd.In -set fd.Recursive false -// list of files as input -#print "Files found in $ds.Out$\n -connect fd.Out reader.FileNames -*/ - -# uncomment the following lines to read a 3D images stack -# (if the directory contains a 'XCoherent" Serie) -# ------------------------------------------------------- -/* -// To choose the directory -new DirectorySelector ds -// To get the image names into a vector -new FilesFromDirectory fd -// user choosen directory as input -connect ds.Out fd.In -// order the files, computes an accurate ZSpacing -new GetXCoherentInfoGdcmReader reader -connect fd.Out reader.In -*/ - -# uncomment the following lines to read a 3D images stack -# (with DICOMDirReader) -# ------------------------------------------------------- -/* -include itk/boxes/bbDICOMDirReader -// To choose the directory -new DirectorySelector ds -new DICOMDirReader reader - connect ds.Out reader.In -*/ +# Have a look at exampleViewing1.1.bbs +# If you want to know how to read different images. // We need that to set Sliders sizes @@ -104,8 +69,6 @@ new DICOMDirReader reader new ImageProperties mc connect reader.Out mc.In -#print "Image properties : $reader.Out" - #Get number of column (X) new GetVectorIntElement gveX connect mc.Size gveX.In @@ -120,7 +83,7 @@ new GetVectorIntElement gveY new GetVectorIntElement gveZ connect mc.Size gveZ.In set gveZ.I 2 -print "Dim Z $gveZ.Out" +//print "Dim Z $gveZ.Out" #Compute the number of the 'middle' slice on X axis new Div div0 @@ -186,10 +149,20 @@ new Viewer3D viewer connect planes.PlaneY viewer.Obs2 connect planes.PlaneZ viewer.Obs3 - connect viewer.Widget main.Widget4 +new CheckBox chkbox + set chkbox.Title "Interpolate Pixels (in '2D' images)" + set chkbox.In 1 + connect chkbox.BoxChange viewerUL.BoxExecute + connect chkbox.BoxChange viewerUR.BoxExecute + connect chkbox.BoxChange viewerTD.BoxExecute + + connect viewer.Widget downright.Widget1 + connect chkbox.Widget downright.Widget2 + + connect chkbox.Out viewerUL.Interpolate + connect chkbox.Out viewerUR.Interpolate + connect chkbox.Out viewerTD.Interpolate set main.WinTitle "demoViewing1" exec main exec viewerTD - -