[vtkusers] splatting a sphere onto a 2D structure/image

stefano mininel mininel.ml at gnbts.univ.trieste.it
Wed Jan 23 10:34:51 EST 2002


Sorry, it's probably something asked already, but right now I'm stuck
and I need a helpful input/tip.
I want to probe electrical potential values upon a sphere and save
sphere surface as a 2D structure (image, structured points ...) like in
a 2D world map (with poles deformed).
My code
"
  vtkSphereSource *pSferaScalpoSource = vtkSphereSource::New();
    pSferaScalpoSource->SetRadius(8.5);
    pSferaScalpoSource->SetThetaResolution(180);
    pSferaScalpoSource->SetPhiResolution(179);
    pSferaScalpoSource->SetStartPhi(1);
    pSferaScalpoSource->SetEndPhi(179);

  vtk ProbeFilter *pSferaScalpoProbe = vtkProbeFilter::New();
    pSferaScalpoProbe->SetInput(pSferaScalpoSource->GetOutput());
    pSferaScalpoProbe->SetSource(pPotGrid);       // (pPotGrid:
vtkUnstructuredGrid holding the potential values)
"
works well for the probing but ... now? I feel lost in a maze of vtk
filters!!
Vtk used is 3.1.2. Compiler is VC++.
Any help or tip appreciated! Thanks in advance.

    Stefano Mininel




More information about the vtkusers mailing list