[vtkusers] Contouring and coloring with other Skalars

knut.bredemeier at technoteam.de knut.bredemeier at technoteam.de
Wed Jun 11 04:18:23 EDT 2003


Hi,

I have spent several days on discovering the vtk contouring functions for my problem but I couldn't find a good solution. Mayby someone of you can help me:

I have a set of many vectors (10e6) with different amplitudes and I'm interested in visualising the contour surface of the vector startpoints. Normaly all startpoints are laying on a simple geometry like a sphere or cylinder but it could be more complicated. The surface should be colored with something representing a kind of density function.

I did my attempts with vector startpoints laying on an cylinder. 

1. Approach
- I created a voxel volume 'MapImage' (vtkImageData, 6x6x80) and counted the vector amplitudes
  into the voxels. The voxel values represent my coloring scalars.
- I created another vtkImageData 'IsoImage' with voxel values = 1
  where 'MapImage' - voxel values > 0.
- With vtkContourFilter(IsoImage, iso_value=1) I got the surface
- vtkProbeFilter(MapImage, contour) colored the surface

Result:  The result (with lower voxel resolution 6x6x80) was not very nice but acceptable.
         With higher voxel resolution (10x10x100) there appear disturbing structures
         like parallel planes.

2.
- I created a vtkUnstructuredGrid with points(x,y,z) for each voxel of 'IsoImage' > 0
- I added the scalars for contouring (Value = 1):
  pGrid->GetPointData()->SetScalars(pIsoScalars);
- The scalars for coloring:
  pGrid->GetPointData()->AddArray(pMapScalars);

Results:
- vtkContourGrid: What a surprise, I got isopoints.
  Mayby I could create vtkVoxels and then Contour?
- vtkSurfaceReconstructionFilter: The surface looks smooth but the coloring result with
  probing like in 1. looks different
- vtkDelaunay3D -> vtkContourFilter(value=1 or 0)-> "No data to contour" -> What does the
  vtkDelaunay filter with my scalars?

3.
- Unstructured grid as in 2. but Scalars = pMapScalars
- Glyph3D with CubeSource, Scaling off

Result: Each voxel is represented by a correctly colored cube. It looks like something
        I want to visualise if there weren't the visible boundaries between cubes.
        And it's very slow. I wonder if there is a filter to merge the common points
        of the cubes. I tried vtkCleanPoly but there was no change.


I tried several other filters but with no success:
vtkShepardMethod, vtkImplicitModeller, vtkGaussianSplatter

Thanks for any suggestions

Knut Bredemeier

--
Dipl.-Ing. Knut Bredemeier
TechnoTeam Bildverarbeitung GmbH
Werner-von-Siemens-Straße 10
D - 98693 Ilmenau
 
Tel:  +49 3677 462416
Fax:  +49 3677 462410
eMail: knut.bredemeier at technoteam.de
 





More information about the vtkusers mailing list