1 #include "bbvtkVecImageGaussianSmooth.h"
2 #include "bbvtkPackage.h"
4 #include "vtkImageGaussianSmooth.h"
10 BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,VecImageGaussianSmooth)
11 BBTK_BLACK_BOX_IMPLEMENTATION(VecImageGaussianSmooth,bbtk::AtomicBlackBox);
15 //---------------------------------------------------------------------
16 void VecImageGaussianSmooth::bbUserSetDefaultValues()
24 void VecImageGaussianSmooth::bbUserInitializeProcessing()
28 //---------------------------------------------------------------------
29 void VecImageGaussianSmooth::bbUserFinalizeProcessing()
31 int i,size = (int)VecVtkimagegaussiansmooth.size();
32 for (i=0 ; i<size ; i++)
34 VecVtkimagegaussiansmooth[i]->Delete();
36 VecVtkimagegaussiansmooth.clear();
41 //---------------------------------------------------------------------
43 void VecImageGaussianSmooth::Process()
45 bbUserFinalizeProcessing();
47 vtkImageGaussianSmooth *vtkimagegaussiansmooth;
50 double stdvX=bbGetInputStdDevX();
51 double stdvY=bbGetInputStdDevY();
52 double stdvZ=bbGetInputStdDevZ();
54 int i,size=(int)bbGetInputIn().size();
55 for (i=0 ; i<size ; i++)
57 vtkimagegaussiansmooth = vtkImageGaussianSmooth::New();
58 vtkimagegaussiansmooth->SetInput( bbGetInputIn()[i] );
59 vtkimagegaussiansmooth->SetStandardDeviation( stdvX,stdvY, stdvZ );
60 vtkimagegaussiansmooth->Update();
61 VecResult.push_back( vtkimagegaussiansmooth->GetOutput() );
62 VecVtkimagegaussiansmooth.push_back(vtkimagegaussiansmooth);
65 bbSetOutputOut(VecResult);
66 if (bbGetInputiImage() < (int)VecResult.size())
68 bbSetOutputOutImage(VecResult[bbGetInputiImage()]);