[vtkusers] Contouring (again)

Bill Lorensen bill.lorensen at gmail.com
Mon Jul 19 23:45:57 EDT 2010


Setting the isosurface value to the maximum of your scalars seems
strange. Try setting to another value, e.g. .75*range[1];


On Mon, Jul 19, 2010 at 8:52 PM, Robbie Banks <robbie.banks at gmail.com> wrote:
> Hi all,
>
> Sorry to bring up contouring again, but I have a little problem.
>
> I have created a PolyDataMapper from a RectilinearGrid in 3D, each point has
> a location and a scalar value associated with it. I wish to create a Contour
> filter to create an isosurface in the plot for a given scalar value.
>
> I create the contour filter and read in the data like below:
>
>        vtkSmartPointer<vtkContourFilter> pContourFilter =
> vtkSmartPointer<vtkContourFilter>::New();
>        pContourFilter->SetInput(pActor->GetMapper()->GetInput());
>        double range[2];
>        pActor->GetMapper()->GetInput()-GetScalarRange(range);
>        pContourFilter->SetValue(0,range[1]);
>
>        vtkSmartPointer<vtkPolyDataMapper> pMapper =
> vtkSmartPointer<vtkPolyDataMapper>::New();
>        pMapper->SetInputConnection(pContourFilter->GetOutputPort());
>
>        etc.....
>
> This forms a single line round the outside of the volume at the value
> specified. However, as stated I'm after a contour surface. Where am I going
> wrong?
>
> Is the GetMapper()->GetInput() only returning the outer values of the
> PolyData.
>
> How can I create the whole surface?
>
> Thanks
> Robbie
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list