[vtkusers] Cannot make unstructured points isosurface
Randy Heiland
heiland at ncsa.uiuc.edu
Wed Nov 6 06:33:35 EST 2002
Try doing a:
isoMapper->SetTableRange(-.006,.002)
--Randy
On Nov 5, 10:36pm, Chris Scharver wrote:
> Subject: Re: [vtkusers] Cannot make unstructured points isosurface
> At 6:26 PM +0530 11/02/2002, Prabhu Ramachandran wrote:
> >From what I understand you are simply assigning a bunch of points as
> >vertices into an Unstructured grid. This will not result in a volume.
> >All your data will contain is a bunch of points. Hence contouring the
> >data will not produce anything. If you need to contour the data you
> >need to specify volumes which means you need to know the topology. If
> >that is hard to get in your case try investigating these classes:
> >
> > vtkShepardMethod
> > vtkGaussianSplatter
> > vtkProbeFilter
>
> The vtkShepardMethod did the trick! It did exactly what I needed by
determining the topology based on the points read from the dataset. It
resampled onto a grid with different bounds than the original dataset, but that
should be okay. Thanks tremendously!
>
> Now that I have the surface, I still have to determine why resulting contours
are always red... I only have two contours, but their colors should be based on
the scalar values used to make the surfaces. I tried setting a color lookup
table, but I always end up with the same color for both surfaces.
>
> vtkContourFilter* iso = vtkContourFilter::New();
> iso->SetInput(shepard->GetOutput());
> iso->SetValue(0, -0.006f);
> iso->SetValue(1, 0.002f);
> iso->ComputeScalarsOn();
> iso->UseScalarTree();
> vtkLookupTable* lut = vtkLookupTable::New();
> lut->SetNumberOfColors(256);
> lut->SetTableRange(shepard->GetOutput()->GetScalarRange());
> lut->Build();
> vtkPolyDataMapper* isoMapper = vtkPolyDataMapper::New();
> isoMapper->SetInput(iso->GetOutput());
> isoMapper->SetLookupTable(lut);
> isoMapper->SetColorModeToMapScalars();
> isoMapper->SetScalarRange(shepard->GetOutput()->GetScalarRange());
> isoMapper->ScalarVisibilityOn();
> vtkActor* isoActor = vtkActor::New();
> isoActor->SetMapper(isoMapper);
> isoActor->GetProperty()->SetOpacity(0.5f);
>
> The scalar data is obviously there since the contours are built correctly.
The scalars are 'small', but shouldn't the SetTableRange() and SetScalarRange()
methods account for that?
>
> Chris
> --
> Chris Scharver
> Electronic Visualization Laboratory
> The University of Illinois at Chicago
> Ph: 312-996-3002 FAX: 312-413-7585
> <http://www.evl.uic.edu/scharver/>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>-- End of excerpt from Chris Scharver
More information about the vtkusers
mailing list