description "creaMaracasVisu::ImageGaussianSmooth box example. " category "example" author "eduardo.davila@creatis.insa-lyon.fr" 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 #--------------------------------------------------------------------- new Viewer2D viewer2DImageOriginal connect reader.Out viewer2DImageOriginal.In connect slider.Out viewer2DImageOriginal.Slice connect slider.BoxChange viewer2DImageOriginal.BoxExecute #--------------------------------------------------------------------- new BinaryThresholdImageFilter threshold set threshold.LowerThreshold 2000 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 splitUp connect slider.Widget splitUp.Widget1 connect upLayout.Widget splitUp.Widget2 new LayoutSplit mainSplit connect splitUp.Widget mainSplit.Widget1 connect downLayout.Widget mainSplit.Widget2 #--------------------------------------------------------------------- exec isoextractorthreshold exec isoextractorsmooth exec mainSplit