[vtkusers] Res: Gradient and Laplacian magnitude from 3D object (from vtkPolyDataConnectivityFilter)

walmor godoi wfisico at yahoo.com.br
Mon Apr 13 13:49:01 EDT 2009


Hello,


Someone has any suggestion to the problem below?

I
need to get is the maximum value of the Gradient and the Laplacian of a
3D object. But the data must be output of vtkPolyDataConnectivityFilter
or some similar filter, because I am creating separate objects.
Thanks!

 ---------------------------------------------------------------------------------
Walmor Cardoso Godoi, M. Sc.
Curitiba - Paraná - Brazil
Url: http://www.walmorgodoi.com
--------------------------------------------------------------------------------




________________________________
De: walmor godoi <wfisico at yahoo.com.br>
Para: vtkusers <vtkusers at vtk.org>
Enviadas: Quinta-feira, 2 de Abril de 2009 16:46:36
Assunto: Gradient and Laplacian magnitude from 3D object (from vtkPolyDataConnectivityFilter)


Hello everyone, 

I would like to calculate the Gradient and Laplacian (as a single scalar value to represent this magnitudes) from the
output of vtkPolyDataConnectivityFilter (from a 3D object). For Gradient, vtkImageGradientMagnitude tried but did not return anything.

Can anyone help?


-----------------java part code from netbeans----------------
//Filtro Gaussiano
  vtkImageGaussianSmooth smooth = new vtkImageGaussianSmooth();
  smooth.SetInput(bmpReader.GetOutput());
  smooth.SetStandardDeviations(4.0, 4.0, 4.0);
  smooth.SetRadiusFactors(2.0, 2.0, 2.0);
  smooth.SetDimensionality(3);
  smooth.Update();
//Marching Cubes
vtkImageMarchingCubes marcher = new vtkImageMarchingCubes();
marcher.SetInput(smooth.GetOutput());
marcher.SetValue(0,100);
marcher.Update();

vtkPolyDataConnectivityFilter conn =new vtkPolyDataConnectivityFilter();
    conn.SetInput(marcher.GetOutput());
    conn.SetExtractionModeToSpecifiedRegions();
    conn.InitializeSpecifiedRegionList();
    conn.AddSpecifiedRegion(0);
    conn.Update();

int idx;    
//loop 
for(idx=0; idx<conn.GetNumberOfExtractedRegions(); idx++){
conn.DeleteSpecifiedRegion(idx-1);
conn.AddSpecifiedRegion(idx);
conn.Update();
//Gradient
 gradientmagnitude.SetInput(conn.GetOutput());  double 
// gradientmagnitude.Update();
Gradiente=gradientmagnitude.GetOutput().GetScalarSize();
  //or
// double Gradiente = gradientmagnitude.GetOutput().GetScalarTypeMax();
   
(...)

 ---------------------------------------------------------------------------------
Walmor Cardoso Godoi, M. Sc.
Curitiba - Paraná - Brazil
Url: http://www.walmorgodoi.com
Blog (visite!): http://walmorgodoi.com/palavraimpressa
--------------------------------------------------------------------------------

________________________________
Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - Celebridades - Música - Esportes


      Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090413/93d8eb86/attachment.htm>


More information about the vtkusers mailing list