# --------------------------------------------------------------------- # # 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. # ------------------------------------------------------------------------ */ print "=== GaussianSmooth box example ===" description "GaussianSmooth box example. Screenshot : " author "eduardo.davila at creatis.insa-lyon.fr" category "example" include std include vtk include wx include itk include itkvtk include wxvtk new MetaImageReader reader include std/boxes/bbPrependPackageDataPath.bbs new PrependPackageDataPath prependDatapath set prependDatapath.In "vtk/hola.mhd" connect prependDatapath.Out reader.In #--------------------------------------------------------------------- new Slider slider set slider.Title "Slice" set slider.Max 190 set slider.In 10 #--------------------------------------------------------------------- new Viewer2D viewer2DImageOriginal connect reader.Out viewer2DImageOriginal.In connect slider.Out viewer2DImageOriginal.Slice connect slider.BoxChange viewer2DImageOriginal.BoxExecute #--------------------------------------------------------------------- new BinaryThresholdImageFilter threshold set threshold.LowerThreshold 1000 set threshold.UpperThreshold 5000 set threshold.InsideValue 255 set threshold.OutsideValue 0 connect reader.Out threshold.In new Viewer2D viewer2DImageSegmented connect threshold.Out viewer2DImageSegmented.In connect slider.Out viewer2DImageSegmented.Slice connect slider.BoxChange viewer2DImageSegmented.BoxExecute #--------------------------------------------------------------------- new ImageGaussianSmooth smooth connect threshold.Out smooth.In set smooth.StdDevX 1 set smooth.StdDevY 1 set smooth.StdDevZ 1 new Viewer2D viewer2DImageSmooth connect smooth.Out viewer2DImageSmooth.In connect slider.Out viewer2DImageSmooth.Slice connect slider.BoxChange viewer2DImageSmooth.BoxExecute #--------------------------------------------------------------------- new LayoutLine upLayout set upLayout.Orientation H connect viewer2DImageOriginal.Widget upLayout.Widget1 connect viewer2DImageSegmented.Widget upLayout.Widget2 connect viewer2DImageSmooth.Widget upLayout.Widget3 #--------------------------------------------------------------------- new Viewer3D viewernvImagethreshold3D # set viewernvImagethreshold3D.nTypeView "5" new IsoSurfaceExtractor isoextractorthreshold connect threshold.Out isoextractorthreshold.In set isoextractorthreshold.Opacity 1 set isoextractorthreshold.Isovalue 128 connect viewernvImagethreshold3D.Renderer isoextractorthreshold.Renderer #--------------------------------------------------------------------- new Viewer3D viewernvImageSmooth3D # set viewernvImageSmooth3D.nTypeView "5" new IsoSurfaceExtractor isoextractorsmooth connect smooth.Out isoextractorsmooth.In set isoextractorsmooth.Opacity 1 set isoextractorsmooth.Isovalue 128 connect viewernvImageSmooth3D.Renderer isoextractorsmooth.Renderer #--------------------------------------------------------------------- new LayoutLine downLayout set downLayout.Orientation H connect viewernvImagethreshold3D.Widget downLayout.Widget1 connect viewernvImageSmooth3D.Widget downLayout.Widget2 #--------------------------------------------------------------------- new LayoutSplit splitDown connect upLayout.Widget splitDown.Widget1 connect downLayout.Widget splitDown.Widget2 #--------------------------------------------------------------------- new LayoutSplit mainSplit connect slider.Widget mainSplit.Widget1 connect splitDown.Widget mainSplit.Widget2 exec isoextractorthreshold exec isoextractorsmooth exec mainSplit