[vtkusers] vtkImageMathematics (Add operation)
matheus_viana
vianamp at gmail.com
Wed Aug 15 18:37:50 EDT 2012
Hi Folks,
I'm trying to sum two ImageDatas, but I'm getting a blank image as result.
This is my code:
vtkImageCast *cast = vtkImageCast::New();
cast -> SetInput(ImageData);
cast -> SetOutputScalarTypeToDouble();
cast -> Update();
vtkImageGaussianSmooth *Gauss = vtkImageGaussianSmooth::New();
Gauss -> ReleaseDataFlagOff();
Gauss -> SetInput(cast -> GetOutput());
Gauss -> SetDimensionality(3);
Gauss -> SetRadiusFactors(1,1,1);
Gauss -> SetStandardDeviations(1,1,1);
Gauss -> Update();
vtkImageVariance3D *Variance = vtkImageVariance3D::New();
Variance -> SetInput(cast->GetOutput());
Variance -> SetKernelSize(3,3,3);
Variance -> Update();
vtkImageMathematics *mat = vtkImageMathematics::New();
mat -> SetOperationToAdd();
mat -> SetInput1(Gauss->GetOutput());
mat -> SetInput2(Variance->GetOutput());
mat -> Update();
You guys have any idea?
--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkImageMathematics-Add-operation-tp5715306.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list